apiVersion: batch/v1beta1 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-reconciler - -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 }}