-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ingress: fix foreground deletion of Ingress #29367
Merged
aanm
merged 2 commits into
cilium:main
from
mhofstetter:pr/mhofstetter/fix-ingress-foreground-deletion
Nov 24, 2023
Merged
ingress: fix foreground deletion of Ingress #29367
aanm
merged 2 commits into
cilium:main
from
mhofstetter:pr/mhofstetter/fix-ingress-foreground-deletion
Nov 24, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mhofstetter
added
kind/bug
This is a bug in the Cilium logic.
release-note/bug
This PR fixes an issue in a previous release of Cilium.
area/servicemesh
GH issues or PRs regarding servicemesh
feature/k8s-ingress
labels
Nov 24, 2023
mhofstetter
force-pushed
the
pr/mhofstetter/fix-ingress-foreground-deletion
branch
from
November 24, 2023 13:58
1ee885c
to
d78cfe6
Compare
Currently, when a shared Ingress resource (managed by Cilium) gets deleted via k8s foreground deletion (e.g. `kubectl delete ingress ... --cascade=foreground`) the corresponding shared CiliumEnvoyConfig in Ciliums namespace gets rewritten empty. This breaks all other shared Ingresses from working. The reason is an error in the condition that checks which Ingresses should be taken into account when building the model for the shared CiliumEnvoyConfig. The condition checks the `DeletionTimeStamp` (set via foreground deletion) from the modified Ingres instead of the one within the loop. In case of the foreground deletion this always evaluates to `true` - hence no entries in the CEC. This commit fixes the condition to check for any ongoing deletion on the Ingress that gets checked within the loop. Fixes: cilium#21386 Fixes: cilium#29306 Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
This commit moves the write of the log message about the deletion of a shared CiliumEnvoyConfig into the condition that checks whether it's a dedicated Ingress. This way, when deleting a shared Ingress, the irritating log message isn't displayed. Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
mhofstetter
force-pushed
the
pr/mhofstetter/fix-ingress-foreground-deletion
branch
from
November 24, 2023 14:13
d78cfe6
to
c73a60a
Compare
2 tasks
aanm
added
the
needs-backport/1.14
This PR / issue needs backporting to the v1.14 branch
label
Nov 24, 2023
/test |
meyskens
approved these changes
Nov 24, 2023
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.
LGTM
maintainer-s-little-helper
bot
added
the
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
label
Nov 24, 2023
mhofstetter
deleted the
pr/mhofstetter/fix-ingress-foreground-deletion
branch
November 24, 2023 17:35
joamaki
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
Nov 29, 2023
maintainer-s-little-helper
bot
moved this from Needs backport from main
to Backport pending to v1.14
in 1.14.5
Nov 29, 2023
github-actions
bot
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
Dec 1, 2023
maintainer-s-little-helper
bot
moved this from Backport pending to v1.14
to Backport done to v1.14
in 1.14.5
Dec 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects/v1.13
This issue affects v1.13 branch
area/servicemesh
GH issues or PRs regarding servicemesh
backport-done/1.14
The backport for Cilium 1.14.x for this PR is done.
feature/k8s-ingress
kind/bug
This is a bug in the Cilium logic.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/bug
This PR fixes an issue in a previous release of Cilium.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, when a shared Ingress resource (managed by Cilium) gets deleted via k8s foreground deletion (e.g.
kubectl delete ingress ... --cascade=foreground
) the corresponding shared CiliumEnvoyConfig in Ciliums namespace gets rewritten empty.This breaks all shared Ingresses from working.
The reason is an error in the condition that checks which Ingresses should be taken into account when building the model for the shared CiliumEnvoyConfig.
The condition checks the
DeletionTimeStamp
(set via foreground deletion) from the modified Ingress instead of the the one within the loop. In case of the foreground deletion this always evaluates totrue
(exclude) - hence no entries in the CEC.This commit fixes the condition to check for any ongoing deletion on the Ingress that gets checked within the loop.
Fixes: #21386
Fixes: #29306