Skip to content

Commit 6121eba

Browse files
committed
fix: Gate the openshift rules
1 parent 0970763 commit 6121eba

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • deploy/helm/opensearch-operator/templates

deploy/helm/opensearch-operator/templates/roles.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ rules:
158158
verbs:
159159
- create
160160
- patch
161+
{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
161162
# Required on OpenShift: allows OpenSearch pods to run with the nonroot-v2
162163
# SecurityContextConstraint, which permits running as a non-root UID without a specific
163164
# seccomp profile.
@@ -169,3 +170,4 @@ rules:
169170
- nonroot-v2
170171
verbs:
171172
- use
173+
{{ end }}

0 commit comments

Comments
 (0)