forked from bank-vaults/bank-vaults
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-deploy-ct.yaml
More file actions
52 lines (50 loc) · 1.27 KB
/
test-deploy-ct.yaml
File metadata and controls
52 lines (50 loc) · 1.27 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
44
45
46
47
48
49
50
51
52
apiVersion: apps/v1
kind: Deployment
metadata:
name: consul-template-pki
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: consul-template-pki
template:
metadata:
labels:
app.kubernetes.io/name: consul-template-pki
annotations:
vault.security.banzaicloud.io/vault-addr: "https://vault:8200"
vault.security.banzaicloud.io/vault-tls-secret: vault-tls
vault.security.banzaicloud.io/vault-ct-configmap: consul-template-pki
spec:
containers:
- name: alpine
image: alpine
command: ["sh", "-c", "apk add openssl; while true; do openssl x509 -text -noout -in /vault/secrets/my-server.crt; echo; sleep 5; done"]
resources:
limits:
memory: "128Mi"
cpu: "100m"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: consul-template-pki
labels:
app.kubernetes.io/name: consul-template-pki
data:
config.hcl: |
vault {
ssl {
ca_cert = "/vault/tls/ca.crt"
}
retry {
backoff = "1s"
}
}
template {
contents = <<EOH
{{- with secret "pki/issue/default" "common_name=localhost" -}}
{{ .Data.certificate }}{{- end -}}
EOH
destination = "/vault/secrets/my-server.crt"
}