# helm_charts_distribution-role.yaml
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    app: {{ template "distribution.name" . }}
    chart: {{ template "distribution.chart" . }}
    component: {{ .Values.distribution.name }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
  name: {{ template "distribution.fullname" . }}
rules:
{{ toYaml .Values.rbac.role.rules }}
{{- end }}