Skip to content

Commit

Permalink
properly include extraRoles
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrashed committed Oct 18, 2024
1 parent 4ac10b9 commit 78a5552
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ Example:

```yaml
role:
create: true
extraRoles:
- apiGroups: ["security.openshift.io"]
resources: ["securitycontextconstraints"]
Expand Down
9 changes: 1 addition & 8 deletions charts/localstack/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

8 changes: 8 additions & 0 deletions charts/localstack/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 78a5552

Please sign in to comment.