diff --git a/README.md b/README.md index 15b5f40..08a5b3e 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,6 @@ Example: ```yaml role: - create: true extraRoles: - apiGroups: ["security.openshift.io"] resources: ["securitycontextconstraints"] diff --git a/charts/localstack/templates/role.yaml b/charts/localstack/templates/role.yaml index 507905c..3abc6b0 100644 --- a/charts/localstack/templates/role.yaml +++ b/charts/localstack/templates/role.yaml @@ -20,14 +20,7 @@ rules: resources: ["services"] verbs: ["get", "list"] {{- if .Values.role.extraRoles }} - {{- range .Values.role.extraRoles }} -- apiGroups: {{ toJson .apiGroups | nindent 2 }} - resources: {{ toJson .resources | nindent 2 }} - {{- if .resourceNames }} - resourceNames: {{ toJson .resourceNames | nindent 2 }} - {{- end }} - verbs: {{ toJson .verbs | nindent 2 }} - {{- end }} +{{ include "common.tplvalues.render" (dict "value" .Values.role.extraRoles "context" $) }} {{- end }} {{- end }} diff --git a/charts/localstack/test-values.yaml b/charts/localstack/test-values.yaml index 3c7a456..5c42114 100644 --- a/charts/localstack/test-values.yaml +++ b/charts/localstack/test-values.yaml @@ -57,3 +57,11 @@ ingress: # enable kubernetes lambda executor (only pro) # lambda: # executor: "kubernetes" + +# add extra roles for OpenShift +# role: +# extraRoles: +# - apiGroups: ["security.openshift.io"] +# resources: ["securitycontextconstraints"] +# resourceNames: ["anyuid"] +# verbs: ["use"] \ No newline at end of file