-
Notifications
You must be signed in to change notification settings - Fork 128
/
cronjob-codecommit.yaml
50 lines (48 loc) · 1.28 KB
/
cronjob-codecommit.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
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-backup
namespace: kube-system
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: kube-state-backup
namespace: kube-system
labels:
app: kube-backup
spec:
schedule: "*/10 * * * *"
concurrencyPolicy: Replace
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
metadata:
labels:
app: kube-backup
name: kube-backup
spec:
containers:
- image: quay.io/plange/kube-backup:1.12.0-1
imagePullPolicy: Always
name: backup
resources: {}
securityContext:
runAsUser: 1000
env:
- name: GIT_REPO
value: "[email protected]:infra/kube-backup.git"
- name: RESOURCETYPES
value: "ingress deployment configmap svc rc ds customresourcedefinition networkpolicy statefulset storageclass cronjob"
volumeMounts:
- mountPath: /backup/
name: cache
dnsPolicy: ClusterFirst
terminationGracePeriodSeconds: 30
serviceAccountName: kube-backup
volumes:
- name: cache
emptyDir: {}
restartPolicy: OnFailure