Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions charts/mageai/templates/cleanup-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ spec:
schedule: {{ .Values.cleanupJob.schedule_cron | default "0 * * * *" | quote }}
jobTemplate:
spec:
{{- if .Values.cleanupJob.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.cleanupJob.ttlSecondsAfterFinished }}
{{- end }}
template:
spec:
containers:
Expand Down Expand Up @@ -37,6 +40,12 @@ spec:
{{- toYaml .Values.extraVolumeMounts | nindent 16 }}
{{- end }}
restartPolicy: OnFailure
resources:
{{- toYaml .Values.cleanupJob.resources | nindent 12 }}
{{- with .Values.cleanupJob.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 12 }}
Expand Down
15 changes: 14 additions & 1 deletion charts/mageai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,20 @@ extraEnvs:
fieldPath: metadata.namespace

cleanupJob:
enabled: false
enabled: true
clean_variable_cli_args: ""
clean_log_cli_args: ""
schedule_cron: "0 * * * *" # Runs every hour
ttlSecondsAfterFinished: ~
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # W: comment not indente…
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}