-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
operator: Fix logic used to sync Cilium's IngressClass on startup
This commit introduces changes to the ingress class manager piece of the ingress controller, in order to address bugs impacting the proper synching of Cilium's IngressClass during start up. The following changes are made: * Replace use of an Informer with Resource[T] for IngressClass. This helps simplify the logic used to perform the initial sync. * Move the responsibility of tracking if Cilium should act as the default IngressClass into the ingress class manager, rather than having the ingress controller track this itself when processing IngressClass events. After the ingress class manager is constructed, the ingress controller will be able to determine if Cilium is the default IngressClass for a cluster through the ingress class manager. The ingress controller no longer was to wait to process an event for Cilium's IngressClass to learn if Cilium should be the default. Before this commit, the ingress controller would process all Ingress resources before processing IngressClass resources. This is because the Ingress resource informer would be started before the ingress class manager, so all events related to Ingress resources would appear in the ingress controller's event queue before events relating to IngressClass resources. This presented a problem, because the ingress controller would always believe that it was not the default IngressClass for a cluster on startup while processing each Ingress resource for the first time. This could lead to the following situation: 1. The ingress controller processes all Ingress resources. 2. The ingress controller processes IngressClass resources, and learns that it should act as the default IngressClass for the cluster. 3. A resync of Ingress resources is triggered. This double-sync overhead can act as a problem for large-scale clusters. Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
- Loading branch information
1 parent
8c86d07
commit d1f8d79
Showing
7 changed files
with
554 additions
and
252 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.