From b95acc4113b08a666385757f5aaa4fc14130bc9b Mon Sep 17 00:00:00 2001 From: Marco De Luca Date: Tue, 12 May 2026 10:51:55 +0200 Subject: [PATCH] Fix the topologyKey for CNPG Cluster The chart defaults to `topology.kubernetes.io/zone` which doesn't do much in our setups. --- pkg/comp-functions/functions/vshnpostgrescnpg/deploy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/comp-functions/functions/vshnpostgrescnpg/deploy.go b/pkg/comp-functions/functions/vshnpostgrescnpg/deploy.go index 4f7ab1e423..f73ebd9974 100644 --- a/pkg/comp-functions/functions/vshnpostgrescnpg/deploy.go +++ b/pkg/comp-functions/functions/vshnpostgrescnpg/deploy.go @@ -278,6 +278,9 @@ func createCnpgHelmValues(ctx context.Context, svc *runtime.ServiceRuntime, comp "serverCASecret": certificateSecretName, "serverTLSSecret": certificateSecretName, }, + "affinity": map[string]any{ + "topologyKey": "kubernetes.io/hostname", + }, // The following will be overwritten by setResources() later "storage": map[string]any{}, "resources": map[string]any{