fix: check for double definition (cherry-pick #15670) #16271
Merged
+116
−0
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.
Cherry-picked fix: check for double definition (#15670)
As found in #13965 (and as a follow-up to #13999), we also need to
define what happens if both managedNamespaceMetadata and an
Application manifest are both defined for the same namespace.
The idea here is that if that happens, we emit an
ApplicationConditionRepeatedResourceWarning
, and set the sync statusto
Unknown
, since it's unclear what is supposed to happen.The user will then have the option of removing one of the two
definitions.
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
A simpler fix - don't add a managed namespace to the targetObjs list if
a namespace already exists in the application source.
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
This adds a test case showing that an ns manifest will override
managedNamespaceMetadata
without failing horribly (as it currentlydoes on
HEAD
), as well as a "standard" mNMd diff vs live.Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com