Updated to 7.7.0.20250830-3-BN0276-ubi
Updated ANM destinationCertCA for 7.7.0.20250830-3-BN0276-ubi
This commit is contained in:
59
apigateway/templates/cronjob/cronjob.yaml
Normal file
59
apigateway/templates/cronjob/cronjob.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
{{- if .Values.cronjob.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: purge-files
|
||||
labels:
|
||||
{{- include "gateway.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: cronjob
|
||||
spec:
|
||||
schedule: "{{ .Values.cronjob.schedule }}"
|
||||
jobTemplate:
|
||||
spec:
|
||||
ttlSecondsAfterFinished: {{ .Values.cronjob.job_ttl }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "gateway.labels" . | nindent 12 }}
|
||||
app.kubernetes.io/component: cronjob
|
||||
spec:
|
||||
{{- with .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: purge-files-job
|
||||
image: {{ default .Values.global.initContainers.image .Values.cronjob.image | quote }}
|
||||
args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- echo "purging event files older than {{ .Values.cronjob.older_than }}"; find /events -type f -mtime {{ .Values.cronjob.older_than }} -exec rm -rf {} \;
|
||||
volumeMounts:
|
||||
- name: eventsvol
|
||||
mountPath: "/events"
|
||||
{{- with .Values.global.initContainers.resources }}
|
||||
resources:
|
||||
{{ toYaml . | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- with .Values.global.initContainers.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 14 }}
|
||||
{{- end }}
|
||||
restartPolicy: OnFailure
|
||||
volumes:
|
||||
- name: eventsvol
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.cronjob.claimName }}
|
||||
{{- with .Values.cronjob.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.cronjob.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.cronjob.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user