Skip to content

nodeinit: only bypass IP-MASQ chain if Cilium manages masquerade#12952

Merged
joestringer merged 3 commits intocilium:masterfrom
planetscale:gke-disable-default-snat
Aug 26, 2020
Merged

nodeinit: only bypass IP-MASQ chain if Cilium manages masquerade#12952
joestringer merged 3 commits intocilium:masterfrom
planetscale:gke-disable-default-snat

Conversation

@dctrwatson
Copy link
Copy Markdown
Contributor

#11782 introduced unexpected behavior of outright disabling ip-masquerade-agent functionality in GKE clusters with Cilium installed.

See: #11782 (comment)

Instead of always bypassing the IP-MASQ chain managed by GKE nodeinit and the ip-masquerade-agent, only bypass it if the user wants Cilium to manage masquerading (global.masquerade=true) or if they want to explicitly disable masquerade (global.gke.disableDefaultSnat)

@dctrwatson dctrwatson requested review from a team as code owners August 21, 2020 22:10
@dctrwatson dctrwatson requested a review from a team August 21, 2020 22:10
@maintainer-s-little-helper
Copy link
Copy Markdown

Commit 721dd07d3423b7f9fa6c8aad25e3e4f7052acdf7 does not contain "Signed-off-by".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper Bot added dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Aug 21, 2020
Signed-off-by: John Watson <johnw@planetscale.com>
@dctrwatson dctrwatson force-pushed the gke-disable-default-snat branch from 721dd07 to 9f7a7fa Compare August 21, 2020 22:10
@maintainer-s-little-helper
Copy link
Copy Markdown

Commit 721dd07d3423b7f9fa6c8aad25e3e4f7052acdf7 does not contain "Signed-off-by".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

Copy link
Copy Markdown
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for following up.

I'll /cc @David0922 @Weil0ng to double-check that this satisfies their concerns.

@joestringer joestringer added priority/release-blocker release-note/misc This PR makes changes that have no direct user impact. labels Aug 21, 2020
@maintainer-s-little-helper maintainer-s-little-helper Bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Aug 21, 2020
@joestringer joestringer added integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. and removed dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. labels Aug 21, 2020
@joestringer
Copy link
Copy Markdown
Member

The bot didn't seem to detect that sign-off was added, it seems right to me. So I dropped that label.

{{- end }}

{{- if .Values.global.gke.enabled }}
{{- if (or (and .Values.global.gke.enabled .Values.global.masquerade) (and .Values.global.gke.enabled .Values.global.gke.disableDefaultSnat))}}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can be as per below, feel free to ignore

Suggested change
{{- if (or (and .Values.global.gke.enabled .Values.global.masquerade) (and .Values.global.gke.enabled .Values.global.gke.disableDefaultSnat))}}
{{- if (and ( .Values.global.gke.enabled (or .Values.global.masquerade .Values.global.gke.disableDefaultSnat)))}}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Member

@sayboras sayboras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@sayboras sayboras requested a review from a team August 24, 2020 10:21
@jrfastab
Copy link
Copy Markdown
Contributor

LGTM. Nice catch.

Signed-off-by: John Watson <johnw@planetscale.com>
Signed-off-by: John Watson <johnw@planetscale.com>
@joestringer
Copy link
Copy Markdown
Member

test-gke

@joestringer joestringer merged commit 7457ce6 into cilium:master Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants