Skip to content

feat: add imagePullSecrets.name to reference existing registry secrets#242

Merged
AqeelMuhammad merged 4 commits into
wso2:4.7.xfrom
AqeelMuhammad:fix/17320-imagepullsecret-name-4.7x
Jun 12, 2026
Merged

feat: add imagePullSecrets.name to reference existing registry secrets#242
AqeelMuhammad merged 4 commits into
wso2:4.7.xfrom
AqeelMuhammad:fix/17320-imagepullsecret-name-4.7x

Conversation

@AqeelMuhammad

Copy link
Copy Markdown
Contributor

Summary

  • Adds optional imagePullSecrets.name field to all chart values.yaml files (control-plane, traffic-manager, gateway, key-manager, all-in-one) and their default_values.yaml counterparts
  • When imagePullSecrets.name is set, the chart uses the named pre-existing secret directly instead of creating a new kubernetes.io/dockerconfigjson Secret from credentials
  • When imagePullSecrets.name is empty (default), existing credential-based behaviour is preserved — fully backward compatible

Motivation

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.yaml or modify chart source directly.

This change adds the missing name field alongside the existing username/password fields, 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 the 4.7.x branch.

Files changed

  • distributed/*/values.yaml — added imagePullSecrets.name: ""
  • distributed/*/templates/secrets/wso2am-secret-docker-registry.yaml — skip secret creation when name is set
  • distributed/*/templates/*/deployment.yaml — reference named secret when name is set
  • all-in-one/values.yaml, all-in-one/default_values.yaml, all-in-one/templates/... — same changes
  • resources/am-pattern-*/default_*_values.yaml (16 files) — added imagePullSecrets.name: ""

Test plan

  • helm lint passes on all 5 charts
  • helm template with imagePullSecrets.enabled=true,name=my-secret shows imagePullSecrets: [{name: my-secret}] and no registry auth Secret rendered
  • helm template with imagePullSecrets.enabled=true,username=u,password=p still renders the registry auth Secret and references it (backward compat)
  • helm template with imagePullSecrets.enabled=false renders no imagePullSecrets field (unchanged)

🤖 Generated with Claude Code

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
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fce45724-20cf-4d2b-8138-8de573577772

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AqeelMuhammad
AqeelMuhammad requested a review from kavindasr June 12, 2026 09:15
AqeelMuhammad and others added 2 commits June 12, 2026 14:47
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>
@AqeelMuhammad
AqeelMuhammad merged commit 9671dad into wso2:4.7.x Jun 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants