Skip to content

Commit

Permalink
fix!: rbac extra rules value renamed
Browse files Browse the repository at this point in the history
Signed-off-by: Ievgenii Shepeliuk <[email protected]>
  • Loading branch information
eshepelyuk committed Jun 1, 2022
1 parent 1dc2a83 commit daef0c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
13 changes: 11 additions & 2 deletions charts/opa-kube-mgmt/templates/rbac-mgmt.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and .Values.rbac.create .Values.mgmt.enabled }}
{{- if .Values.rbac.create }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand All @@ -10,7 +11,15 @@ metadata:
component: mgmt
name: {{ template "opa.mgmtfullname" . }}
rules:
{{ toYaml .Values.rbac.rules.cluster | indent 2 }}
{{- with .Values.rbac.extraRules }}
{{ . | toYaml | nindent 2 }}
{{- end }}
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["*"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
15 changes: 6 additions & 9 deletions charts/opa-kube-mgmt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,13 @@ nodeSelector: {}
resources: {}

rbac:
# If true, create RBAC resources
# should ClusterRole for kube-mgmt be created
create: true
rules:
cluster:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["*"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch"]
# extra rules to be added to a ClusterRole
extraRules: []
# - apiGroups: [""]
# resources: ["configmaps"]
# verbs: ["*"]

serviceAccount:
# Specifies whether a ServiceAccount should be created
Expand Down

0 comments on commit daef0c2

Please sign in to comment.