github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/dex/templates/service.yaml (about)

     1  apiVersion: v1
     2  kind: Service
     3  metadata:
     4    name: {{ include "dex.fullname" . }}
     5    labels:
     6      {{- include "dex.labels" . | nindent 4 }}
     7    {{- with .Values.service.annotations }}
     8    annotations:
     9      {{- toYaml . | nindent 4 }}
    10    {{- end }}
    11  spec:
    12    type: {{ .Values.service.type }}
    13    {{- with .Values.service.clusterIP }}
    14    clusterIP: {{ . }}
    15    {{- end }}
    16    ports:
    17      - name: http
    18        port: {{ .Values.service.ports.http.port }}
    19        {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.ports.http.nodePort }}
    20        nodePort: {{ .Values.service.ports.http.nodePort }}
    21        {{- end }}
    22        targetPort: http
    23        protocol: TCP
    24        {{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion }}
    25        appProtocol: http
    26        {{- end }}
    27      {{- if .Values.https.enabled }}
    28      - name: https
    29        port: {{ .Values.service.ports.https.port }}
    30        {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.ports.https.nodePort }}
    31        nodePort: {{ .Values.service.ports.https.nodePort }}
    32        {{- end }}
    33        targetPort: https
    34        protocol: TCP
    35        {{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion }}
    36        appProtocol: https
    37        {{- end }}
    38      {{- end }}
    39      {{- if .Values.grpc.enabled }}
    40      - name: grpc
    41        port: {{ .Values.service.ports.grpc.port }}
    42        {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.ports.grpc.nodePort }}
    43        nodePort: {{ .Values.service.ports.grpc.nodePort }}
    44        {{- end }}
    45        targetPort: grpc
    46        protocol: TCP
    47        {{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion }}
    48        appProtocol: http
    49        {{- end }}
    50      {{- end }}
    51      - name: telemetry
    52        port: 5558
    53        targetPort: telemetry
    54        protocol: TCP
    55        {{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion }}
    56        appProtocol: http
    57        {{- end }}
    58    selector:
    59      {{- include "dex.selectorLabels" . | nindent 4 }}