12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- {{- if not .Values.core.standalone }}
- # This service is intended for clients running in kubernetes to connect to the
- # cluster replica set. This distinguishes it from discovery-lb which is about
- # cluster formation and internal communication.
- apiVersion: v1
- kind: Service
- metadata:
- name: {{ template "neo4j.replica.fullname" . }}
- labels:
- neo4j.com/bolt: "true"
- neo4j.com/http: "true"
- app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
- app.kubernetes.io/instance: {{ .Release.Name | quote }}
- helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- app.kubernetes.io/name: {{ template "neo4j.replica.fullname" . }}
- app.kubernetes.io/component: replica
- {{- with .Values.readReplica.service.labels }}
- {{ toYaml . | nindent 4 }}
- {{- end }}
- {{- with .Values.readReplica.service.annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
- {{- end }}
- spec:
- {{- if (or (eq .Values.readReplica.service.type "ClusterIP") (empty .Values.readReplica.service.type)) }}
- type: ClusterIP
- clusterIP: None
- {{- else if eq .Values.readReplica.service.type "LoadBalancer" }}
- type: LoadBalancer
- {{- with .Values.readReplica.service.loadBalancerSourceRanges }}
- loadBalancerSourceRanges:
- {{ toYaml . | nindent 4 }}
- {{- end -}}
- {{- else }}
- type: {{ .Values.readReplica.service.type }}
- {{- end }}
- publishNotReadyAddresses: true
- ports:
- - name: tcp-http
- port: 7474
- targetPort: 7474
- - name: tcp-bolt
- port: 7687
- targetPort: 7687
- - name: tcp-https
- port: 7473
- targetPort: 7473
- selector:
- app.kubernetes.io/name: {{ template "neo4j.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name | quote }}
- app.kubernetes.io/component: replica
- {{- end }}
|