forked from bank-vaults/bank-vaults
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-deployment.yaml
More file actions
43 lines (43 loc) · 1.43 KB
/
test-deployment.yaml
File metadata and controls
43 lines (43 loc) · 1.43 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
36
37
38
39
40
41
42
43
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-skip-verify: "false"
# vault.security.banzaicloud.io/vault-role: "default"
# vault.security.banzaicloud.io/vault-path: "kubernetes"
# vault.security.banzaicloud.io/vault-agent: "true"
spec:
initContainers:
- name: init-ubuntu
image: ubuntu
command: ["sh", "-c", "echo $AWS_SECRET_ACCESS_KEY && echo initContainers ready"]
env:
- name: AWS_SECRET_ACCESS_KEY
value: vault:secret/data/accounts/aws#${.AWS_SECRET_ACCESS_KEY} # Go templates are also supported with ${} delimiters
resources:
limits:
memory: "128Mi"
cpu: "100m"
containers:
- name: alpine
image: alpine
command: ["sh", "-c", "echo $AWS_SECRET_ACCESS_KEY && echo going to sleep... && sleep 10000"]
env:
- name: AWS_SECRET_ACCESS_KEY
value: vault:secret/data/accounts/aws#AWS_SECRET_ACCESS_KEY
resources:
limits:
memory: "128Mi"
cpu: "100m"