core-dns.yaml 1.6 KB

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