mirror of https://github.com/easzlab/kubeasz.git
20 lines
658 B
YAML
20 lines
658 B
YAML
{{ if .Values.rbac.install }}
|
|
{{- $serviceName := include "jenkins.fullname" . -}}
|
|
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ $serviceName }}-role-binding
|
|
labels:
|
|
app: {{ $serviceName }}
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
release: "{{ .Release.Name }}"
|
|
heritage: "{{ .Release.Service }}"
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ .Values.rbac.roleRef }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ $serviceName }}
|
|
namespace: {{ .Release.Namespace }}
|
|
{{ end }} |