I am trying to see if i can store my docker secrets in doppler and pull. Here is what i am looking for
there is a docker secret which i included in the helm chart as a secret.yaml file and it contains base64 encoded artifactory credentials to pull the images from private registry during helm install. since currently if there is any update in the credentials i need to get the new creds and encode to base64 and update in each and every secret.yaml file.
Is there any way i can manage to update the secret from doppler ?
Here is my secret.yaml file which i included in helm charts but i am trying to manage this secret from doppler can you please help me how i can do it ?
You could use envsubst (part of the gettext package) which takes a file as an input and replaces any matching environment variables inside the file.
Here is an example of how you could achieve what you’re after in a single command, including base64 encoding the secret value from Doppler and creating the secret in Kubernetes without the secret value ever touching the file system.
Your template would be largely the same, but it now has an environment variable placeholder:
thank you @ryan-blunden the approach you suggested is working fine but sync is not happening. let’s say if i update the secret in doppler the sync is not happening automatically i need to run this command every time to get the updated value.
Our Kubernetes operator only supports the ‘Opaque’ type secret at the moment but I’ll speak engineering as to how we could look at supporting the other secret types.
How often do you expect your Artifactory credentials to change?
You could set up a crude sync in the meantime by using something like a scheduled GitHub Action that recreates the secret every 5 mins for example.
As an experiment, I’ve created an implementation that uses a Kubernetes CronJob to perform automated syncing of the Doppler secret containing Docker registry credentials to a Kubernetes cluster.
I’d be really interested if you could give this a try as this could be a good interim solution until official support lands in our Kubernetes Operator.
Not sure if it is the right place to post, but it would be awesome if Doppler could handle other secret Types in Kubernetes such kubernetes.io/dockerconfigjson