istio.io/istio@v0.0.0-20240520182934-d79c90f27776/manifests/charts/gateway/templates/service.yaml (about)

     1  {{- if not (eq .Values.service.type "None") }}
     2  apiVersion: v1
     3  kind: Service
     4  metadata:
     5    name: {{ include "gateway.name" . }}
     6    namespace: {{ .Release.Namespace }}
     7    labels:
     8      {{- include "gateway.labels" . | nindent 4 }}
     9      {{- with .Values.networkGateway }}
    10      topology.istio.io/network: "{{.}}"
    11      {{- end }}
    12    annotations:
    13      {{- merge (deepCopy .Values.service.annotations) .Values.annotations | toYaml | nindent 4 }}
    14  spec:
    15  {{- with .Values.service.loadBalancerIP }}
    16    loadBalancerIP: "{{ . }}"
    17  {{- end }}
    18  {{- if eq .Values.service.type "LoadBalancer" }}
    19    {{- if hasKey .Values.service "allocateLoadBalancerNodePorts" }}
    20    allocateLoadBalancerNodePorts: {{ .Values.service.allocateLoadBalancerNodePorts }}
    21    {{- end }}
    22  {{- end }}
    23  {{- if .Values.service.ipFamilyPolicy }}
    24    ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
    25  {{- end }}
    26  {{- if .Values.service.ipFamilies }}
    27    ipFamilies:
    28  {{- range .Values.service.ipFamilies }}
    29    - {{ . }}
    30  {{- end }}
    31  {{- end }}
    32  {{- with .Values.service.loadBalancerSourceRanges }}
    33    loadBalancerSourceRanges:
    34  {{ toYaml . | indent 4 }}
    35  {{- end }}
    36  {{- with .Values.service.externalTrafficPolicy }}
    37    externalTrafficPolicy: "{{ . }}"
    38  {{- end }}
    39    type: {{ .Values.service.type }}
    40    ports:
    41  {{- if .Values.networkGateway }}
    42    - name: status-port
    43      port: 15021
    44      targetPort: 15021
    45    - name: tls
    46      port: 15443
    47      targetPort: 15443
    48    - name: tls-istiod
    49      port: 15012
    50      targetPort: 15012
    51    - name: tls-webhook
    52      port: 15017
    53      targetPort: 15017
    54  {{- else }}
    55  {{ .Values.service.ports | toYaml | indent 4 }}
    56  {{- end }}
    57  {{- if .Values.service.externalIPs }}
    58    externalIPs: {{- range .Values.service.externalIPs }}
    59      - {{.}}
    60    {{- end }}
    61  {{- end }}
    62    selector:
    63      {{- include "gateway.selectorLabels" . | nindent 4 }}
    64  {{- end }}