readreplicas-dns.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {{- if not .Values.core.standalone }}
  2. # This service is intended for clients running in kubernetes to connect to the
  3. # cluster replica set. This distinguishes it from discovery-lb which is about
  4. # cluster formation and internal communication.
  5. apiVersion: v1
  6. kind: Service
  7. metadata:
  8. name: {{ template "neo4j.replica.fullname" . }}
  9. labels:
  10. neo4j.com/bolt: "true"
  11. neo4j.com/http: "true"
  12. app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
  13. app.kubernetes.io/instance: {{ .Release.Name | quote }}
  14. helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
  15. app.kubernetes.io/name: {{ template "neo4j.replica.fullname" . }}
  16. app.kubernetes.io/component: replica
  17. {{- with .Values.readReplica.service.labels }}
  18. {{ toYaml . | nindent 4 }}
  19. {{- end }}
  20. {{- with .Values.readReplica.service.annotations }}
  21. annotations:
  22. {{- toYaml . | nindent 4 }}
  23. {{- end }}
  24. spec:
  25. {{- if (or (eq .Values.readReplica.service.type "ClusterIP") (empty .Values.readReplica.service.type)) }}
  26. type: ClusterIP
  27. clusterIP: None
  28. {{- else if eq .Values.readReplica.service.type "LoadBalancer" }}
  29. type: LoadBalancer
  30. {{- with .Values.readReplica.service.loadBalancerSourceRanges }}
  31. loadBalancerSourceRanges:
  32. {{ toYaml . | nindent 4 }}
  33. {{- end -}}
  34. {{- else }}
  35. type: {{ .Values.readReplica.service.type }}
  36. {{- end }}
  37. publishNotReadyAddresses: true
  38. ports:
  39. - name: tcp-http
  40. port: 7474
  41. targetPort: 7474
  42. - name: tcp-bolt
  43. port: 7687
  44. targetPort: 7687
  45. - name: tcp-https
  46. port: 7473
  47. targetPort: 7473
  48. selector:
  49. app.kubernetes.io/name: {{ template "neo4j.name" . }}
  50. app.kubernetes.io/instance: {{ .Release.Name | quote }}
  51. app.kubernetes.io/component: replica
  52. {{- end }}