{{- if .Values.rbac.create }} kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ template "bookstack.fullname" . }} labels: app: {{ template "bookstack.name" . }} chart: {{ template "bookstack.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" subjects: - kind: ServiceAccount name: {{ template "bookstack.serviceAccountName" . }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ template "bookstack.fullname" . }} {{- end }}