34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
# templates/service-account.yaml
|
|
---
|
|
# ------------------- Dashboard Service Account ------------------- #
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: dashboard-admin
|
|
namespace: i-dashboard
|
|
labels:
|
|
app.kubernetes.io/name: kubernetes-dashboard
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
|
|
---
|
|
# ------------------- Dashboard ClusterRoleBinding ------------------- #
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: dashboard-admin-binding
|
|
labels:
|
|
app.kubernetes.io/name: kubernetes-dashboard
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: cluster-admin
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: dashboard-admin
|
|
namespace: i-dashboard
|