🔨 Fix pod template labels mutator 🔨 #256
Merged
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.
What
When the existing deployment template label has few extra labels, the pod template label mutator was returning
true
to update the resource even when there was no update to be done. The extra few labels are preserved by the mutator. That apparently little issue of reporting "update" when it should not had secondary effects. The status controller would never set the status as Ready because it is being told that there is an update still going on.Verifications steps
Checkout this branch
Run cluster
kubectl wait --timeout=300s --for=condition=Ready authorino authorino
kubectl patch deployment authorino --type=merge --patch '{"spec": {"template": {"metadata": {"labels": {"foo": "bar", "foo2": "bar2"}}}}}'
kubectl wait --timeout=300s --for=condition=Ready authorino authorino
If authorino CR gets the
Ready
condition in status, the fix worked. If trying out the same verification steps with current HEAD ofmain
, the authorino status looks like this: