Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c553b155
Commit
c553b155
authored
Nov 18, 2015
by
Prashanth Balasubramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ingress test revamp
Fixes a number of harder issues the initial test punted on.
parent
c1af9dcb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
6 deletions
+68
-6
glbc-controller.yaml
...er/addons/cluster-loadbalancing/glbc/glbc-controller.yaml
+6
-4
e2e.sh
hack/jenkins/e2e.sh
+1
-1
golang.sh
hack/lib/golang.sh
+1
-1
ingress.go
test/e2e/ingress.go
+0
-0
util.go
test/e2e/util.go
+60
-0
No files found.
cluster/addons/cluster-loadbalancing/glbc/glbc-controller.yaml
View file @
c553b155
...
@@ -5,7 +5,7 @@ metadata:
...
@@ -5,7 +5,7 @@ metadata:
namespace
:
kube-system
namespace
:
kube-system
labels
:
labels
:
k8s-app
:
glbc
k8s-app
:
glbc
version
:
v0.5
version
:
v0.5
.1
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/name
:
"
GLBC"
kubernetes.io/name
:
"
GLBC"
spec
:
spec
:
...
@@ -13,12 +13,12 @@ spec:
...
@@ -13,12 +13,12 @@ spec:
replicas
:
1
replicas
:
1
selector
:
selector
:
k8s-app
:
glbc
k8s-app
:
glbc
version
:
v0.5
version
:
v0.5
.1
template
:
template
:
metadata
:
metadata
:
labels
:
labels
:
k8s-app
:
glbc
k8s-app
:
glbc
version
:
v0.5
version
:
v0.5
.1
name
:
glbc
name
:
glbc
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/cluster-service
:
"
true"
spec
:
spec
:
...
@@ -45,13 +45,15 @@ spec:
...
@@ -45,13 +45,15 @@ spec:
requests
:
requests
:
cpu
:
10m
cpu
:
10m
memory
:
20Mi
memory
:
20Mi
-
image
:
gcr.io/google_containers/glbc:0.5
-
image
:
gcr.io/google_containers/glbc:0.5
.1
livenessProbe
:
livenessProbe
:
httpGet
:
httpGet
:
path
:
/healthz
path
:
/healthz
port
:
8081
port
:
8081
scheme
:
HTTP
scheme
:
HTTP
initialDelaySeconds
:
30
initialDelaySeconds
:
30
# healthz reaches out to GCE
periodSeconds
:
30
timeoutSeconds
:
5
timeoutSeconds
:
5
name
:
l7-lb-controller
name
:
l7-lb-controller
resources
:
resources
:
...
...
hack/jenkins/e2e.sh
View file @
c553b155
...
@@ -206,7 +206,7 @@ GCE_SLOW_TESTS=(
...
@@ -206,7 +206,7 @@ GCE_SLOW_TESTS=(
# Tests which are not able to be run in parallel.
# Tests which are not able to be run in parallel.
GCE_PARALLEL_SKIP_TESTS
=(
GCE_PARALLEL_SKIP_TESTS
=(
"GCE
\s
L7
\s
LoadBalancer
\s
Controller"
#
TODO: This cannot run in parallel with other L4 tests till quota has been bumped up.
"GCE
\s
L7
\s
LoadBalancer
\s
Controller"
#
namespaced watch flakes, issue: #17805
"Nodes
\s
Network"
"Nodes
\s
Network"
"MaxPods"
"MaxPods"
"Resource
\s
usage
\s
of
\s
system
\s
containers"
"Resource
\s
usage
\s
of
\s
system
\s
containers"
...
...
hack/lib/golang.sh
View file @
c553b155
...
@@ -112,7 +112,7 @@ readonly KUBE_CLIENT_PLATFORMS=(
...
@@ -112,7 +112,7 @@ readonly KUBE_CLIENT_PLATFORMS=(
# arbitrary, but is a reasonable splitting point for 2015
# arbitrary, but is a reasonable splitting point for 2015
# laptops-versus-not.
# laptops-versus-not.
#
#
# If you are using boot2docker, the following seems to work (note
# If you are using boot2docker, the following seems to work (note
# that 12000 rounds to 11G):
# that 12000 rounds to 11G):
# boot2docker down
# boot2docker down
# VBoxManage modifyvm boot2docker-vm --memory 12000
# VBoxManage modifyvm boot2docker-vm --memory 12000
...
...
test/e2e/ingress.go
View file @
c553b155
This diff is collapsed.
Click to expand it.
test/e2e/util.go
View file @
c553b155
...
@@ -2522,3 +2522,63 @@ func lookForString(expectedString string, timeout time.Duration, fn func() strin
...
@@ -2522,3 +2522,63 @@ func lookForString(expectedString string, timeout time.Duration, fn func() strin
err
=
fmt
.
Errorf
(
"Failed to find
\"
%s
\"
, last result:
\"
%s
\"
"
,
expectedString
,
result
)
err
=
fmt
.
Errorf
(
"Failed to find
\"
%s
\"
, last result:
\"
%s
\"
"
,
expectedString
,
result
)
return
return
}
}
// getSvcNodePort returns the node port for the given service:port.
func
getSvcNodePort
(
client
*
client
.
Client
,
ns
,
name
string
,
svcPort
int
)
(
int
,
error
)
{
svc
,
err
:=
client
.
Services
(
ns
)
.
Get
(
name
)
if
err
!=
nil
{
return
0
,
err
}
for
_
,
p
:=
range
svc
.
Spec
.
Ports
{
if
p
.
Port
==
svcPort
{
if
p
.
NodePort
!=
0
{
return
p
.
NodePort
,
nil
}
}
}
return
0
,
fmt
.
Errorf
(
"No node port found for service %v, port %v"
,
name
,
svcPort
)
}
// getNodePortURL returns the url to a nodeport Service.
func
getNodePortURL
(
client
*
client
.
Client
,
ns
,
name
string
,
svcPort
int
)
(
string
,
error
)
{
nodePort
,
err
:=
getSvcNodePort
(
client
,
ns
,
name
,
svcPort
)
if
err
!=
nil
{
return
""
,
err
}
nodes
,
err
:=
client
.
Nodes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
if
err
!=
nil
{
return
""
,
err
}
if
len
(
nodes
.
Items
)
==
0
{
return
""
,
fmt
.
Errorf
(
"Unable to list nodes in cluster."
)
}
for
_
,
node
:=
range
nodes
.
Items
{
for
_
,
address
:=
range
node
.
Status
.
Addresses
{
if
address
.
Type
==
api
.
NodeExternalIP
{
if
address
.
Address
!=
""
{
return
fmt
.
Sprintf
(
"http://%v:%v"
,
address
.
Address
,
nodePort
),
nil
}
}
}
}
return
""
,
fmt
.
Errorf
(
"Failed to find external address for service %v"
,
name
)
}
// scaleRCByName scales an RC via ns/name lookup. If replicas == 0 it waits till
// none are running, otherwise it does what a synchronous scale operation would do.
func
scaleRCByName
(
client
*
client
.
Client
,
ns
,
name
string
,
replicas
uint
)
error
{
if
err
:=
ScaleRC
(
client
,
ns
,
name
,
replicas
,
false
);
err
!=
nil
{
return
err
}
rc
,
err
:=
client
.
ReplicationControllers
(
ns
)
.
Get
(
name
)
if
err
!=
nil
{
return
err
}
if
replicas
==
0
{
return
waitForRCPodsGone
(
client
,
rc
)
}
else
{
return
waitForPodsWithLabelRunning
(
client
,
ns
,
labels
.
SelectorFromSet
(
labels
.
Set
(
rc
.
Spec
.
Selector
)))
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment