fix(trafficrouting): add nil check for desired annotations map in ALB… #3853
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.
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.Bug description
Sometimes, the argo-rollouts controller goes into a loop of panicking/recovering from panic when creating a new Rollout object.
The Rollout object is created and is stuck in the
Progressing
state, the replicaset is created as well, except that it's stuck with.spec.replicas
= 0.To Reproduce
To reproduce, create any simple Rollout object that references an ALB ingress. Make sure that the ingress has no annotations present on it (this is not the case when applying through
kubectl
, since akubectl.kubernetes.io/last-applied-configuration
is added by default. This is the case however when creating through, for example, ArgoCD, with no desired annotations of mine to add.You can create through
kubectl
and manually delete the annotation before creating the Rollout object referencing the ingress to test the behavior.This is currently happening on the latest v1.7.2
Logs
Testing
I have built the image and tested the behavior and it's working as expected.