Ignore partition/namespace on SourceIntention list to match top-level compare logic#1804
Merged
Ignore partition/namespace on SourceIntention list to match top-level compare logic#1804
Conversation
ndhanushkodi
approved these changes
Dec 19, 2022
Contributor
There was a problem hiding this comment.
I think we just need a changelog, and are we planning to backport this? If so we'll need backport labels. 0.49.x of consul-k8s is supposed to work with 1.13.x and 1.12.x of Consul. I don't think we test with Consul 1.11.x anymore but in theory that should have worked with 0.49.x at some point.
Thanks for fixing, it looks great to me!
Contributor
|
Thanks I've added a backport label for 0.49.x and 1.0.x |
b0fcd67 to
7300245
Compare
wilkermichael
approved these changes
Dec 19, 2022
2 tasks
2 tasks
2 tasks
This was referenced May 31, 2023
Merged
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR updates the logic in
MatchesConsulfor intentions to add partition/namespace to the list of ignored fields for theSourceIntentionlist to match the ignored fields on the top-level config entry struct. This is to fix an issue where upgrading from Consul pre-1.12 to 1.12+ can trigger an update of all config entries due to the partition/namespace fields in theSourceIntentions from Consul being filled in as"default"instead of"".Here's what the entry coming from consul 1.12+ looks like:
And this is what consul-k8s generates via the ToConsul function:
How I've tested this PR:
Created a consul 1.11.1+ent cluster alongside consul-k8s with a couple basic service intention config entries, then upgraded to 1.12.3+ent. Without this change there's an update to each intention because of the diff/MatchesConsul returns false.
How I expect reviewers to test this PR:
Checklist: