Backport of Ignore partition/namespace on SourceIntention list to match top-level compare logic into release/1.0.x#1807
Merged
hc-github-team-consul-ecosystem merged 2 commits intorelease/1.0.xfrom Dec 19, 2022
Conversation
8b3ee24 to
79e5a71
Compare
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.
Backport
This PR is auto-generated from #1804 to be assessed for backporting due to the inclusion of the label backport/1.0.x.
The below text is copied from the body of the original PR.
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:
Overview of commits