{{- if and .Values.rbac.create }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: {{ template "sidekiq-prometheus-exporter.fullname" . }} labels: {{- include "sidekiq-prometheus-exporter.labels" . | nindent 4 }} subjects: - kind: ServiceAccount name: {{ include "sidekiq-prometheus-exporter.serviceAccountName" . }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole name: {{ template "sidekiq-prometheus-exporter.fullname" . }} apiGroup: rbac.authorization.k8s.io {{- end }}