Skip to content

Commit

Permalink
feat(tokengen): Updated role creation
Browse files Browse the repository at this point in the history
Changed the behavior so that if `.Values.rbac.namespaced` is enabled, it creates a Role instead of a ClusterRole for tokengen.
  • Loading branch information
davidham committed Oct 9, 2024
1 parent 7dbabe0 commit 08842b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if and (and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled) (not .Values.rbac.namespaced)}}
{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}Role
metadata:
name: {{ template "enterprise-logs.tokengenFullname" . }}
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if and (and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled) (not .Values.rbac.namespaced)}}
{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}RoleBinding
metadata:
name: {{ template "enterprise-logs.tokengenFullname" . }}
labels:
Expand All @@ -16,7 +16,7 @@ metadata:
"helm.sh/hook": post-install
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}Role
name: {{ template "enterprise-logs.tokengenFullname" . }}
subjects:
- kind: ServiceAccount
Expand Down

0 comments on commit 08842b5

Please sign in to comment.