X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=helm%2Finfrastructure%2Fsubcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Fnetworkpolicy.yaml;h=ea1fc9b3a2299850d223cb5344ee37e961a9881e;hb=7a43fbd4642448783aaf708d07ca883bf9bc5afd;hp=40496a763f8d743e3c982168ebd34fffa0079878;hpb=282e7af25ec053ae6d1c5a399c91c2c323f705cd;p=ric-plt%2Fric-dep.git diff --git a/helm/infrastructure/subcharts/kong/charts/postgresql/templates/networkpolicy.yaml b/helm/infrastructure/subcharts/kong/charts/postgresql/templates/networkpolicy.yaml index 40496a7..ea1fc9b 100755 --- a/helm/infrastructure/subcharts/kong/charts/postgresql/templates/networkpolicy.yaml +++ b/helm/infrastructure/subcharts/kong/charts/postgresql/templates/networkpolicy.yaml @@ -16,14 +16,23 @@ spec: ingress: # Allow inbound connections - ports: - - port: 5432 - {{- if not .Values.networkPolicy.allowExternal }} + - port: {{ template "postgresql.port" . }} + {{- if not .Values.networkPolicy.allowExternal }} from: - - podSelector: - matchLabels: - {{ template "postgresql.fullname" . }}-client: "true" - {{- end }} + - podSelector: + matchLabels: + {{ template "postgresql.fullname" . }}-client: "true" + {{- if .Values.networkPolicy.explicitNamespacesSelector }} + namespaceSelector: +{{ toYaml .Values.networkPolicy.explicitNamespacesSelector | indent 12 }} + {{- end }} + - podSelector: + matchLabels: + app: {{ template "postgresql.name" . }} + release: {{ .Release.Name | quote }} + role: slave + {{- end }} # Allow prometheus scrapes - ports: - - port: 9187 + - port: 9187 {{- end }}