-
Notifications
You must be signed in to change notification settings - Fork 18
/
deployment-valuefrom.yaml
41 lines (41 loc) · 1.21 KB
/
deployment-valuefrom.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
apiVersion: apps/v1
kind: Deployment
metadata:
name: doppler-test-deployment-valuefrom
annotations:
secrets.doppler.com/reload: 'true'
spec:
replicas: 2
selector:
matchLabels:
app: doppler-test
template:
metadata:
labels:
app: doppler-test
spec:
containers:
- name: doppler-test
image: alpine
command:
- /bin/sh
- -c
# Print all non-Kubernetes environment variables
- apk add --no-cache tini > /dev/null 2>&1 &&
echo "### This is a simple deployment running with this env:" &&
printenv | grep -v KUBERNETES_ &&
tini -s tail -f /dev/null
imagePullPolicy: Always
env:
- name: DOPPLER_CONFIG # The name of the environment variable exposed in the container
valueFrom:
secretKeyRef:
name: doppler-test-secret # Kubernetes secret name
key: DOPPLER_CONFIG # The name of the key in the Kubernetes secret
resources:
requests:
memory: '250Mi'
cpu: '250m'
limits:
memory: '500Mi'
cpu: '500m'