diff --git a/library/common/templates/class/velero/_schedule.tpl b/library/common/templates/class/velero/_schedule.tpl index c9845774..6dae9848 100644 --- a/library/common/templates/class/velero/_schedule.tpl +++ b/library/common/templates/class/velero/_schedule.tpl @@ -45,11 +45,22 @@ spec: {{- end }} template: {{- if not $objectData.template }} + includeClusterResources: true includedNamespaces: - {{ include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $rootCtx "objectData" $objectData "caller" "Schedule") }} + labelSelector: + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name }} + release: {{ .Release.Name }} {{- end -}} {{- with $objectData.template }} {{- toYaml . | nindent 4 }} + {{- if not .labelSelector }} + labelSelector: + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name }} + release: {{ .Release.Name }} + {{- end -}} {{- if not .includedNamespaces }} includedNamespaces: - {{ include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $rootCtx "objectData" $objectData "caller" "Schedule") }}