feat: add imagePullSecrets.name to reference existing registry secrets#242
Merged
AqeelMuhammad merged 4 commits intoJun 12, 2026
Merged
Conversation
Adds an optional imagePullSecrets.name field to all distributed charts (acp, tm, ugw, km), all-in-one chart, and all resource pattern default values files. When set, the chart skips creating a new dockerconfigjson Secret and references the named secret directly, allowing users to use pre-existing or externally-managed image pull secrets (e.g. sealed secrets, cloud-provider secrets). When name is empty the existing username/password credential-based behaviour is unchanged. Closes #17320
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kavindasr
approved these changes
Jun 12, 2026
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.
Summary
imagePullSecrets.namefield to all chartvalues.yamlfiles (control-plane, traffic-manager, gateway, key-manager, all-in-one) and theirdefault_values.yamlcounterpartsimagePullSecrets.nameis set, the chart uses the named pre-existing secret directly instead of creating a newkubernetes.io/dockerconfigjsonSecret from credentialsimagePullSecrets.nameis empty (default), existing credential-based behaviour is preserved — fully backward compatibleMotivation
Customers deploying APIM Helm charts in environments with centrally-managed image pull secrets (e.g. via Sealed Secrets, Vault, or corporate CI/CD pipelines) currently have no way to reference an existing secret by name. They must either supply raw credentials in
values.yamlor modify chart source directly.This change adds the missing
namefield alongside the existingusername/passwordfields, making both workflows available without breaking any existing deployment.Note: a similar change is proposed in #202 for
main; this PR backports the equivalent fix to the4.7.xbranch.Files changed
distributed/*/values.yaml— addedimagePullSecrets.name: ""distributed/*/templates/secrets/wso2am-secret-docker-registry.yaml— skip secret creation whennameis setdistributed/*/templates/*/deployment.yaml— reference named secret whennameis setall-in-one/values.yaml,all-in-one/default_values.yaml,all-in-one/templates/...— same changesresources/am-pattern-*/default_*_values.yaml(16 files) — addedimagePullSecrets.name: ""Test plan
helm lintpasses on all 5 chartshelm templatewithimagePullSecrets.enabled=true,name=my-secretshowsimagePullSecrets: [{name: my-secret}]and no registry auth Secret renderedhelm templatewithimagePullSecrets.enabled=true,username=u,password=pstill renders the registry auth Secret and references it (backward compat)helm templatewithimagePullSecrets.enabled=falserenders noimagePullSecretsfield (unchanged)🤖 Generated with Claude Code