Update Kong ingress controller to version 1.4. It fixes the occasional 404 error.
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / charts / postgresql / templates / networkpolicy.yaml
index 40496a7..ea1fc9b 100755 (executable)
@@ -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 }}