X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F30-Kong%2Fhelm%2Fkong%2Fcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Fsvc-read.yaml;fp=ric-infra%2F30-Kong%2Fhelm%2Fkong%2Fcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Fsvc-read.yaml;h=6b2de778ab0bbf12fd8c1c17b5302e2adec25fb0;hb=adbdd09e7300845d14107f67034d817286519a40;hp=0000000000000000000000000000000000000000;hpb=67e464c5c70457e37681d96baa79c36b4b26eb3d;p=it%2Fdep.git diff --git a/ric-infra/30-Kong/helm/kong/charts/kong/charts/postgresql/templates/svc-read.yaml b/ric-infra/30-Kong/helm/kong/charts/kong/charts/postgresql/templates/svc-read.yaml new file mode 100755 index 00000000..6b2de778 --- /dev/null +++ b/ric-infra/30-Kong/helm/kong/charts/kong/charts/postgresql/templates/svc-read.yaml @@ -0,0 +1,31 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "postgresql.fullname" . }}-read + labels: + app: {{ template "postgresql.name" . }} + chart: {{ template "postgresql.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- with .Values.service.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + ports: + - name: postgresql + port: {{ .Values.service.port }} + targetPort: postgresql + {{- if .Values.service.nodePort }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} + selector: + app: {{ template "postgresql.name" . }} + release: {{ .Release.Name | quote }} + role: slave +{{- end }}