service-headless.yaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: {{ include "clickhouse.headlessServiceName" . }}
  5. namespace: {{ include "common.names.namespace" . | quote }}
  6. labels: {{- include "common.labels.standard" . | nindent 4 }}
  7. app.kubernetes.io/component: clickhouse
  8. {{- if .Values.commonLabels }}
  9. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  10. {{- end }}
  11. {{- if or .Values.service.headless.annotations .Values.commonAnnotations }}
  12. annotations:
  13. {{- if .Values.service.headless.annotations }}
  14. {{- include "common.tplvalues.render" (dict "value" .Values.service.headless.annotations "context" $) | nindent 4 }}
  15. {{- end }}
  16. {{- if .Values.commonAnnotations }}
  17. {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
  18. {{- end }}
  19. {{- end }}
  20. spec:
  21. type: ClusterIP
  22. clusterIP: None
  23. publishNotReadyAddresses: true
  24. ports:
  25. - name: http
  26. targetPort: http
  27. port: {{ .Values.service.ports.http }}
  28. protocol: TCP
  29. #- name: tcp
  30. # targetPort: tcp
  31. # port: {{ .Values.service.ports.tcp }}
  32. # protocol: TCP
  33. #{{- if .Values.tls.enabled }}
  34. #- name: tcp-secure
  35. # targetPort: tcp-secure
  36. # port: {{ .Values.service.ports.tcpSecure }}
  37. # protocol: TCP
  38. #{{- end }}
  39. #{{- if .Values.keeper.enabled }}
  40. #- name: tcp-keeper
  41. # targetPort: tcp-keeper
  42. # port: {{ .Values.service.ports.keeper }}
  43. # protocol: TCP
  44. #- name: tcp-keeperinter
  45. # targetPort: tcp-keeperinter
  46. # port: {{ .Values.service.ports.keeperInter }}
  47. # protocol: TCP
  48. #{{- if .Values.tls.enabled }}
  49. #- name: tcp-keepertls
  50. # targetPort: tcp-keepertls
  51. # port: {{ .Values.service.ports.keeperSecure }}
  52. # protocol: TCP
  53. #{{- end }}
  54. #{{- end }}
  55. #- name: tcp-mysql
  56. # targetPort: tcp-mysql
  57. # port: {{ .Values.service.ports.mysql }}
  58. # protocol: TCP
  59. #- name: tcp-postgresql
  60. # targetPort: tcp-postgresql
  61. # port: {{ .Values.service.ports.postgresql }}
  62. # protocol: TCP
  63. #- name: http-intersrv
  64. # targetPort: http-intersrv
  65. # port: {{ .Values.service.ports.interserver }}
  66. # protocol: TCP
  67. {{- if .Values.service.extraPorts }}
  68. {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
  69. {{- end }}
  70. selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
  71. app.kubernetes.io/component: clickhouse