fix(k8s): use app.kubernetes.io/name labels in NetworkPolicy egress

All per-service NetworkPolicies used bare 'app: postgres/redis/minio'
selectors but infrastructure pods use 'app.kubernetes.io/name'. This
blocked all egress to databases, causing initContainer hangs and
service connectivity failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-02 00:12:08 +01:00
parent 303e5bd830
commit 83d0f68ab3
8 changed files with 23 additions and 23 deletions

View File

@@ -24,7 +24,7 @@ spec:
- to:
- podSelector:
matchLabels:
app: postgres
app.kubernetes.io/name: postgres
ports:
- protocol: TCP
port: 5432
@@ -32,7 +32,7 @@ spec:
- to:
- podSelector:
matchLabels:
app: redis
app.kubernetes.io/name: redis
ports:
- protocol: TCP
port: 6379
@@ -77,7 +77,7 @@ spec:
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000

View File

@@ -22,21 +22,21 @@ spec:
- to:
- podSelector:
matchLabels:
app: postgres
app.kubernetes.io/name: postgres
ports:
- protocol: TCP
port: 5432
- to:
- podSelector:
matchLabels:
app: redis
app.kubernetes.io/name: redis
ports:
- protocol: TCP
port: 6379
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000

View File

@@ -32,21 +32,21 @@ spec:
- to:
- podSelector:
matchLabels:
app: postgres
app.kubernetes.io/name: postgres
ports:
- protocol: TCP
port: 5432
- to:
- podSelector:
matchLabels:
app: redis
app.kubernetes.io/name: redis
ports:
- protocol: TCP
port: 6379
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000

View File

@@ -22,14 +22,14 @@ spec:
- to:
- podSelector:
matchLabels:
app: postgres
app.kubernetes.io/name: postgres
ports:
- protocol: TCP
port: 5432
- to:
- podSelector:
matchLabels:
app: redis
app.kubernetes.io/name: redis
ports:
- protocol: TCP
port: 6379
@@ -47,7 +47,7 @@ spec:
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000

View File

@@ -22,21 +22,21 @@ spec:
- to:
- podSelector:
matchLabels:
app: postgres
app.kubernetes.io/name: postgres
ports:
- protocol: TCP
port: 5432
- to:
- podSelector:
matchLabels:
app: redis
app.kubernetes.io/name: redis
ports:
- protocol: TCP
port: 6379
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000

View File

@@ -29,21 +29,21 @@ spec:
- to:
- podSelector:
matchLabels:
app: postgres
app.kubernetes.io/name: postgres
ports:
- protocol: TCP
port: 5432
- to:
- podSelector:
matchLabels:
app: redis
app.kubernetes.io/name: redis
ports:
- protocol: TCP
port: 6379
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000

View File

@@ -25,14 +25,14 @@ spec:
- to:
- podSelector:
matchLabels:
app: postgres
app.kubernetes.io/name: postgres
ports:
- protocol: TCP
port: 5432
- to:
- podSelector:
matchLabels:
app: redis
app.kubernetes.io/name: redis
ports:
- protocol: TCP
port: 6379
@@ -46,14 +46,14 @@ spec:
- to:
- podSelector:
matchLabels:
app: questdb
app.kubernetes.io/name: questdb
ports:
- protocol: TCP
port: 9009
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000

View File

@@ -63,7 +63,7 @@ spec:
- to:
- podSelector:
matchLabels:
app: minio
app.kubernetes.io/name: minio
ports:
- protocol: TCP
port: 9000