apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: role-job-sa-binding
  namespace: {{ .Release.Namespace }}
  labels:
    helm.sh/chart: {{ include "vault.chart" . }}
    app.kubernetes.io/name: {{ include "vault.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: role-for-secrets
subjects:
  - kind: ServiceAccount
    name: job-sa
    namespace: {{ .Release.Namespace }}