Skip to content

Commit

Permalink
Auto add default CSIDriver labels on OpenShift
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Fox <[email protected]>
  • Loading branch information
kfox1111 authored and marcofranssen committed Nov 20, 2023
1 parent c9885de commit 966061c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
2 changes: 0 additions & 2 deletions examples/openshift/openshift-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ tornjak-frontend:
fsGroup: null

spiffe-csi-driver:
csiDriverLabels:
security.openshift.io/csi-ephemeral-volume-profile: restricted
initContainers:
- terminationMessagePath: /dev/termination-log
name: set-context
Expand Down

0 comments on commit 966061c

Please sign in to comment.