# limitations under the License.
*/}}
+{{- if not .Values.global.mariadbGalera.useOperator }}
{{ include "common.service" . }}
---
{{ include "common.headlessService" . }}
+{{- end }}
+{{- if (include "common.onServiceMesh" .) }}
+{{- if eq (default "istio" .Values.global.serviceMesh.engine) "istio" }}
+---
+apiVersion: security.istio.io/v1beta1
+kind: PeerAuthentication
+metadata:
+ name: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+spec:
+ selector:
+ matchLabels:
+ app: {{ include "common.servicename" . }}
+ portLevelMtls:
+ '{{ .Values.service.internalPort }}':
+{{- if .Values.mariadbOperator.galera.enabled }}
+ mode: STRICT
+{{- else }}
+ mode: DISABLE
+{{- end }}
+{{- end }}
+{{- end }}