{{- if .Values.Secure.Enabled }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
  labels:
    heritage: {{ .Release.Service | quote }}
    release: {{ .Release.Name | quote }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    component: "{{ .Release.Name }}-{{ .Values.Component }}"
rules:
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - create
  - get
{{- end }}