Skip to content

Commit

Permalink
Create rolebinding for .Release.Namespace implicitly (#643)
Browse files Browse the repository at this point in the history
* Create rolebinding for .Release.Namespace implicitly

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* Operator should be able to list and watch secrets in the release ns (certs)

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

---------

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
  • Loading branch information
jkremser authored and wozniakjan committed Sep 25, 2024
1 parent a563cad commit c77e0bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keda/templates/manager/clusterrolebindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ subjects:
name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
{{- else }}
{{- range ( split "," .Values.watchNamespace ) }}
{{- $namespaces := append (splitList "," .Values.watchNamespace) .Release.Namespace -}}
{{- range $namespaces }}
---
# Role binding for namespace '{{ . }}'
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
4 changes: 4 additions & 0 deletions keda/templates/manager/minimal-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ rules:
verbs:
- create
- update
{{- if .Values.permissions.operator.restrict.secret }}
- list
- watch
{{- end }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit c77e0bb

Please sign in to comment.