Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ajeetraina/347a211c50a33949ecb2ed0112439dcd to your computer and use it in GitHub Desktop.
Save ajeetraina/347a211c50a33949ecb2ed0112439dcd to your computer and use it in GitHub Desktop.
spec:
template:
spec:
containers:
- name: my-container
image: my-image
env:
- name: VARIABLE1
valueFrom:
configMapKeyRef:
name: my-configmap
key: variable1
- name: VARIABLE2
valueFrom:
configMapKeyRef:
name: my-configmap
key: variable2
- name: VARIABLE3
value: $(VARIABLE2).$(VARIABLE1 | cut -d '.' -f 1)
# Rest of your deployment configuration
@ajeetraina
Copy link
Author

Define a ConfigMap YAML file

apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
data:
variable1: dzv4019256.iad.icprod.orcindustry.com
variable2: www.xxxxx.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment