Skip to content

Commit

Permalink
fix: add template for generating node-agent name
Browse files Browse the repository at this point in the history
Signed-off-by: 1602077 <62025739+1602077@users.noreply.github.com>
  • Loading branch information
1602077 committed Jul 12, 2024
1 parent bb88989 commit 78ba316
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions charts/velero/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ Create the Velero priority class name.
{{- end -}}
{{- end -}}

{{/*
Create the name of the node agent.
*/}}
{{- define "velero.nodeAgent" -}}
{{ default (printf "%s-%s" (include "velero.fullname" .) "node-agent") .Values.serviceAccount.server.name }}
{{- end -}}

{{/*
Create the node-Agent priority class name.
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/velero/templates/node-agent-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-agent
name: {{ include "velero.nodeAgent" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.nodeAgent.annotations }}
annotations:
Expand Down

0 comments on commit 78ba316

Please sign in to comment.