apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: jenkins-{{ .Release.Namespace }}-monitoring-role
  namespace: {{ .Values.monitoring.namespace }}
subjects:
  - kind: ServiceAccount
    name: {{ .Values.jenkins.serviceAccountName }}
    namespace: {{ .Release.Namespace }}
roleRef:
  kind: Role
  name: {{ .Values.monitoring.roleName }}
  apiGroup: rbac.authorization.k8s.io
