Auto add default CSIDriver labels on OpenShift

Signed-off-by: Kevin Fox <[email protected]>
This commit is contained in:
Kevin Fox
2023-11-20 10:24:53 +01:00
committed by Marco Franssen
parent c9885de539
commit 966061c6c7
2 changed files with 6 additions and 3 deletions
@@ -1,8 +1,13 @@
{{- $labels := dict }}
{{- if (dig "openshift" false .Values.global) }}
{{- $_ := set $labels "security.openshift.io/csi-ephemeral-volume-profile" "restricted" }}
{{- end }}
{{- $labels = mergeOverwrite $labels .Values.csiDriverLabels }}
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: {{ .Values.pluginName | quote }}
{{- with .Values.csiDriverLabels }}
{{- with $labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}