project-zot / helm-charts

7 stars 19 forks source link

feat: allow to mount several external secrets #12

Closed loicalbertin closed 1 year ago

loicalbertin commented 1 year ago

Description of changes

added a new externalSecrets value. This value is a list of tuples that defines a "secretName" and a "mountPath". "secretName" references a secret within the same namespace than the Zot container and "mountPath" specifies the path within the container filesystem where the secret is mounted.

Chart version bumped to 0.1.29.

Fixes #10

I already proposed PR #11 to fix #10, but my personal preference goes to this PR.

To be noted that this PR has 0 impacts on mountSecret and secretFiles and can be use along with them.

How to use it

Within values.yaml, externalSecrets can be speficied this way:

externalSecrets:
  - secretName: "secret1"
    mountPath: "/secrets/s1"
  - secretName: "secret2"
    mountPath: "/secrets/s2"

A command line flags equivalent would be:

--set externalSecrets.0.secretName=secret1 --set externalSecrets.0.mountPath=/secrets/s1 --set externalSecrets.1.secretName=secret2 --set externalSecrets.1.mountPath=/secrets/s2
rchincha commented 1 year ago

@loicalbertin I like this better, so in future should there be more secrets, there is a way to handle/mount it.

rchincha commented 1 year ago

@loicalbertin , PR #14 has been merged, so pls rebase and bump up the chart version again.

loicalbertin commented 1 year ago

@rchincha done!

rchincha commented 1 year ago

@loicalbertin Thanks for your PRs. Now available to www @ https://artifacthub.io/packages/helm/zot/zot

If you do find other issues or interesting features that you would like to add, pls do.