{{- if ( and .Values.pepServer.serviceAccount.enabled ( not .Values.pepServer.serviceAccount.preexisting ) ) -}} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "pep-server.name" . }}-role-binding roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ template "pep-server.name" . }}-role subjects: - kind: ServiceAccount name: {{ .Values.pepServer.serviceAccount.enabled | ternary .Values.pepServer.serviceAccount.name "default" }} namespace: {{ .Release.Namespace }} {{- end }}