-
Notifications
You must be signed in to change notification settings - Fork 13
/
CronJob.yaml
61 lines (61 loc) · 1.38 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
59
60
61
apiVersion: batch/v1beta1
kind: CronJob
metadata:
labels:
app: k8s-cluster-checker
name: k8s-cluster-checker
spec:
concurrencyPolicy: Replace
failedJobsHistoryLimit: 1
jobTemplate:
metadata:
creationTimestamp: null
spec:
activeDeadlineSeconds: 3600
template:
metadata:
labels:
app: k8s-cluster-checker
spec:
imagePullSecrets:
- name: quayauth
containers:
- image: dguyhasnoname/k8s-cluster-checker:0.1.0
imagePullPolicy: Always
name: cluster-checker
ports:
- containerPort: 80
resources:
limits:
cpu: 400m
memory: 500Mi
requests:
cpu: 200m
memory: 400Mi
restartPolicy: OnFailure
schedule: 0/15 * * * *
startingDeadlineSeconds: 43200
successfulJobsHistoryLimit: 3
suspend: false
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-checker
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["list", "get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-checker
subjects:
- kind: ServiceAccount
name: default
namespace: monitoring
roleRef:
kind: ClusterRole
name: cluster-checker
apiGroup: rbac.authorization.k8s.io