-
Notifications
You must be signed in to change notification settings - Fork 44
/
cronjob.yaml
58 lines (58 loc) · 1.4 KB
/
cronjob.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
---
apiVersion: v1
kind: Namespace
metadata:
name: checks-openshift
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: checks-openshift
namespace: checks-openshift
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: checks-openshift
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: checks-openshift
namespace: checks-openshift
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: checks-openshift
namespace: checks-openshift
spec:
concurrencyPolicy: Forbid
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
spec:
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
affinity: {}
containers:
- name: checks-openshift
image: quay.io/rhsysdeseng/openshift-checks:latest
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "/opt/openshift-checks/openshift-checks.sh"]
resources:
requests:
cpu: 100m
memory: 256Mi
serviceAccountName: checks-openshift
restartPolicy: Never
terminationGracePeriodSeconds: 30
backoffLimit: 0
schedule: "53 * * * *"
successfulJobsHistoryLimit: 3
suspend: false