{{- if eq .Values.interceptor.enabled true }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: tekton-triggers-edp-interceptor
  labels:
    {{- include "edp-tekton-interceptor.labels" . | nindent 4 }}
subjects:
  - kind: ServiceAccount
    name: {{ include "edp-tekton-interceptor.serviceAccountName" . }}
    namespace: {{ .Release.Namespace }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: tekton-triggers-edp-interceptor
{{- end }}
