{{- if and .Values.istio.enabled .Values.istio.peerAuthentication.enabled }}
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
  name: {{ include "finaegis.fullname" . }}
  labels:
    {{- include "finaegis.labels" . | nindent 4 }}
spec:
  selector:
    matchLabels:
      {{- include "finaegis.selectorLabels" . | nindent 6 }}
  mtls:
    mode: {{ .Values.istio.peerAuthentication.mode }}
{{- end }}
