Skip to content

Commit

Permalink
fix: consistent node-agent podLabels
Browse files Browse the repository at this point in the history
The node-agent was using ".Values.podLabels" in the DaemonSet
while using ".Values.nodeAgent.labels" in the podMonitor.

This led to an inconsistency and made it impossible to have
different labels for the node-agent compared to the Velero deployment.

Signed-off-by: foyerunix <[email protected]>
  • Loading branch information
foyerunix authored and foyerunix committed Oct 23, 2024
1 parent 47b2f72 commit 0b234bd
Show file tree
Hide file tree
Showing 4 changed files with 8 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.14.1
kubeVersion: ">=1.16.0-0"
description: A Helm chart for velero
name: velero
version: 7.2.1
version: 7.2.2
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
4 changes: 2 additions & 2 deletions charts/velero/templates/node-agent-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "velero.chart" . }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- if .Values.nodeAgent.podLabels }}
{{- toYaml .Values.nodeAgent.podLabels | nindent 8 }}
{{- end }}
{{- if or .Values.podAnnotations .Values.metrics.enabled (and .Values.credentials.useSecret (not .Values.credentials.existingSecret)) }}
annotations:
Expand Down
2 changes: 1 addition & 1 deletion charts/velero/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
app.kubernetes.io/name: {{ include "velero.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: node-agent
{{- with .Values.nodeAgent.labels }}
{{- with .Values.nodeAgent.podLabels }}
{{- toYaml . | nindent 6 }}
{{- end }}
podMetricsEndpoints:
Expand Down
4 changes: 4 additions & 0 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,10 @@ nodeAgent:
# labels to set for the node-agent daemonset. Optional.
labels: {}

# Additional pod labels for the node-agent daemonset. Optional
# ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podLabels: {}

# will map /scratch to emptyDir. Set to false and specify your own volume
# via extraVolumes and extraVolumeMounts that maps to /scratch
# if you don't want to use emptyDir.
Expand Down

0 comments on commit 0b234bd

Please sign in to comment.