helm-charts/charts/pgadmin4/templates/networkpolicy.yaml
2025-04-14 07:09:14 +00:00

21 lines
574 B
YAML

{{- if .Values.networkPolicy.enabled -}}
{{- $fullName := include "pgadmin.fullname" . -}}
apiVersion: {{ template "networkPolicy.apiVersion" . }}
kind: NetworkPolicy
metadata:
name: {{ $fullName }}
namespace: {{ include "pgadmin.namespaceName" . }}
labels:
{{- include "pgadmin.labels" . | nindent 4 }}
spec:
policyTypes:
- Ingress
podSelector:
matchLabels:
app.kubernetes.io/name: {{ include "pgadmin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
ingress:
- ports:
- port: {{ .Values.service.targetPort }}
{{- end }}