From 4e1b01221216854d5fe73d9d3e62171ffeb7cbf5 Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Wed, 11 Dec 2024 14:16:34 +0200 Subject: [PATCH] Alternate workerPoolHash when dualstack is enabled (#21) Signed-off-by: Artiom Diomin --- pkg/controller/worker/machines.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/controller/worker/machines.go b/pkg/controller/worker/machines.go index 8362ac6e3..03e060914 100644 --- a/pkg/controller/worker/machines.go +++ b/pkg/controller/worker/machines.go @@ -16,6 +16,7 @@ import ( "github.com/gardener/gardener/extensions/pkg/controller/worker" genericworkeractuator "github.com/gardener/gardener/extensions/pkg/controller/worker/genericactuator" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" extensionsv1alpha1helper "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/helper" @@ -378,6 +379,10 @@ func (w *workerDelegate) generateWorkerPoolHash(pool v1alpha1.WorkerPool, worker } } + if nw := w.cluster.Shoot.Spec.Networking; nw != nil && !gardencorev1beta1.IsIPv4SingleStack(nw.IPFamilies) { + additionalData = append(additionalData, "dualstack=enabled") + } + return worker.WorkerPoolHash(pool, w.cluster, []string{}, additionalData) }