external-clickhouse-svc.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {{- if .Values.global.externalClickHouse.enabled }}
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: {{ include "deepflow.fullname" . }}-external-clickhouse
  6. labels:
  7. {{- include "deepflow.labels" . | nindent 4 }}
  8. spec:
  9. ports:
  10. - name: tcp-port
  11. port: 9000
  12. targetPort: tcp-port
  13. protocol: TCP
  14. type: ClusterIP
  15. ---
  16. apiVersion: v1
  17. kind: Endpoints
  18. metadata:
  19. name: {{ include "deepflow.fullname" . }}-external-clickhouse
  20. subsets:
  21. {{- range .Values.global.externalClickHouse.hosts }}
  22. - addresses:
  23. - ip: {{ tpl (toString .ip) $ }}
  24. ports:
  25. - name: tcp-port
  26. port: {{ tpl (toString .port) $ }}
  27. protocol: TCP
  28. {{- end }}
  29. {{/*
  30. ---
  31. {{- if eq .Values.global.externalClickhouse.type "cep" }}
  32. apiVersion: sealos.io/v1beta1
  33. kind: ClusterEndpoint
  34. metadata:
  35. name: wordpress
  36. namespace: default
  37. spec:
  38. hosts:
  39. - 172.18.191.215
  40. periodSeconds: 10
  41. ports:
  42. - name: wp-https
  43. protocol: TCP
  44. port: 38081
  45. targetPort: 443
  46. tcpSocket:
  47. enable: true
  48. timeoutSeconds: 1
  49. failureThreshold: 3
  50. successThreshold: 1
  51. - name: wp-http
  52. protocol: TCP
  53. port: 38082
  54. targetPort: 80
  55. httpGet:
  56. path: /healthz
  57. scheme: http
  58. timeoutSeconds: 1
  59. failureThreshold: 3
  60. successThreshold: 1
  61. - name: wp-udp
  62. protocol: UDP
  63. port: 38003
  64. targetPort: 1234
  65. udpSocket:
  66. enable: true
  67. data: "This is flag data for UDP svc test"
  68. timeoutSeconds: 1
  69. failureThreshold: 3
  70. successThreshold: 1
  71. - name: wp-grpc
  72. protocol: TCP
  73. port: 38083
  74. targetPort: 8080
  75. grpc:
  76. enable: true
  77. timeoutSeconds: 1
  78. failureThreshold: 3
  79. successThreshold: 1
  80. {{- end }}
  81. {{- end }}
  82. */}}
  83. {{- end }}