{{- if .Values.rbac.create -}}
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: Role
metadata:
  name: {{ include "jifa.fullname" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels:
    {{- include "jifa.labels" . | nindent 4 }}
rules:
  - apiGroups: [ "" ]
    resources: [ "pods", "pods/exec" ]
    verbs: [ "get", "list", "delete", "patch", "create" ]
{{- end -}}