github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/helm/templates/service.yaml (about)

     1  apiVersion: v1
     2  kind: Service
     3  metadata:
     4    name: {{ include "kubeblocks.svcName" . }}
     5    labels:
     6      control-plane: controller-manager
     7      {{- include "kubeblocks.labels" . | nindent 4 }}
     8  spec:
     9    type: {{ .Values.service.type }}
    10    ports:
    11      - port: {{ .Values.service.port }}
    12        targetPort: webhook-server
    13        protocol: TCP
    14        name: webhook-server
    15        {{- if and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)) }}
    16        nodePort: {{ .Values.service.nodePort }}
    17        {{- end }}
    18      {{- if .Values.serviceMonitor.enabled }}
    19      - port: {{ .Values.serviceMonitor.port }}
    20        targetPort: metrics
    21        protocol: TCP
    22        name: metrics
    23        {{- if and (eq .Values.serviceMonitor.type "NodePort") (not (empty .Values.serviceMonitor.nodePort)) }}
    24        nodePort: {{ .Values.serviceMonitor.nodePort }}
    25        {{- end }}
    26      {{- end }}
    27    selector:
    28      {{- include "kubeblocks.selectorLabels" . | nindent 4 }}