forked from bank-vaults/bank-vaults
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-dynamic-env-vars.yaml
More file actions
35 lines (34 loc) · 1.02 KB
/
test-dynamic-env-vars.yaml
File metadata and controls
35 lines (34 loc) · 1.02 KB
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
#
# NOTE: Use this example with operator/deploy/cr-mysql-ha.yaml Vault CR
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-secrets
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: hello-secrets
template:
metadata:
labels:
app.kubernetes.io/name: hello-secrets
annotations:
vault.security.banzaicloud.io/vault-addr: "https://vault:8200"
vault.security.banzaicloud.io/vault-tls-secret: vault-tls
vault.security.banzaicloud.io/vault-env-daemon: "true"
spec:
initContainers:
containers:
- name: mysql-client
image: mysql:5.7
command: ["sh", "-c", "echo mysql -h mysql -u ${MYSQL_USERNAME} -p${MYSQL_PASSWORD} && echo going to sleep... && sleep 10000"]
env:
- name: MYSQL_USERNAME
value: vault:database/creds/app#username
- name: MYSQL_PASSWORD
value: vault:database/creds/app#password
resources:
limits:
memory: "128Mi"
cpu: "100m"