microscopic-river-74022
09/13/2023, 1:41 AMmicroscopic-river-74022
09/13/2023, 1:41 AMenv
field of your configuration. Here's an example:
yaml
kind: Deploy
type: helm
name: helm-deploy
...
spec:
env:
MY_SECRET_VAR:
secretRef:
name: my-secret
key: some-key-in-secret
In this example, MY_SECRET_VAR
is the name of the environment variable that will be created in the Helm chart. The secretRef
field is used to specify the name and key of the secret that you want to reference. The name
field should be the name of the Secret resource in your Kubernetes cluster, and the key
field should be the key in that Secret that contains the value you want to use.
Please note that you must create the Secret manually for the Pod to be able to reference it. For Kubernetes, this is commonly done using kubectl
. For example, to create a basic generic secret you could use:
bash
kubectl --namespace <my-app-namespace> create secret generic --from-literal=some-key-in-secret=foo
Where <my-app-namespace>
is your project namespace (which is either set with namespace
in your provider config, or defaults to your project name).
For more details, please refer to the official Kubernetes Secrets docs () and the Garden documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------