diff --git a/charts/velero/Chart.yaml b/charts/velero/Chart.yaml index 7d721320..33c78f37 100644 --- a/charts/velero/Chart.yaml +++ b/charts/velero/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 1.11.1 kubeVersion: ">=1.16.0-0" description: A Helm chart for velero name: velero -version: 4.2.0 +version: 4.4.0 home: https://github.com/vmware-tanzu/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: diff --git a/charts/velero/templates/backupstoragelocation.yaml b/charts/velero/templates/backupstoragelocation.yaml index b47a41ad..0e027796 100644 --- a/charts/velero/templates/backupstoragelocation.yaml +++ b/charts/velero/templates/backupstoragelocation.yaml @@ -9,8 +9,10 @@ metadata: name: {{ .name | default "default" }} namespace: {{ $.Release.Namespace }} annotations: + {{- if $.Values.helmHookAnnotations }} "helm.sh/hook": post-install,post-upgrade,post-rollback "helm.sh/hook-delete-policy": before-hook-creation + {{- end }} labels: app.kubernetes.io/name: {{ include "velero.name" $ }} app.kubernetes.io/instance: {{ $.Release.Name }} diff --git a/charts/velero/templates/schedule.yaml b/charts/velero/templates/schedule.yaml index fa3786f4..f7e924a2 100644 --- a/charts/velero/templates/schedule.yaml +++ b/charts/velero/templates/schedule.yaml @@ -9,8 +9,10 @@ metadata: {{- if $schedule.annotations }} {{- toYaml $schedule.annotations | nindent 4 }} {{- end }} + {{- if $.Values.helmHookAnnotations }} "helm.sh/hook": post-install,post-upgrade,post-rollback "helm.sh/hook-delete-policy": before-hook-creation + {{- end }} labels: app.kubernetes.io/name: {{ include "velero.name" $ }} app.kubernetes.io/instance: {{ $.Release.Name }} diff --git a/charts/velero/templates/servicemonitor.yaml b/charts/velero/templates/servicemonitor.yaml index e3ccfa40..777ff9f1 100644 --- a/charts/velero/templates/servicemonitor.yaml +++ b/charts/velero/templates/servicemonitor.yaml @@ -33,6 +33,12 @@ spec: {{- if .Values.metrics.serviceMonitor.scheme }} scheme: {{ .Values.metrics.serviceMonitor.scheme }} {{- end }} + {{- if .Values.metrics.serviceMonitor.metricRelabelings }} + metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.relabelings }} + relabelings: {{ toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }} + {{- end }} {{- if .Values.metrics.serviceMonitor.tlsConfig }} tlsConfig: {{- toYaml .Values.metrics.serviceMonitor.tlsConfig | nindent 6 }} diff --git a/charts/velero/templates/volumesnapshotlocation.yaml b/charts/velero/templates/volumesnapshotlocation.yaml index 4cd3f3cf..05018f33 100644 --- a/charts/velero/templates/volumesnapshotlocation.yaml +++ b/charts/velero/templates/volumesnapshotlocation.yaml @@ -9,8 +9,10 @@ metadata: name: {{ .name | default "default" }} namespace: {{ $.Release.Namespace }} annotations: + {{- if $.Values.helmHookAnnotations }} "helm.sh/hook": post-install,post-upgrade,post-rollback "helm.sh/hook-delete-policy": before-hook-creation + {{- end }} labels: app.kubernetes.io/name: {{ include "velero.name" $ }} app.kubernetes.io/instance: {{ $.Release.Name }} diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 604ae4cf..6de0e457 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -24,6 +24,10 @@ annotations: {} # Labels to add to the Velero deployment's. Optional. labels: {} +# helmHookAnnotations is required to deploy CustomResources after deploying CRDs. If you manage your CRDs outside of this helm chart +# or using ArgoCD, you are able to disable the helm hooks annotations. +helmHookAnnotations: true + # Annotations to add to the Velero deployment's pod template. Optional. # # If using kube2iam or kiam, use the following annotation with your AWS_ACCOUNT_ID @@ -182,6 +186,12 @@ metrics: enabled: false annotations: {} additionalLabels: {} + + # metrics.serviceMonitor.metricRelabelings Specify Metric Relabelings to add to the scrape endpoint + # ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig + # metricRelabelings: [] + # metrics.serviceMonitor.relabelings [array] Prometheus relabeling rules + # relabelings: [] # ServiceMonitor namespace. Default to Velero namespace. # namespace: # ServiceMonitor connection scheme. Defaults to HTTP.