Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

Combining ENV variables in helm chart

$
0
0

Based on this SO, this should work and I'm not sure what I'm missing.

I'm trying to combine env variables in a helm chart. TARGET and TARGET_KEY, but I'm getting:

 - name: TARGET_KEY # combining keys together   value: Hello $(TARGET)

I'm expecting

 - name: TARGET_KEY # combining keys together   value: Hello World
apiVersion: serving.knative.dev/v1kind: Servicemetadata:  name: hello  namespace: myappspec:  template:    metadata:      annotations:        autoscaling.knative.dev/minScale: "1"        autoscaling.knative.dev/target: "10"    spec:       containers:        - image: gcr.io/knative-samples/helloworld-go          ports:            - containerPort: 8080          env:            - name: TARGET              value: "World"            - name: APIKEY              valueFrom: # get single key from secret at key                secretKeyRef:                  name: {{ .Values.keys.name }}                  key: apiKey            - name: TARGET_KEY # combining keys together              value: Hello $(TARGET)          envFrom: # set ENV variables from all the values in secret            - secretRef:                name: {{ .Values.keys.name }}

I am using ArgoCD to sync the helm charts. Checking the newly deployed pod's ENV vars.


Viewing all articles
Browse latest Browse all 12231

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>