Files
kubesphere/config/ks-core/templates/serviceaccount.yaml
Roland.Ma dc3d5bf08c user helm release namespace
Signed-off-by: Roland.Ma <rolandma@yunify.com>
2021-05-26 09:09:49 +00:00

27 lines
605 B
YAML

{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "ks-core.serviceAccountName" . }}
labels:
{{- include "ks-core.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubesphere
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: kubesphere
namespace: {{ .Release.Namespace }}