Skip to content

Commit

Permalink
Merge pull request #493 from SebPlv/main
Browse files Browse the repository at this point in the history
[velero] Setting podAnnotations metrics only if not using servicemonitor or podmonitor
  • Loading branch information
qiuming-best authored Aug 18, 2023
2 parents 2432de2 + 013b3e6 commit 00baf7d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.11.1
kubeVersion: ">=1.16.0-0"
description: A Helm chart for velero
name: velero
version: 5.0.0
version: 5.0.1
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
6 changes: 4 additions & 2 deletions charts/velero/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ spec:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.metrics.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- if and (.Values.metrics.enabled) (not .Values.metrics.serviceMonitor.enabled) }}
{{- with .Values.metrics.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
spec:
Expand Down
9 changes: 8 additions & 1 deletion charts/velero/templates/node-agent-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ spec:
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and (.Values.metrics.enabled) (not .Values.metrics.nodeAgentPodMonitor.enabled) }}
{{- with .Values.metrics.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
spec:
{{- if .Values.image.imagePullSecrets }}
imagePullSecrets:
Expand Down

0 comments on commit 00baf7d

Please sign in to comment.