feat(apps): Add pgweb

This commit is contained in:
2026-10-10 12:23:13 +05:30
parent 1a104cb0c5
commit 390c2e332d
20 changed files with 347 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: pgweb
namespace: pgweb
spec:
# Only traefik may reach pgweb, so authentik can't be bypassed from inside
# the cluster, and pgweb may only reach postgres.
egress:
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
- ports:
- port: 5432
protocol: TCP
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: postgres
podSelector:
matchLabels:
cnpg.io/cluster: postgres
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: traefik
ports:
- port: 8081
protocol: TCP
podSelector:
matchLabels:
app.kubernetes.io/name: pgweb
policyTypes:
- Ingress
- Egress