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
53a544d9
Commit
53a544d9
authored
Nov 30, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17614 from bprashanth/IngressE2E
Auto commit by PR queue bot
parents
d8c1a9a4
c553b155
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 @
53a544d9
...
...
@@ -5,7 +5,7 @@ metadata:
namespace
:
kube-system
labels
:
k8s-app
:
glbc
version
:
v0.5
version
:
v0.5
.1
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/name
:
"
GLBC"
spec
:
...
...
@@ -13,12 +13,12 @@ spec:
replicas
:
1
selector
:
k8s-app
:
glbc
version
:
v0.5
version
:
v0.5
.1
template
:
metadata
:
labels
:
k8s-app
:
glbc
version
:
v0.5
version
:
v0.5
.1
name
:
glbc
kubernetes.io/cluster-service
:
"
true"
spec
:
...
...
@@ -45,13 +45,15 @@ spec:
requests
:
cpu
:
10m
memory
:
20Mi
-
image
:
gcr.io/google_containers/glbc:0.5
-
image
:
gcr.io/google_containers/glbc:0.5
.1
livenessProbe
:
httpGet
:
path
:
/healthz
port
:
8081
scheme
:
HTTP
initialDelaySeconds
:
30
# healthz reaches out to GCE
periodSeconds
:
30
timeoutSeconds
:
5
name
:
l7-lb-controller
resources
:
...
...
hack/jenkins/e2e.sh
View file @
53a544d9
...
...
@@ -365,7 +365,7 @@ GCE_SLOW_TESTS=(
# Tests which are not able to be run in parallel.
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"
"MaxPods"
"Resource
\s
usage
\s
of
\s
system
\s
containers"
...
...
hack/lib/golang.sh
View file @
53a544d9
...
...
@@ -112,7 +112,7 @@ readonly KUBE_CLIENT_PLATFORMS=(
# arbitrary, but is a reasonable splitting point for 2015
# 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):
# boot2docker down
# VBoxManage modifyvm boot2docker-vm --memory 12000
...
...
test/e2e/ingress.go
View file @
53a544d9
This diff is collapsed.
Click to expand it.
test/e2e/util.go
View file @
53a544d9
...
...
@@ -2525,3 +2525,63 @@ func lookForString(expectedString string, timeout time.Duration, fn func() strin
err
=
fmt
.
Errorf
(
"Failed to find
\"
%s
\"
, last result:
\"
%s
\"
"
,
expectedString
,
result
)
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