Skip to content
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

helm: almost always try to delete aws iptables #28697

Merged
merged 2 commits into from Oct 27, 2023

Conversation

nebril
Copy link
Member

@nebril nebril commented Oct 19, 2023

Fixes: #25804

This change causes Cilium DaemonSet postStart hook to always delete AWS
iptable rules unless cni.chainingMode is set to aws-cni.

This will result in the postStart hook being a noop in all non-AWS
deployments. Unfortunately there is no way for helm chart to know
whether it is running on AWS not in ENI mode.

This approach will make sure that we are deleting AWS-specific iptables
rules that cause issues while not requiring us to introduce new
configuration flags for users.

The PR also includes a change in poststart script that makes sure that we delete proper rules.

Credit for figuring out additional scenarios in which we need to delete these rules goes to @squeed and @rabbagliettiandrea

helm: delete AWS iptables in all deployments aside from AWS CNI chaining environments 

@nebril nebril requested review from a team as code owners October 19, 2023 12:14
@nebril nebril requested review from joamaki and squeed October 19, 2023 12:14
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Oct 19, 2023
@nebril
Copy link
Member Author

nebril commented Oct 19, 2023

/test

@nebril nebril added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Oct 20, 2023
@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 Oct 20, 2023
@nebril nebril force-pushed the pr/nebril/always-delete-aws-iptables branch from 9eabe18 to e915824 Compare October 20, 2023 09:54
@nebril
Copy link
Member Author

nebril commented Oct 20, 2023

/test

@nebril nebril added the needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch label Oct 20, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.4 Oct 20, 2023
@nebril nebril added dont-merge/blocked Another PR must be merged before this one. and removed dont-merge/blocked Another PR must be merged before this one. labels Oct 25, 2023
We recently introduced AWS-CONNMARK-CHAIN iptables rules deletion, but
didn't add them to an if statement guarding actual deletion.

Signed-off-by: Maciej Kwiek <maciej@isovalent.com>
This change causes Cilium DaemonSet postStart hook to always delete AWS
iptable rules unless `cni.chainingMode` is set to `aws-cni`.

This will result in the postStart hook being a noop in all non-AWS
deployments. Unfortunately there is no way for helm chart to know
whether it is running on AWS not in ENI mode.

This approach will make sure that we are deleting AWS-specific iptables
rules that cause issues while not requiring us to introduce new
configuration flags for users.

Signed-off-by: Maciej Kwiek <maciej@isovalent.com>
@nebril nebril force-pushed the pr/nebril/always-delete-aws-iptables branch from e915824 to 74632a5 Compare October 26, 2023 12:36
@nebril
Copy link
Member Author

nebril commented Oct 26, 2023

/test

@nebril
Copy link
Member Author

nebril commented Oct 27, 2023

All required checks passed, marking as ready to merge

@nebril nebril added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 27, 2023
@dylandreimerink dylandreimerink merged commit 6ab728d into main Oct 27, 2023
209 of 211 checks passed
@dylandreimerink dylandreimerink deleted the pr/nebril/always-delete-aws-iptables branch October 27, 2023 15:04
@pippolo84 pippolo84 mentioned this pull request Oct 30, 2023
9 tasks
@pippolo84 pippolo84 added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Oct 30, 2023
@jibi jibi added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Nov 7, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport done to v1.14 in 1.14.4 Nov 7, 2023
giorio94 added a commit to cilium/cilium-cli that referenced this pull request Jan 30, 2024
…low"

This reverts commit bbebbfa.

Let's revert the flush stale AWS-CNI iptables rules workaround, as this
operation is now automatically handled by Cilium [1,2]. Since bumping
the Cilium version used in the EKS workflows to one which includes all
fixes (v1.14.6), this workaround has also started failing, as the stale
rules attempted to be removed are no longer present.

[1]: cilium/cilium#28697
[2]: cilium/cilium#29448
giorio94 added a commit to cilium/cilium-cli that referenced this pull request Jan 30, 2024
…low"

This reverts commit bbebbfa.

Let's revert the flush stale AWS-CNI iptables rules workaround, as this
operation is now automatically handled by Cilium [1,2]. Since bumping
the Cilium version used in the EKS workflows to one which includes all
fixes (v1.14.6), this workaround has also started failing, as the stale
rules attempted to be removed are no longer present.

[1]: cilium/cilium#28697
[2]: cilium/cilium#29448

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
michi-covalent pushed a commit to cilium/cilium-cli that referenced this pull request Jan 30, 2024
…low"

This reverts commit bbebbfa.

Let's revert the flush stale AWS-CNI iptables rules workaround, as this
operation is now automatically handled by Cilium [1,2]. Since bumping
the Cilium version used in the EKS workflows to one which includes all
fixes (v1.14.6), this workaround has also started failing, as the stale
rules attempted to be removed are no longer present.

[1]: cilium/cilium#28697
[2]: cilium/cilium#29448

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
No open projects
1.14.4
Backport done to v1.14
Development

Successfully merging this pull request may close these issues.

Minor improvement: automatically cleanup stale AWS-CNI iptables rules in nodeinit
6 participants