Skip to content

Commit

Permalink
feat: add clusterAdmin and rbac.extra
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Jan 7, 2025
1 parent 20138b4 commit c04a697
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
18 changes: 18 additions & 0 deletions chart/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@ rules:
- get
- watch
{{- end}}
{{- if .Values.serviceAccount.rbac.extra }}
{{ .Values.serviceAccount.rbac.extra | toYaml | nindent 2 }}
{{- end}}
{{- if .Values.serviceAccount.rbac.clusterAdmin }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "incident-commander.name" . }}-crb-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: admin
subjects:
- kind: ServiceAccount
name: {{.Values.serviceAccount.name}}
namespace: {{ .Release.Namespace }}
{{- end}}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{if .Values.serviceAccount.rbac.clusterRole}}Cluster{{end}}RoleBinding
Expand Down
13 changes: 11 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,25 @@ serviceAccount:
impersonate: false
# Whether to create cluster-wide or namespaced roles
clusterRole: true
clusterAdmin: false
# for secret management with valueFrom
tokenRequest: true
secrets: true
configmaps: true
# for use with kubernetes resource lookups
readAll: true
# Playbook pod actions
# Required for pod playbook actions
podRun: true
# exec
# Allows mission control to exec into pods
exec: true
# @schema
# required: false
# default: []
# type: array
# items:
# type: object
# @schema
extra: []
extraArgs: {}
externalPostgrest:
enable: true
Expand Down

0 comments on commit c04a697

Please sign in to comment.