mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 14:57:16 +08:00
[bitnami/matomo] Deprecates 'cronjobs.enabled' (#21232)
* [bitnami/matomo] Deprecates Signed-off-by: Fran Mulero <fmulero@vmware.com> * Fix linter Signed-off-by: Fran Mulero <fmulero@vmware.com> --------- Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
@@ -215,3 +215,18 @@ Return the matomo pods needed initContainers
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{/*
|
||||
Return if cronjob X is enabled. Takes into account the deprecated value 'cronjobs.enabled'.
|
||||
Use: include "matomo.cronjobs.enabled" (dict "context" $ "cronjob" "archive" )
|
||||
*/}}
|
||||
{{- define "matomo.cronjobs.enabled" -}}
|
||||
{{- if ( hasKey .context.Values.cronjobs "enabled" ) -}}
|
||||
{{- if .context.Values.cronjobs.enabled -}}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if ( get .context.Values.cronjobs .cronjob ).enabled -}}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
@@ -3,7 +3,7 @@ Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.cronjobs.enabled -}}
|
||||
{{- if ( include "matomo.cronjobs.enabled" ( dict "context" $ "cronjob" "archive" ) ) -}}
|
||||
apiVersion: {{ include "common.capabilities.cronjob.apiVersion" . }}
|
||||
kind: CronJob
|
||||
metadata:
|
||||
@@ -135,6 +135,8 @@ spec:
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if ( include "matomo.cronjobs.enabled" ( dict "context" $ "cronjob" "taskScheduler" ) ) -}}
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.cronjob.apiVersion" . }}
|
||||
kind: CronJob
|
||||
|
||||
Reference in New Issue
Block a user