1 {{- if .Values.networkPolicy.enabled }}
3 apiVersion: {{ template "postgresql.networkPolicy.apiVersion" . }}
5 name: {{ template "postgresql.fullname" . }}
7 app: {{ template "postgresql.name" . }}
8 chart: {{ template "postgresql.chart" . }}
9 release: {{ .Release.Name | quote }}
10 heritage: {{ .Release.Service | quote }}
14 app: {{ template "postgresql.name" . }}
15 release: {{ .Release.Name | quote }}
17 # Allow inbound connections
19 - port: {{ template "postgresql.port" . }}
20 {{- if not .Values.networkPolicy.allowExternal }}
24 {{ template "postgresql.fullname" . }}-client: "true"
25 {{- if .Values.networkPolicy.explicitNamespacesSelector }}
27 {{ toYaml .Values.networkPolicy.explicitNamespacesSelector | indent 12 }}
31 app: {{ template "postgresql.name" . }}
32 release: {{ .Release.Name | quote }}
35 # Allow prometheus scrapes