forked from spring-projects/spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubernetes.yaml
56 lines (56 loc) · 1.28 KB
/
kubernetes.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
apiVersion: v1
kind: ConfigMap
metadata:
name: setup-script
namespace: kube-system
data:
setup.sh: |
echo "$TRUSTED_CERT" > /etc/ssl/certs/registry.crt && update-ca-certificates && systemctl restart containerd
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: kube-system
name: certs-setup
labels:
app: certs-setup
spec:
selector:
matchLabels:
app: certs-setup
template:
metadata:
labels:
app: certs-setup
spec:
hostPID: true
hostNetwork: true
initContainers:
- name: init-node
command: ["nsenter"]
args: ["--target", "1", "--mount", "--", "sh", "-c", "$(SETUP_SCRIPT)"]
image: debian
volumeMounts:
- name: registry-cert
mountPath: /tmp/registry
env:
- name: TRUSTED_CERT
valueFrom:
secretKeyRef:
name: certs-secret
key: tls.crt
- name: SETUP_SCRIPT
valueFrom:
configMapKeyRef:
name: setup-script
key: setup.sh
securityContext:
privileged: true
volumes:
- name: registry-cert
secret:
secretName: certs-secret
containers:
- name: wait
image: gcr.io/google-containers/pause:3.2