garnet icon indicating copy to clipboard operation
garnet copied to clipboard

Helm Chart: Add support for configuration from a secret

Open MartinHell opened this issue 1 year ago • 4 comments
trafficstars

Hi,

I noticed there's no support for using garnet.conf instead of command line arguments. This aims to fix that by adding support for a secret or using an existingSecret.

If you configure Auth and Passwords currently you can't really store the values.yaml in version control since it would contain the password in clear text. This will allow you to add sensitive information (password) to a secret, you could store it using SealedSecrets or something similar in git and apply that secret alongside the helm chart for example.

Hopefully this is appreciated :)

MartinHell avatar Jul 25 '24 07:07 MartinHell

@microsoft-github-policy-service agree

MartinHell avatar Jul 29 '24 11:07 MartinHell

cc @babykart @nicholih for review

badrishc avatar Aug 05 '24 15:08 badrishc

We are already in a helm chart called garnet so let's avoid any potential confusion or repetition (?).

config:
  # -- Garnet secret (if you want to use an existing secret)
  # Make sure the key in the secret is 'garnet.conf'
  existingSecret: ""
  # -- The garnet.conf data content.
  garnetConf: ""
  # garnetConf: |
  #   {
  #     "AuthenticationMode": "Password",
  #     "Password": ""
  #   }

babykart avatar Aug 05 '24 18:08 babykart

The idea seems right but we should use existing charts as pointed out by @babykart . Generally how we do it in Kubernetes is to have a sidecar init container where we fetch the secrets (say from Azure Key Vault) based on secret name and keyvault name. We use the ACL mode to apply it as a file mount during startup. For just password usage, something similar can be done by updating the garnet.conf in place. It might be something you want to do using dependent helm charts so that you can add your chart while referring garnet one?

msft-paddy14 avatar Aug 07 '24 16:08 msft-paddy14

We have a Helm chart package release now thanks to @babykart. Would be great to see support for configuration files and secrets added to that, as discussed in #594. Closing this one for now. Thank you!

badrishc avatar Dec 05 '24 01:12 badrishc