File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
charts/konnector/templates Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 60
60
readOnly: true
61
61
restartPolicy: Never
62
62
{ {- end -} }
63
+
64
+ { {/* Returns true if the anyuid SCC exists and is accessible, false otherwise */} }
65
+ { {- define " common.hasAnyuidSCC" -} }
66
+ { {- if has " security.openshift.io/v1" .Capabilities.APIVersions } }
67
+ { {- $scc := lookup " security.openshift.io/v1" " SecurityContextConstraints" " " " anyuid" } }
68
+ { {- if $scc } }true{ { else } }false{ { end } }
69
+ { {- else } }
70
+ false
71
+ { {- end } }
72
+ { {- end } }
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ roleRef:
67
67
68
68
{{- range $bindingName, $bindingInfo := .Values.system.extraClusterRoleBindings }}
69
69
---
70
+ {{- if eq (include "common.hasAnyuidSCC" $) "true" }}
70
71
apiVersion : rbac.authorization.k8s.io/v1
71
72
kind : ClusterRoleBinding
72
73
metadata :
@@ -82,3 +83,4 @@ roleRef:
82
83
name : {{ $bindingInfo.roleRef.name }}
83
84
apiGroup : rbac.authorization.k8s.io
84
85
{{- end }}
86
+ {{- end }}
You can’t perform that action at this time.
0 commit comments