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
8aef1286
Commit
8aef1286
authored
Nov 06, 2017
by
Daniel Nardo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the NON_MASQUERADE_CIDR to 0/0 by default in GCE/GKE which disables
masquerade rules setup by the kubelet. Add masquerade rules based on NON_MASQUERADE_CIDR being set to 0/0.
parent
a8fc7f69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
config-default.sh
cluster/gce/config-default.sh
+2
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+2
-2
No files found.
cluster/gce/config-default.sh
View file @
8aef1286
...
@@ -290,6 +290,8 @@ OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}"
...
@@ -290,6 +290,8 @@ OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}"
# Network Policy plugin specific settings.
# Network Policy plugin specific settings.
NETWORK_POLICY_PROVIDER
=
"
${
NETWORK_POLICY_PROVIDER
:-
none
}
"
# calico
NETWORK_POLICY_PROVIDER
=
"
${
NETWORK_POLICY_PROVIDER
:-
none
}
"
# calico
NON_MASQUERADE_CIDR
=
"0.0.0.0/0"
# How should the kubelet configure hairpin mode?
# How should the kubelet configure hairpin mode?
HAIRPIN_MODE
=
"
${
HAIRPIN_MODE
:-
promiscuous
-bridge
}
"
# promiscuous-bridge, hairpin-veth, none
HAIRPIN_MODE
=
"
${
HAIRPIN_MODE
:-
promiscuous
-bridge
}
"
# promiscuous-bridge, hairpin-veth, none
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
...
...
cluster/gce/gci/configure-helper.sh
View file @
8aef1286
...
@@ -64,8 +64,8 @@ function config-ip-firewall {
...
@@ -64,8 +64,8 @@ function config-ip-firewall {
# Flush iptables nat table
# Flush iptables nat table
iptables
-t
nat
-F
||
true
iptables
-t
nat
-F
||
true
if
[[
"
${
NETWORK_POLICY_PROVIDER
:-}
"
==
"calico"
&&
"
${
KUBERNETES_MASTER
:-}
"
==
false
]]
;
then
echo
"Add rules for ip masquerade"
echo
"Add rules for ip masquerade"
if
[[
"
${
NON_MASQUERADE_CIDR
:-}
"
==
"0.0.0.0/0"
]]
;
then
iptables
-t
nat
-N
IP-MASQ
iptables
-t
nat
-N
IP-MASQ
iptables
-t
nat
-A
POSTROUTING
-m
comment
--comment
"ip-masq: ensure nat POSTROUTING directs all non-LOCAL destination traffic to our custom IP-MASQ chain"
-m
addrtype
!
--dst-type
LOCAL
-j
IP-MASQ
iptables
-t
nat
-A
POSTROUTING
-m
comment
--comment
"ip-masq: ensure nat POSTROUTING directs all non-LOCAL destination traffic to our custom IP-MASQ chain"
-m
addrtype
!
--dst-type
LOCAL
-j
IP-MASQ
iptables
-t
nat
-A
IP-MASQ
-d
169.254.0.0/16
-m
comment
--comment
"ip-masq: local traffic is not subject to MASQUERADE"
-j
RETURN
iptables
-t
nat
-A
IP-MASQ
-d
169.254.0.0/16
-m
comment
--comment
"ip-masq: local traffic is not subject to MASQUERADE"
-j
RETURN
...
...
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