apiVersion: v1 kind: Service metadata: name: {{ include "clickhouse.headlessServiceName" . }} namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} app.kubernetes.io/component: clickhouse {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} {{- if or .Values.service.headless.annotations .Values.commonAnnotations }} annotations: {{- if .Values.service.headless.annotations }} {{- include "common.tplvalues.render" (dict "value" .Values.service.headless.annotations "context" $) | nindent 4 }} {{- end }} {{- if .Values.commonAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} {{- end }} {{- end }} spec: type: ClusterIP clusterIP: None publishNotReadyAddresses: true ports: - name: http targetPort: http port: {{ .Values.service.ports.http }} protocol: TCP #- name: tcp # targetPort: tcp # port: {{ .Values.service.ports.tcp }} # protocol: TCP #{{- if .Values.tls.enabled }} #- name: tcp-secure # targetPort: tcp-secure # port: {{ .Values.service.ports.tcpSecure }} # protocol: TCP #{{- end }} #{{- if .Values.keeper.enabled }} #- name: tcp-keeper # targetPort: tcp-keeper # port: {{ .Values.service.ports.keeper }} # protocol: TCP #- name: tcp-keeperinter # targetPort: tcp-keeperinter # port: {{ .Values.service.ports.keeperInter }} # protocol: TCP #{{- if .Values.tls.enabled }} #- name: tcp-keepertls # targetPort: tcp-keepertls # port: {{ .Values.service.ports.keeperSecure }} # protocol: TCP #{{- end }} #{{- end }} #- name: tcp-mysql # targetPort: tcp-mysql # port: {{ .Values.service.ports.mysql }} # protocol: TCP #- name: tcp-postgresql # targetPort: tcp-postgresql # port: {{ .Values.service.ports.postgresql }} # protocol: TCP #- name: http-intersrv # targetPort: http-intersrv # port: {{ .Values.service.ports.interserver }} # protocol: TCP {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: clickhouse