This commit is contained in:
behrooz
2025-08-18 11:14:37 +03:30
parent dc18529168
commit e2ea0f9fe2
55 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
{{- if (include "vcluster.createClusterRole" . ) -}}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "vcluster.clusterRoleName" . }}
labels:
app: vcluster
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.controlPlane.advanced.globalMetadata.annotations }}
annotations:
{{ toYaml .Values.controlPlane.advanced.globalMetadata.annotations | indent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
{{- if .Values.controlPlane.advanced.serviceAccount.name }}
name: {{ .Values.controlPlane.advanced.serviceAccount.name }}
{{- else }}
name: vc-{{ .Release.Name }}
{{- end }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ template "vcluster.clusterRoleName" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}