Skip to content

Conversation

richardmoe
Copy link

This pull request adds support for using an existing Kubernetes Secret for Docker Registry credentials and configuration, instead of always creating a new one. This makes it easier to manage secrets externally and improves flexibility for deployments. The documentation, templates, and values have all been updated to reflect this new option.

Key changes include:

Support for Existing Secret:

  • Added a new existingSecret value in values.yaml and documented its usage in README.md, allowing users to specify the name of a pre-existing Kubernetes Secret for registry credentials. [1] [2]
  • Updated all secret references in _helpers.tpl to use the new docker-registry.secretName template, which chooses between the existing secret and the default generated secret. [1] [2] [3] [4] [5] [6]

Template and Resource Adjustments:

  • Modified secret.yaml to only create a new Secret if existingSecret is not set, preventing duplicate or unnecessary secrets. [1] [2]
  • Updated deployment.yaml and cronjob.yaml to only annotate with the secret checksum when a new secret is created, ensuring correct rolling updates. [1] [2]
  • Added a note in NOTES.txt to inform users when an existing secret is being used, with a reminder about required keys.

Version Bump:

  • Bumped chart and app versions to 3.1.0 to reflect the new feature.

Gridness added a commit to Gridness/docker-registry-helm that referenced this pull request Sep 17, 2025
- Fixed a bug found in pull request twuni#185 where if an existing secret was defined, its data wasn't mounted to the deployment and env vars referencing to the auth credentials location inside containers were not created
- Fixed multiple whitespace and indenation issues during templating when specifying custom fields for existing secrets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant