X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=helm%2Finfrastructure%2Fsubcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Fsvc.yaml;h=0baea4ac84a198d74623c22583865b3227b1b885;hb=7a43fbd4642448783aaf708d07ca883bf9bc5afd;hp=31b9b08d50a991e78164c5406f432234dd3008e0;hpb=282e7af25ec053ae6d1c5a399c91c2c323f705cd;p=ric-plt%2Fric-dep.git diff --git a/helm/infrastructure/subcharts/kong/charts/postgresql/templates/svc.yaml b/helm/infrastructure/subcharts/kong/charts/postgresql/templates/svc.yaml index 31b9b08..0baea4a 100755 --- a/helm/infrastructure/subcharts/kong/charts/postgresql/templates/svc.yaml +++ b/helm/infrastructure/subcharts/kong/charts/postgresql/templates/svc.yaml @@ -9,23 +9,29 @@ metadata: heritage: {{ .Release.Service | quote }} {{- with .Values.service.annotations }} annotations: -{{ toYaml . | indent 4 }} +{{ tpl (toYaml .) $ | indent 4 }} {{- end }} spec: type: {{ .Values.service.type }} {{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }} loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{ with .Values.service.loadBalancerSourceRanges }} +{{ toYaml . | indent 4 }} +{{- end }} {{- end }} {{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }} clusterIP: {{ .Values.service.clusterIP }} {{- end }} ports: - - name: postgresql - port: {{ .Values.service.port }} - targetPort: postgresql - {{- if .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} + - name: tcp-postgresql + port: {{ template "postgresql.port" . }} + targetPort: tcp-postgresql + {{- if .Values.service.nodePort }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} selector: app: {{ template "postgresql.name" . }} release: {{ .Release.Name | quote }}