fix(operator): allow multiple keys of one Secret in spec.secrets - #6690
Open
lightsabit wants to merge 1 commit into
Open
lightsabit wants to merge 1 commit into
lightsabit wants to merge 1 commit into
Conversation
SecretRef entries are per-key -- name and key are both required -- and the env builder maps each entry to its own secretKeyRef, so referencing two keys of the same Secret is expected usage. The list was keyed on name only, so the API server rejected the second entry as a duplicate. Fixes stacklok#6686 Signed-off-by: lights <115397533+lightsabit@users.noreply.github.com>
lightsabit
requested review from
ChrisJBurns,
JAORMX,
blkt,
jerm-dro,
jhrozek,
rdimitrov,
reyortiz3 and
tgrunnagle
as code owners
September 18, 2026 13:24
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.
spec.secrets entries are per-key -- name and key are both required, and the operator's env builder turns each entry into its own secretKeyRef -- but the list was keyed on name only (#6686), so referencing two keys of the same Secret fails validation as a duplicate key.
This adds key to the list map keys and regenerates the CRDs. Existing objects already have unique names, so nothing changes for them.
I've been running the same list-map-keys change as a Helm post-renderer on a live 0.49.0 install for a few days; one MCPServer there references five keys of a single Secret.