{{- if ( and .Values.common.domainCertWatch.serviceAccount.enabled ( not .Values.common.domainCertWatch.serviceAccount.preexisting ) ) -}} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "domainCertWatch.appName" . }}-role-binding labels: {{- include "dataplane.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ template "domainCertWatch.appName" . }}-role subjects: - kind: ServiceAccount name: {{ include "domainCertWatch.serviceAccountName" . }} namespace: {{ .Release.Namespace }} {{- end }}