From daa8d3b0fcacf04234bbdee0f75c132e4767315c Mon Sep 17 00:00:00 2001 From: Maciej Zimnoch Date: Tue, 13 Jun 2023 20:29:48 +0200 Subject: [PATCH] Fix NodeConfig DaemonSet prunning Wrong function was passed to controllerhelpers.Prune resulting in sync failing due to failure in deletion. --- pkg/controller/nodeconfig/sync_daemonsets.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/controller/nodeconfig/sync_daemonsets.go b/pkg/controller/nodeconfig/sync_daemonsets.go index c6808d31e1d..d72ff7afce5 100644 --- a/pkg/controller/nodeconfig/sync_daemonsets.go +++ b/pkg/controller/nodeconfig/sync_daemonsets.go @@ -8,6 +8,7 @@ import ( scyllav1alpha1 "github.com/scylladb/scylla-operator/pkg/api/scylla/v1alpha1" "github.com/scylladb/scylla-operator/pkg/controllerhelpers" + "github.com/scylladb/scylla-operator/pkg/naming" "github.com/scylladb/scylla-operator/pkg/resourceapply" appsv1 "k8s.io/api/apps/v1" ) @@ -30,7 +31,7 @@ func (ncc *Controller) syncDaemonSet( requiredDaemonSets, daemonSets, &controllerhelpers.PruneControlFuncs{ - DeleteFunc: ncc.scyllaClient.NodeConfigs().Delete, + DeleteFunc: ncc.kubeClient.AppsV1().DaemonSets(naming.ScyllaOperatorNodeTuningNamespace).Delete, }, ncc.eventRecorder) if err != nil {