-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added NAT_Outgoing parameter to Calico Node #861
Added NAT_Outgoing parameter to Calico Node #861
Conversation
22c49f3
to
bde9a5a
Compare
bde9a5a
to
efc352d
Compare
@@ -138,7 +138,11 @@ def test_default_pools(self, success_expected, param, value, exp_num_pools, ipip | |||
"Didn't find ipip mode in pool %s" % pool | |||
|
|||
# Check NAT setting | |||
assert pool['spec']['nat-outgoing'] is True, "Didn't find nat enabled in pool %s" % pool | |||
if param == "CALICO_IPV4POOL_CIDR": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the test error, it looks like you need to check if nat-outgoing
is present in pool['spec']
.
I think you could just switch the whole block here to something like:
if "nat-outgiong" in pool['spec']:
assert pool['spec']['nat-outgoing'] is nat_outgoing, \
"Wrong NAT default in pool %s, expected nat-outgoing to be %s" % (pool, nat_outgoing)
else:
assert nat_outgoing is False, \
"Wrong NAT default in pool %s, expecting nat-outgoing to be disabled" % pool
I don't think it is necessary to indicate v4 or v6.
LGTM |
4b22aea
to
77c3308
Compare
Rebased and squashed the commits |
@tmjd I took a very quick look, but think you need @robbrockbank 's eyes here. |
@VincentS LGTM. I think it's just missing a minor docs update. Would you mind adding an entry to the following doc?: https://github.com/projectcalico/calico/blob/master/master/reference/node/configuration.md If you prefer we can merge this as is and we'll add it later - let me know. |
@robbrockbank The PR #775 exists for the documentation. That PR existed before calico_node was moved into this repo. Do you think that needs to be merged with this PR? I'm of the opinion that it doesn't matter. |
@tmjd TBH I didn't spot that PR, I'm happy to merge this and update the docs later. |
…-master [master] Semaphore Auto Pin Update
This patch adds an NAT_Outgoing Parameter for IPv4 / IPv6 to Calico Node to be configurable on startup. This PR was moved from calicoctl Repository projectcalico/calicoctl#1640
Todos
Release note