fix: ignore container ordering for pod diff #499
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's in this PR?
This PR adds logic to check if a diff between the current and desired pod only contains container and/or init container ordering information. If so, it will ignore the diff and proceed as if the pod is in sync with the spec.
Why?
This PR fixes an issue where the Istio logic can result in an infinite reconciliation loop due to the ordering of containers and/or init containers not matching the desired pod spec. Prior work addressed other issues related to Istio injection, see #476
Additional context
Testing in #476 missed this case due to environment variance that has since been addressed. This issue is reliably reproducible. This logic has been tested against Istio and non-Istio NiFi deployments.
Checklist