From 7b0750d0a87e0878c1de13c7a2f0e251a5d48b4e Mon Sep 17 00:00:00 2001 From: branttaylor <30937728+branttaylor@users.noreply.github.com> Date: Fri, 22 Nov 2019 18:37:50 -0800 Subject: [PATCH] [stable/velero] add priority class helper (#18684) * add priority class helper Signed-off-by: Brant Taylor * add priority class helper Signed-off-by: Brant Taylor * bump chart Signed-off-by: Brant Taylor * bump chart version Signed-off-by: Brant Taylor --- stable/velero/Chart.yaml | 2 +- stable/velero/templates/_helpers.tpl | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/stable/velero/Chart.yaml b/stable/velero/Chart.yaml index 6ed3c803ed..bcb73e614f 100644 --- a/stable/velero/Chart.yaml +++ b/stable/velero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.1.0 description: A Helm chart for velero name: velero -version: 2.3.2 +version: 2.3.3 home: https://github.com/vmware-tanzu/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: diff --git a/stable/velero/templates/_helpers.tpl b/stable/velero/templates/_helpers.tpl index 58d83af313..6460a00267 100644 --- a/stable/velero/templates/_helpers.tpl +++ b/stable/velero/templates/_helpers.tpl @@ -52,3 +52,25 @@ Create the name for the credentials secret. {{- include "velero.fullname" . -}} {{- end -}} {{- end -}} + +{{/* +Create the Velero priority class name. +*/}} +{{- define "velero.priorityClassName" -}} +{{- if .Values.priorityClassName -}} + {{- .Values.priorityClassName -}} +{{- else -}} + {{- include "velero.fullname" . -}} +{{- end -}} +{{- end -}} + +{{/* +Create the Restic priority class name. +*/}} +{{- define "velero.restic.priorityClassName" -}} +{{- if .Values.restic.priorityClassName -}} + {{- .Values.restic.priorityClassName -}} +{{- else -}} + {{- include "velero.fullname" . -}} +{{- end -}} +{{- end -}}