-
Notifications
You must be signed in to change notification settings - Fork 18
/
deployment-volume.yaml
42 lines (42 loc) · 1.32 KB
/
deployment-volume.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
42
apiVersion: apps/v1
kind: Deployment
metadata:
name: doppler-test-deployment-volume
annotations:
secrets.doppler.com/reload: 'true'
spec:
replicas: 2
selector:
matchLabels:
app: doppler-test
template:
metadata:
labels:
app: doppler-test
spec:
volumes:
- name: secret-volume
secret:
secretName: doppler-test-secret # Kubernetes secret name
containers:
- name: doppler-test
image: alpine
command: # ['/bin/sh', '-c', 'apk add --no-cache tini > /dev/null 2>&1 && ls /etc/secrets | grep -v KUBERNETES_&& tini -s tail -f /dev/null'] # List all non-Kubernetes secret files
- /bin/sh
- -c
- apk add --no-cache tini > /dev/null 2>&1 &&
echo "### This is a simple deployment running with these mounted secret files:" &&
(for f in $(find /etc/secrets -type f); do echo $f && cat $f && echo ""; done) &&
tini -s tail -f /dev/null
imagePullPolicy: Always
volumeMounts:
- name: secret-volume
mountPath: /etc/secrets
readOnly: true
resources:
requests:
memory: '250Mi'
cpu: '250m'
limits:
memory: '500Mi'
cpu: '500m'