feat(apps): Add pgweb
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user