feat: introduce priorityPolicy in merge rewrite#5329
Merged
Conversation
Signed-off-by: Riccardo M. Cefala <riccardo.c@miro.com>
Signed-off-by: Riccardo M. Cefala <riccardo.c@miro.com>
bharath-b-rh
approved these changes
Sep 23, 2025
|
|
||
| // Used to define the policy when a key in the priority list does not exist in the input. | ||
| // +optional | ||
| // +kubebuilder:default="Strict" |
Contributor
There was a problem hiding this comment.
nit: Should we add an enum for supported values?
// +kubebuilder:validation:Enum:="IgnoreNotFound";"Strict"
Member
Author
There was a problem hiding this comment.
I think is a good idea, and to be honest I was even about to add it... however other Enums are also not specified, so in the end I didn't do it.
We could definitely take a sweep and do it for all Enums, however I'd rather do it in another PR.
I'll create an issue for that.
Member
Author
There was a problem hiding this comment.
Actually, I just went ahead and added them. There was only one missing from other APIs, so I just did it.
Signed-off-by: Riccardo M. Cefala <riccardo.cefala@gmail.com>
5b0dd53 to
b54dd3a
Compare
Signed-off-by: Riccardo M. Cefala <riccardo.c@miro.com>
063cbbf to
a5015f4
Compare
|
Skarlso
approved these changes
Sep 25, 2025
SamuelMolling
pushed a commit
to SamuelMolling/external-secrets
that referenced
this pull request
Oct 24, 2025
* introduce priorityPolicy in merge rewrite Signed-off-by: Riccardo M. Cefala <riccardo.c@miro.com> * make reviewable Signed-off-by: Riccardo M. Cefala <riccardo.c@miro.com> * update documentation for priorityPolicy Signed-off-by: Riccardo M. Cefala <riccardo.cefala@gmail.com> * add some missing kubebuilder Enum validation directives Signed-off-by: Riccardo M. Cefala <riccardo.c@miro.com> --------- Signed-off-by: Riccardo M. Cefala <riccardo.c@miro.com> Signed-off-by: Riccardo M. Cefala <riccardo.cefala@gmail.com> Signed-off-by: Samuel Molling <samuelmolling@gmail.com>
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.



Problem Statement
Introduce
priorityPolicyallowing user to control behavior when keys specified inprioritylist cannot be found in the source secret.Related Issue
Implements #5326
Proposed Changes
The current behavior is to error out and fail the merge when a key specified in the priority list is not found in the source secret. This is retained as default behavior indicated as
Strict. With the changes in this PR users can decide to ignore errors usingIgnoreNotFoundaspriorityPolicy.Checklist
git commit --signoffmake testmake reviewable