-
Notifications
You must be signed in to change notification settings - Fork 0
/
pod-spec.yml
50 lines (50 loc) · 1.41 KB
/
pod-spec.yml
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
44
45
46
47
48
49
50
---
apiVersion: v1
kind: Pod
metadata:
name: vault-agent-example
spec:
serviceAccountName: internal-app
restartPolicy: Never
volumes:
- name: vault-token
emptyDir:
medium: Memory
- name: config
configMap:
name: example-vault-agent-config
items:
- key: vault-agent-config.hcl
path: vault-agent-config.hcl
- name: shared-data
emptyDir: {}
containers:
# Vault container
- name: vault-agent-auth
image: vault
volumeMounts:
- name: config
mountPath: /etc/vault
- name: vault-token
mountPath: /home/vault
- name: shared-data
mountPath: /etc/secrets
# If Vault is running on a Vagrant VM with forwarded port on localhost:8282 as configured in VagrantFile. "${VAULT_SERVER_ADDR}"
# To access services in two different namespaces you can use url like this: HTTP://<your-service-name>.<namespace-with-that-service>.svc.cluster.local
env:
- name: VAULT_ADDR
value: http://vault-internal.vault.svc.cluster.local:8200
# Run the Vault agent
args:
[
"agent",
"-config=/etc/vault/vault-agent-config.hcl",
#"-log-level=debug",
]
- name: nginx-container
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: shared-data
mountPath: /usr/share/nginx/html