fix failures during upgrade when using the default provided IngressClass and IngressClassParam #2732
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.
Issue
#2731
Description
This change will disable usage of IngressClassParams in the default provided "alb" IngressClass by default(unless the IngressClassParams have name/spec customized)
The IngressClassParams will continue to be created by default as well to avoid potential race conditions while update from a version that were already using the
alb
IngressClassParamsAlso, if IngressClassParams is been used by IngressClass, the change will create the IngressClassParams first[this is not 100% safe since Kubernetes don't guarantee controllers receive events about different objects in order, a controller change is needed for it, see #2731]
The IngressClassParams will only be used by the default provided "alb" IngressClass when one of following condition is true:
IngressClassParams.create == false
andIngressClassParams.name != ""
, this means the "alb" IngressClass will be configured to use a pre-exists IngressClassParams.IngressClassParams.create == false
and (IngressClassParams.name != ""
orIngressClassParams.spec != {}
), this means the "alb" IngressClass will be configured to use a new created IngressClassParams that have customizations. (otherwise, there is no need to makealb
IngressClass reference the IngressClassParams if there is no customization)Upgrade scenarios:
alb
IngressClass andalb
IngressClassParams created, and thealb
is not configured to use thealb
IngressClassParams. [this is safe]1.3.1-1.3.3
ingressClassParams.spec
, the default provided "alb" IngressClass will be configured to use the newly created "alb" IngressClassParam after its creation. [in theory this may not be safe, but should be fine as we don't expect users to explicitly modify the default provided IngressClassParams while have Ingresses currently using it]1.4.0-1.4.2
alb
IngressClass andalb
IngressClassParamsalb
IngressClassParams. [this is safe since using a IngressClassParams without configuration is same as don't use IngressClassParams]ingressClassParams.spec
, no change will done.Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯