-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathcluster-backup-job.yaml
93 lines (91 loc) · 2.87 KB
/
cluster-backup-job.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
apiVersion: batch/v1
kind: Job
metadata:
name: cluster-backup-job
namespace: openshift-etcd
labels:
app: cluster-backup-job
backup-name: templated
spec:
template:
spec:
initContainers:
- name: verify-storage
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
command: [ "cluster-etcd-operator", "verify", "backup-storage" ]
securityContext:
privileged: true
resources:
requests:
memory: 50Mi
cpu: 5m
volumeMounts:
- mountPath: /etc/kubernetes/cluster-backup
name: etc-kubernetes-cluster-backup
- mountPath: /var/run/secrets/etcd-client
name: etcd-client
- mountPath: /var/run/configmaps/etcd-ca
name: etcd-ca
containers:
- name: cluster-backup
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
command:
- /bin/sh
- -c
- |
#!/bin/sh
set -exuo pipefail
cluster-etcd-operator cluster-backup --backup-dir "${CLUSTER_BACKUP_PATH}"
resources:
requests:
memory: 80Mi
cpu: 10m
securityContext:
privileged: true
volumeMounts:
- mountPath: /usr/local/bin
name: usr-local-bin
- mountPath: /etc/kubernetes/static-pod-resources
name: resources-dir
- mountPath: /etc/kubernetes/static-pod-certs
name: cert-dir
- mountPath: /etc/kubernetes/manifests
name: static-pod-dir
- mountPath: /etc/kubernetes/cluster-backup
name: etc-kubernetes-cluster-backup
- mountPath: /var/run/secrets/etcd-client
name: etcd-client
- mountPath: /var/run/configmaps/etcd-ca
name: etcd-ca
priorityClassName: system-node-critical
activeDeadlineSeconds: 900
nodeSelector:
node-role.kubernetes.io/master: ""
restartPolicy: Never
hostNetwork: true
tolerations:
- operator: "Exists"
volumes:
- hostPath:
path: /usr/local/bin
name: usr-local-bin
- hostPath:
path: /etc/kubernetes/manifests
name: static-pod-dir
- hostPath:
path: /etc/kubernetes/static-pod-resources
name: resources-dir
- hostPath:
path: /etc/kubernetes/static-pod-resources/etcd-certs
name: cert-dir
- name: etcd-client
secret:
secretName: etcd-client
- name: etcd-ca
configMap:
name: etcd-ca-bundle
- name: etc-kubernetes-cluster-backup
persistentVolumeClaim:
claimName: templated