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
60829a88
Commit
60829a88
authored
Mar 31, 2017
by
jayunit100
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove conformance from port forwarding so local / secure clusters aren't expected to support it.
parent
f3fb966e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
local-up-cluster.sh
hack/local-up-cluster.sh
+4
-4
portforward.go
test/e2e/portforward.go
+10
-8
No files found.
hack/local-up-cluster.sh
View file @
60829a88
...
...
@@ -48,10 +48,10 @@ EVICTION_HARD=${EVICTION_HARD:-"memory.available<100Mi"}
EVICTION_SOFT
=
${
EVICTION_SOFT
:-
""
}
EVICTION_PRESSURE_TRANSITION_PERIOD
=
${
EVICTION_PRESSURE_TRANSITION_PERIOD
:-
"1m"
}
#
We disable cluster DNS by default because this script uses docker0 (or whatever
#
container bridge docker is currently using) and we don't know the IP of the
#
DNS pod to pass in as --cluster-dns. To set this up by hand, set this flag
#
and change DNS_SERVER_IP to the appropriate IP
.
#
This script uses docker0 (or whatever container bridge docker is currently using)
#
and we don't know the IP of the DNS pod to pass in as --cluster-dns.
#
To set this up by hand, set this flag and change DNS_SERVER_IP.
#
Note also that you need API_HOST (defined above) for correct DNS
.
ENABLE_CLUSTER_DNS
=
${
KUBE_ENABLE_CLUSTER_DNS
:-
true
}
DNS_SERVER_IP
=
${
KUBE_DNS_SERVER_IP
:-
10
.0.0.10
}
DNS_DOMAIN
=
${
KUBE_DNS_NAME
:-
"cluster.local"
}
...
...
test/e2e/portforward.go
View file @
60829a88
...
...
@@ -157,6 +157,7 @@ func (c *portForwardCommand) Stop() {
framework
.
TryKill
(
c
.
cmd
)
}
// runPortForward runs port-forward, warning, this may need root functionality on some systems.
func
runPortForward
(
ns
,
podName
string
,
port
int
)
*
portForwardCommand
{
cmd
:=
framework
.
KubectlCmd
(
"port-forward"
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
),
podName
,
fmt
.
Sprintf
(
":%d"
,
port
))
// This is somewhat ugly but is the only way to retrieve the port that was picked
...
...
@@ -473,16 +474,16 @@ var _ = framework.KubeDescribe("Port forwarding", func() {
framework
.
KubeDescribe
(
"With a server listening on 0.0.0.0"
,
func
()
{
framework
.
KubeDescribe
(
"that expects a client request"
,
func
()
{
It
(
"should support a client that connects, sends
no data
, and disconnects"
,
func
()
{
It
(
"should support a client that connects, sends
NO DATA
, and disconnects"
,
func
()
{
doTestMustConnectSendNothing
(
"0.0.0.0"
,
f
)
})
It
(
"should support a client that connects, sends
data
, and disconnects"
,
func
()
{
It
(
"should support a client that connects, sends
DATA
, and disconnects"
,
func
()
{
doTestMustConnectSendDisconnect
(
"0.0.0.0"
,
f
)
})
})
framework
.
KubeDescribe
(
"that expects
no
client request"
,
func
()
{
It
(
"should support a client that connects, sends
data
, and disconnects"
,
func
()
{
framework
.
KubeDescribe
(
"that expects
NO
client request"
,
func
()
{
It
(
"should support a client that connects, sends
DATA
, and disconnects"
,
func
()
{
doTestConnectSendDisconnect
(
"0.0.0.0"
,
f
)
})
})
...
...
@@ -492,18 +493,19 @@ var _ = framework.KubeDescribe("Port forwarding", func() {
})
})
// kubectl port-forward may need elevated privileges to do its job.
framework
.
KubeDescribe
(
"With a server listening on localhost"
,
func
()
{
framework
.
KubeDescribe
(
"that expects a client request"
,
func
()
{
It
(
"should support a client that connects, sends
no data, and disconnects [Conformance]
"
,
func
()
{
It
(
"should support a client that connects, sends
NO DATA, and disconnects
"
,
func
()
{
doTestMustConnectSendNothing
(
"localhost"
,
f
)
})
It
(
"should support a client that connects, sends
data, and disconnects [Conformance]
"
,
func
()
{
It
(
"should support a client that connects, sends
DATA, and disconnects
"
,
func
()
{
doTestMustConnectSendDisconnect
(
"localhost"
,
f
)
})
})
framework
.
KubeDescribe
(
"that expects
no
client request"
,
func
()
{
It
(
"should support a client that connects, sends
data, and disconnects [Conformance]
"
,
func
()
{
framework
.
KubeDescribe
(
"that expects
NO
client request"
,
func
()
{
It
(
"should support a client that connects, sends
DATA, and disconnects
"
,
func
()
{
doTestConnectSendDisconnect
(
"localhost"
,
f
)
})
})
...
...
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