-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ingress: Support shared load balancer mode #21386
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
Merged
Merged
Conversation
This file contains hidden or 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
8 tasks
Commit 81d68fcce45337ff943a072f790fa9e39a1bcecf 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 |
b87e15e
to
2b81064
Compare
f88e64d
to
b7b1070
Compare
b693af8
to
993dac6
Compare
8 tasks
a125bd9
to
cd01c15
Compare
sayboras
added a commit
to sayboras/cilium
that referenced
this pull request
Jan 17, 2023
This is to avoid any potential version drift in CI. The setup action (e.g. medyagh/setup-minikube) is maintained by Minikube maintainers. Relates: cilium#21386 (comment) Signed-off-by: Tam Mach <tam.mach@cilium.io>
ldelossa
pushed a commit
that referenced
this pull request
Jan 19, 2023
This is to avoid any potential version drift in CI. The setup action (e.g. medyagh/setup-minikube) is maintained by Minikube maintainers. Relates: #21386 (comment) Signed-off-by: Tam Mach <tam.mach@cilium.io>
aanm
pushed a commit
that referenced
this pull request
Jan 23, 2023
[ upstream commit 38b9961 ] This is to avoid any potential version drift in CI. The setup action (e.g. medyagh/setup-minikube) is maintained by Minikube maintainers. Relates: #21386 (comment) Signed-off-by: Tam Mach <tam.mach@cilium.io> Signed-off-by: André Martins <andre@cilium.io>
aanm
pushed a commit
that referenced
this pull request
Jan 23, 2023
[ upstream commit 38b9961 ] This is to avoid any potential version drift in CI. The setup action (e.g. medyagh/setup-minikube) is maintained by Minikube maintainers. Relates: #21386 (comment) Signed-off-by: Tam Mach <tam.mach@cilium.io> Signed-off-by: André Martins <andre@cilium.io>
sayboras
added a commit
to sayboras/cilium
that referenced
this pull request
Jan 26, 2023
This is to avoid any potential version drift in CI. The setup action (e.g. medyagh/setup-minikube) is maintained by Minikube maintainers. [upstream commit] a37c0b4 Relates: cilium#21386 (comment) Signed-off-by: Tam Mach <tam.mach@cilium.io>
mhofstetter
added a commit
to mhofstetter/cilium
that referenced
this pull request
Nov 24, 2023
Currently, when a shared Ingress resource (managed by Cilium) gets deleted via k8s foreground deletion (e.g. `kubectl delete ingress ... --cascade=false`) 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 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>
mhofstetter
added a commit
to mhofstetter/cilium
that referenced
this pull request
Nov 24, 2023
Currently, when a shared Ingress resource (managed by Cilium) gets deleted via k8s foreground deletion (e.g. `kubectl delete ingress ... --cascade=false`) 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>
mhofstetter
added a commit
to mhofstetter/cilium
that referenced
this pull request
Nov 24, 2023
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>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 24, 2023
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: #21386 Fixes: #29306 Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
joamaki
pushed a commit
that referenced
this pull request
Nov 29, 2023
[ upstream commit 804d15e ] 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: #21386 Fixes: #29306 Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com> Signed-off-by: Jussi Maki <jussi@isovalent.com>
joamaki
pushed a commit
that referenced
this pull request
Nov 30, 2023
[ upstream commit 804d15e ] 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: #21386 Fixes: #29306 Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com> Signed-off-by: Jussi Maki <jussi@isovalent.com>
joamaki
pushed a commit
that referenced
this pull request
Nov 30, 2023
[ upstream commit 804d15e ] 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: #21386 Fixes: #29306 Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com> Signed-off-by: Jussi Maki <jussi@isovalent.com>
aanm
pushed a commit
that referenced
this pull request
Dec 1, 2023
[ upstream commit 804d15e ] 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: #21386 Fixes: #29306 Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com> Signed-off-by: Jussi Maki <jussi@isovalent.com>
pjablonski123
pushed a commit
to pjablonski123/cilium
that referenced
this pull request
Dec 15, 2023
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>
pchaigno
pushed a commit
that referenced
this pull request
Jan 8, 2024
[ upstream commit 804d15e ] 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: #21386 Fixes: #29306 Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com> Signed-off-by: Jussi Maki <jussi@isovalent.com>
mhofstetter
added a commit
to mhofstetter/cilium
that referenced
this pull request
Feb 13, 2024
The following Ingress annotations aren't actually used by any Ingress related logic. - `ingress.cilium.io/tcp-keep-alive` - `ingress.cilium.io/tcp-keep-alive-idle` - `ingress.cilium.io/tcp-keep-probe-interval` - `ingress.cilium.io/tcp-keep-probe-max-failures` - `ingress.cilium.io/websocket` Support has been removed with cilium#21386, while introducing the shared loadbalancer support. Therefore, this commit uses the unused annotations and their functionality. Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
mhofstetter
added a commit
to mhofstetter/cilium
that referenced
this pull request
Feb 21, 2024
The following Ingress annotations aren't actually used by any Ingress related logic. - `ingress.cilium.io/tcp-keep-alive` - `ingress.cilium.io/tcp-keep-alive-idle` - `ingress.cilium.io/tcp-keep-probe-interval` - `ingress.cilium.io/tcp-keep-probe-max-failures` - `ingress.cilium.io/websocket` Support has been removed with cilium#21386, while introducing the shared loadbalancer support. Therefore, this commit uses the unused annotations and their functionality. Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 22, 2024
The following Ingress annotations aren't actually used by any Ingress related logic. - `ingress.cilium.io/tcp-keep-alive` - `ingress.cilium.io/tcp-keep-alive-idle` - `ingress.cilium.io/tcp-keep-probe-interval` - `ingress.cilium.io/tcp-keep-probe-max-failures` - `ingress.cilium.io/websocket` Support has been removed with #21386, while introducing the shared loadbalancer support. Therefore, this commit uses the unused annotations and their functionality. Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/servicemesh
GH issues or PRs regarding servicemesh
release-note/major
This PR introduces major new functionality to 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.
Description
The current implementation of Ingress reconciliation in Cilium creates a LoadBalancer Service per Ingress resource. This is not the most efficient use of resources, and can be made much more efficient by sharing a single LoadBalancer config across all Ingress resources in the cluster.
The goal of this PR is to support shared and dedicated mode, which are as per below:
In the shared mode, if there is any conflicting with path/host, the request will be still load balancing to respective backends equally.
Fixes: #21270
Tasks
Documentation tasks can be done in subsequent PRs or after first round of review
ingress.cilium.io/loadbalancer-mode:shared|dedicated
. The default for if that annotation is not present will be shared, since that's how most ingress controllers work.dedicated
orshared
. This will default todedicated
for now.Testing
Two conformance tests in GHA give the coverage of running Ingress in one mode.
Manual testing is done to make sure that there is no issue when users toggle LB mode for particular Ingress. Please find below the details
Toggle LB mode from shared to dedicated LB mode
Toggle LB mode from dedicate to shared LB mode (Continued from previous testing)