{{- if .Values.global.remotePilotCreateSvcEndpoint }}
apiVersion: v1
kind: Endpoints
metadata:
  name: istio-pilot
  namespace: {{ .Release.Namespace }}
subsets:
- addresses:
  - ip: {{ .Values.global.remotePilotAddress }}
  ports:
  - port: 15003
    name: http-old-discovery # mTLS or non-mTLS depending on auth setting
  - port: 15005
    name: https-discovery # always mTLS
  - port: 15007
    name: http-discovery # always plain-text
  - port: 15010
    name: grpc-xds # direct
  - port: 15011
    name: https-xds # mTLS or non-mTLS depending on auth setting
  - port: 8080
    name: http-legacy-discovery # direct
  - port: 9093
    name: http-monitoring
{{- end }}
