chore(apps): Add network policies to apps
This commit is contained in:
@@ -9,3 +9,4 @@ resources:
|
||||
- pgweb-db-sealedsecret.yaml
|
||||
- redoost-db-sealedsecret.yaml
|
||||
- redoost-database.yaml
|
||||
- networkpolicy.yaml
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: postgres
|
||||
spec:
|
||||
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: 6443
|
||||
protocol: TCP
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
cnpg.io/cluster: postgres
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
cnpg.io/cluster: postgres
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: cnpg-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: cloudnative-pg
|
||||
ports:
|
||||
- port: 8000
|
||||
protocol: TCP
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: authentik
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: authentik
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: monitoring
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: grafana
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: pgweb
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: pgweb
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: redoost
|
||||
ports:
|
||||
- port: 5432
|
||||
protocol: TCP
|
||||
podSelector:
|
||||
matchLabels:
|
||||
cnpg.io/cluster: postgres
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
Reference in New Issue
Block a user