Skip to content

Commit

Permalink
Suffix RBAC names with -controller
Browse files Browse the repository at this point in the history
  • Loading branch information
triarius committed Apr 29, 2023
1 parent d239ecd commit af973ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/agent-stack-k8s/templates/deployment.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/config.yaml.tpl") . | sha256sum }}
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml.tpl") . | sha256sum }}
spec:
serviceAccountName: {{ .Release.Name }}
serviceAccountName: {{ .Release.Name }}-controller
nodeSelector:
{{ toYaml $.Values.nodeSelector | indent 8 }}
containers:
Expand Down
8 changes: 4 additions & 4 deletions charts/agent-stack-k8s/templates/rbac.yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}
name: {{ .Release.Name }}-controller
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
Expand Down Expand Up @@ -30,14 +30,14 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .Release.Name }}
name: {{ .Release.Name }}-controller
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}
name: {{ .Release.Name }}-controller
namespace: {{ .Release.Namespace }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}
name: {{ .Release.Name }}-controller
namespace: {{ .Release.Namespace }}

0 comments on commit af973ad

Please sign in to comment.