-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathcronjob.yaml
More file actions
57 lines (57 loc) · 1.94 KB
/
cronjob.yaml
File metadata and controls
57 lines (57 loc) · 1.94 KB
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
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "whereabouts.fullname" . }}
{{- include "whereabouts.namespace" . | nindent 2 }}
labels:
{{- include "whereabouts.labels" . | nindent 4 }}
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: {{ .Values.successfulJobsHistoryLimit | default "0" }}
schedule: "*/5 * * * *"
jobTemplate:
spec:
backoffLimit: 0
template:
metadata:
labels:
name: whereabouts
{{- include "whereabouts.selectorLabels" . | nindent 12 }}
spec:
priorityClassName: "system-node-critical"
serviceAccountName: {{ include "whereabouts.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 16 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 16 }}
command:
- /ip-control-loop
- -log-level=verbose
volumeMounts:
- name: cni-net-dir
mountPath: /host/etc/cni/net.d
volumes:
- name: cni-net-dir
hostPath:
path: /etc/cni/net.d
restartPolicy: OnFailure
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 12 }}
{{- end }}