Skip to content

Commit

Permalink
Create rolebinding for .Release.Namespace implicitly (kedacore#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 Nov 28, 2024
1 parent 17a896c commit f353d95
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 f353d95

Please sign in to comment.