Repository: codeready-toolchain/host-operator
Pull request #1146: SANDBOX-808: update kube & openshift dependencies to 4.17
Author: login: rsoaresd
Labels: name: approved
Created: 2025-02-19T12:23:35Z | Merged: 2025-03-14T06:48:10Z

## Description
Update dependencies

Tool/Library | Current Version | Updates to Version
-- | -- | --
Golang | 1.21 | 1.22
Operator SDK | 1.36 | 1.38
k8s.io/* | v0.29.2 | v0.30.1
controller-runtime | v0.17.3 | v0.18.4

## Note
Operator SDK will be updated in the next set of PRs along with toolchain-cicd and operators update

## Issue ticket number and link
[SANDBOX-808](https://issues.redhat.com/browse/SANDBOX-808)


## Note
snyk reports a lot of vulnerabilities regarding go 1.22. From [snyk's source](https://support.snyk.io/s/article/Resolving-False-Positives-in-Snyk-for-Golang-Projects-by-Enabling-Full-Source-Code-Analysis-beta-feature), it seems all FPs. For more info, check this [Slack thread](https://redhat-internal.slack.com/archives/C061H0CGYBZ/p1739908293680399)


Diff:
diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml
new file mode 100644
index 000000000..d9969eee7
--- /dev/null
+++ b/.github/workflows/govulncheck.yml
@@ -0,0 +1,25 @@
+name: govulncheck
+on:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  govulncheck:
+    name: govulncheck
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v4
+
+    - name: Generate Assets
+      run: |
+        make generate-assets
+
+    - name: Run govulncheck
+      uses: golang/govulncheck-action@v1
+      with:
+        go-version-file: go.mod
+        go-package: ./...
+        repo-checkout: false
\ No newline at end of file
diff --git a/README.adoc b/README.adoc
index 42107515a..2170f5e70 100644
--- a/README.adoc
+++ b/README.adoc
@@ -10,7 +10,7 @@ This is the CodeReady Toolchain Host Operator repository. It contains the OpenSh
 
 == Build
 
-Requires Go version 1.21.x (1.21.13 or higher) - download for your development environment https://golang.org/dl/[here].
+Requires Go version 1.22.x (1.22.12 or higher) - download for your development environment https://golang.org/dl/[here].
 
 This repository uses https://github.com/golang/go/wiki/Modules[Go modules].
 
diff --git a/controllers/masteruserrecord/masteruserrecord_controller.go b/controllers/masteruserrecord/masteruserrecord_controller.go
index c3ae9ec6b..b457e5048 100644
--- a/controllers/masteruserrecord/masteruserrecord_controller.go
+++ b/controllers/masteruserrecord/masteruserrecord_controller.go
@@ -47,9 +47,9 @@ func (r *Reconciler) SetupWithManager(mgr manager.Manager, memberClusters map[st
 
 	// watch UserAccounts in all the member clusters
 	for _, memberCluster := range memberClusters {
-		b = b.WatchesRawSource(source.Kind(memberCluster.Cache, &toolchainv1alpha1.UserAccount{}),
+		b = b.WatchesRawSource(source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.UserAccount{},
 			handler.EnqueueRequestsFromMapFunc(mapper.MapByResourceName(r.Namespace)),
-		)
+		))
 	}
 	return b.Complete(r)
 }
diff --git a/controllers/space/space_controller.go b/controllers/space/space_controller.go
index df01e1368..fdd3f33cc 100644
--- a/controllers/space/space_controller.go
+++ b/controllers/space/space_controller.go
@@ -47,16 +47,16 @@ type Reconciler struct {
 func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, memberClusters map[string]cluster.Cluster) error {
 	b := ctrl.NewControllerManagedBy(mgr).
 		// watch Spaces in the host cluster
-		For(&toolchainv1alpha1.Space{}, builder.WithPredicates(predicate.Or(predicate.GenerationChangedPredicate{}, predicate.AnnotationChangedPredicate{}))).
+		For(&toolchainv1alpha1.Space{}, builder.WithPredicates(predicate.Or[runtimeclient.Object](predicate.GenerationChangedPredicate{}, predicate.AnnotationChangedPredicate{}))).
 		Watches(&toolchainv1alpha1.NSTemplateTier{},
 			handler.EnqueueRequestsFromMapFunc(MapNSTemplateTierToSpaces(r.Namespace, r.Client))).
 		Watches(&toolchainv1alpha1.SpaceBinding{},
 			handler.EnqueueRequestsFromMapFunc(MapSpaceBindingToParentAndSubSpaces(r.Client)))
 	// watch NSTemplateSets in all the member clusters
 	for _, memberCluster := range memberClusters {
-		b = b.WatchesRawSource(source.Kind(memberCluster.Cache, &toolchainv1alpha1.NSTemplateSet{}),
+		b = b.WatchesRawSource(source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.NSTemplateSet{},
 			handler.EnqueueRequestsFromMapFunc(mapper.MapByResourceName(r.Namespace)),
-		)
+		))
 	}
 	return b.Complete(r)
 }
diff --git a/controllers/spacebindingrequest/spacebindingrequest_controller.go b/controllers/spacebindingrequest/spacebindingrequest_controller.go
index e3ed6f963..0caea13c7 100644
--- a/controllers/spacebindingrequest/spacebindingrequest_controller.go
+++ b/controllers/spacebindingrequest/spacebindingrequest_controller.go
@@ -16,7 +16,6 @@ import (
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/types"
 	ctrl "sigs.k8s.io/controller-runtime"
-	"sigs.k8s.io/controller-runtime/pkg/builder"
 	runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/handler"
 	"sigs.k8s.io/controller-runtime/pkg/log"
@@ -49,9 +48,9 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, memberClusters map[strin
 	// Watch SpaceBindingRequests in all member clusters and all namespaces.
 	for _, memberCluster := range memberClusters {
 		b = b.WatchesRawSource(
-			source.Kind(memberCluster.Cache, &toolchainv1alpha1.SpaceBindingRequest{}),
-			&handler.EnqueueRequestForObject{},
-			builder.WithPredicates(predicate.GenerationChangedPredicate{}))
+			source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.SpaceBindingRequest{},
+				&handler.EnqueueRequestForObject{},
+				predicate.GenerationChangedPredicate{}))
 	}
 	return b.Complete(r)
 }
diff --git a/controllers/spaceprovisionerconfig/spaceprovisionerconfig_controller_test.go b/controllers/spaceprovisionerconfig/spaceprovisionerconfig_controller_test.go
index 1ebe85a16..56e47d271 100644
--- a/controllers/spaceprovisionerconfig/spaceprovisionerconfig_controller_test.go
+++ b/controllers/spaceprovisionerconfig/spaceprovisionerconfig_controller_test.go
@@ -49,7 +49,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc, Is(Ready()), Has(ConsumedSpaceCount(3)), Has(ConsumedMemoryUsage(map[string]int{"worker": 50})))
 	})
 
@@ -74,7 +74,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(NotReadyWithReason(toolchainv1alpha1.SpaceProvisionerConfigDisabledReason)),
 			Has(UnknownConsumedCapacity()))
@@ -91,7 +91,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(NotReadyWithReason(toolchainv1alpha1.SpaceProvisionerConfigToolchainClusterNotFoundReason)),
 			Has(UnknownConsumedCapacity()))
@@ -119,7 +119,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(NotReadyWithReason(toolchainv1alpha1.SpaceProvisionerConfigToolchainClusterNotFoundReason)),
 			Has(UnknownConsumedCapacity()))
@@ -147,7 +147,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(NotReadyWithReason(toolchainv1alpha1.SpaceProvisionerConfigToolchainClusterNotReadyReason)),
 			Has(UnknownConsumedCapacity()))
@@ -172,7 +172,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(NotReadyWithReason(toolchainv1alpha1.SpaceProvisionerConfigInsufficientCapacityReason)),
 			Has(ConsumedSpaceCount(5)),
@@ -199,7 +199,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(NotReadyWithReason(toolchainv1alpha1.SpaceProvisionerConfigInsufficientCapacityReason)),
 			Has(ConsumedSpaceCount(3)),
@@ -227,7 +227,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(NotReadyWithReason(toolchainv1alpha1.SpaceProvisionerConfigInsufficientCapacityReason)),
 			Has(ConsumedSpaceCount(3)),
@@ -245,7 +245,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Has(ReadyStatusAndReason(corev1.ConditionUnknown, toolchainv1alpha1.SpaceProvisionerConfigInsufficientCapacityReason)),
 			Has(UnknownConsumedCapacity()))
@@ -268,7 +268,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Has(ReadyStatusAndReason(corev1.ConditionUnknown, toolchainv1alpha1.SpaceProvisionerConfigInsufficientCapacityReason)),
 			Has(ConsumedSpaceCount(3)),
@@ -294,7 +294,7 @@ func TestSpaceProvisionerConfigReadinessTracking(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		AssertThat(t, spc,
 			Is(Ready()),
 			Has(ConsumedSpaceCount(3_000_000)),
@@ -318,7 +318,7 @@ func TestSpaceProvisionerConfigReEnqueing(t *testing.T) {
 		_, reconcileErr := r.Reconcile(context.TODO(), req)
 
 		// then
-		assert.ErrorIs(t, reconcileErr, expectedErr)
+		require.ErrorIs(t, reconcileErr, expectedErr)
 	})
 	t.Run("re-enqueues and reports error in status on failure to get ToolchainCluster", func(t *testing.T) {
 		// given
@@ -356,7 +356,7 @@ func TestSpaceProvisionerConfigReEnqueing(t *testing.T) {
 		_, reconcileErr := r.Reconcile(context.TODO(), req)
 
 		// then
-		assert.ErrorIs(t, reconcileErr, expectedErr)
+		require.ErrorIs(t, reconcileErr, expectedErr)
 	})
 	t.Run("doesn't re-enqueue when object not found", func(t *testing.T) {
 		// given
@@ -386,7 +386,7 @@ func TestSpaceProvisionerConfigReEnqueing(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		assert.False(t, res.Requeue)
 		assert.Empty(t, spc.Status.Conditions)
 	})
@@ -406,7 +406,7 @@ func TestSpaceProvisionerConfigReEnqueing(t *testing.T) {
 		require.NoError(t, cl.Get(context.TODO(), runtimeclient.ObjectKeyFromObject(spc), spc))
 
 		// then
-		assert.NoError(t, reconcileErr)
+		require.NoError(t, reconcileErr)
 		assert.False(t, res.Requeue)
 		assert.NotEmpty(t, spc.Status.Conditions)
 	})
diff --git a/controllers/spacerequest/spacerequest_controller.go b/controllers/spacerequest/spacerequest_controller.go
index caaec442b..3117c1c6e 100644
--- a/controllers/spacerequest/spacerequest_controller.go
+++ b/controllers/spacerequest/spacerequest_controller.go
@@ -22,7 +22,6 @@ import (
 	"k8s.io/client-go/tools/clientcmd"
 	"k8s.io/client-go/tools/clientcmd/api"
 	ctrl "sigs.k8s.io/controller-runtime"
-	"sigs.k8s.io/controller-runtime/pkg/builder"
 	runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
 	"sigs.k8s.io/controller-runtime/pkg/handler"
@@ -60,9 +59,9 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, memberClusters map[strin
 	// Watch SpaceRequests in all member clusters and all namespaces.
 	for _, memberCluster := range memberClusters {
 		b = b.WatchesRawSource(
-			source.Kind(memberCluster.Cache, &toolchainv1alpha1.SpaceRequest{}),
-			&handler.EnqueueRequestForObject{},
-			builder.WithPredicates(predicate.GenerationChangedPredicate{}))
+			source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.SpaceRequest{},
+				&handler.EnqueueRequestForObject{},
+				predicate.GenerationChangedPredicate{}))
 	}
 	return b.Complete(r)
 }
diff --git a/go.mod b/go.mod
index f7915f917..828d1ab2c 100644
--- a/go.mod
+++ b/go.mod
@@ -2,17 +2,17 @@ module github.com/codeready-toolchain/host-operator
 
 require (
 	cloud.google.com/go/recaptchaenterprise/v2 v2.13.0
-	github.com/codeready-toolchain/api v0.0.0-20250304130838-c9c2ff18f4de
-	github.com/codeready-toolchain/toolchain-common v0.0.0-20250303095208-d379ee86d136
+	github.com/codeready-toolchain/api v0.0.0-20250313170542-4e3c4147cb80
+	github.com/codeready-toolchain/toolchain-common v0.0.0-20250313203311-0bce6563576f
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/go-bindata/go-bindata v3.1.2+incompatible
 	github.com/go-logr/logr v1.4.1
 	github.com/gofrs/uuid v4.4.0+incompatible
 	github.com/mailgun/mailgun-go/v4 v4.8.1
-	// using latest commit from 'github.com/openshift/api branch release-4.16'
-	github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094
-	// using latest commit from 'github.com/openshift/library-go branch release-4.16'
-	github.com/openshift/library-go v0.0.0-20240711192904-190fec8c3f09 // indirect
+	// using latest commit from 'github.com/openshift/api branch release-4.17'
+	github.com/openshift/api v0.0.0-20250214103856-0cfc958f642b
+	// using latest commit from 'github.com/openshift/library-go branch release-4.17'
+	github.com/openshift/library-go v0.0.0-20241118144106-bfd968d8eef4 // indirect
 	github.com/pkg/errors v0.9.1
 	github.com/prometheus/client_golang v1.18.0
 	github.com/redhat-cop/operator-utils v1.3.8
@@ -22,13 +22,13 @@ require (
 	go.uber.org/zap v1.26.0
 	gopkg.in/h2non/gock.v1 v1.0.14
 	gopkg.in/yaml.v2 v2.4.0
-	k8s.io/api v0.29.2
-	k8s.io/apiextensions-apiserver v0.29.2
-	k8s.io/apimachinery v0.29.2
-	k8s.io/client-go v0.29.2
+	k8s.io/api v0.30.1
+	k8s.io/apiextensions-apiserver v0.30.1
+	k8s.io/apimachinery v0.30.1
+	k8s.io/client-go v0.30.1
 	k8s.io/klog v1.0.0
-	k8s.io/klog/v2 v2.110.1
-	sigs.k8s.io/controller-runtime v0.17.3
+	k8s.io/klog/v2 v2.120.1
+	sigs.k8s.io/controller-runtime v0.18.4
 )
 
 require (
@@ -46,7 +46,7 @@ require (
 	github.com/cloudflare/circl v1.3.7 // indirect
 	github.com/emicklei/go-restful/v3 v3.11.0 // indirect
 	github.com/evanphx/json-patch v5.7.0+incompatible // indirect
-	github.com/evanphx/json-patch/v5 v5.8.0 // indirect
+	github.com/evanphx/json-patch/v5 v5.9.0 // indirect
 	github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
 	github.com/fsnotify/fsnotify v1.7.0 // indirect
 	github.com/go-errors/errors v1.4.2 // indirect
@@ -115,10 +115,9 @@ require (
 	google.golang.org/protobuf v1.34.0 // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
-	k8s.io/cli-runtime v0.29.2 // indirect
-	k8s.io/component-base v0.29.2 // indirect
-	k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
-	k8s.io/kubectl v0.29.2 // indirect
+	k8s.io/cli-runtime v0.30.1 // indirect
+	k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
+	k8s.io/kubectl v0.30.1 // indirect
 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
 	sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
@@ -127,4 +126,6 @@ require (
 	sigs.k8s.io/yaml v1.4.0 // indirect
 )
 
-go 1.21
+go 1.22.0
+
+toolchain go1.22.12
diff --git a/go.sum b/go.sum
index 42fa09c37..c6a7d4ce8 100644
--- a/go.sum
+++ b/go.sum
@@ -36,10 +36,10 @@ github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtM
 github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
 github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/codeready-toolchain/api v0.0.0-20250304130838-c9c2ff18f4de h1:64key4W/2oUqzwt3z4ZOanPGgHKJMiKUwYaUUpeUO8Q=
-github.com/codeready-toolchain/api v0.0.0-20250304130838-c9c2ff18f4de/go.mod h1:gPwicZPTmRm1PF75ysEYXaYKdXoFgwgCggTJd1oYmOs=
-github.com/codeready-toolchain/toolchain-common v0.0.0-20250303095208-d379ee86d136 h1:IqJ1tXl6IJuCqAW9MSji9TbMX2zWLBMEWD82u6+yui8=
-github.com/codeready-toolchain/toolchain-common v0.0.0-20250303095208-d379ee86d136/go.mod h1:mNRKnxjBHxggT03t6TwGJT5AZvmHMn6oQ32DrkGwV+w=
+github.com/codeready-toolchain/api v0.0.0-20250313170542-4e3c4147cb80 h1:wh41dZ7VkyClQWiMJbMypku6xTxtxNZTgQJUAcodgUo=
+github.com/codeready-toolchain/api v0.0.0-20250313170542-4e3c4147cb80/go.mod h1:shTTQ+bYWinbdF/oK+ly4DO5jdXtIASZ+uPZElsmsKg=
+github.com/codeready-toolchain/toolchain-common v0.0.0-20250313203311-0bce6563576f h1:qBUZ/xBNgDMf5Y0tObJ85/9GcDSgtUf8WFfCrNSxaZ4=
+github.com/codeready-toolchain/toolchain-common v0.0.0-20250313203311-0bce6563576f/go.mod h1:0dopWh1MWi9eg2d5RAd4uSUmXfDMqz4Yk2oNPHF15+Y=
 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -52,8 +52,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
 github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI=
 github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
-github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro=
-github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
+github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
+github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
 github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM=
 github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
 github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ=
@@ -74,7 +74,6 @@ github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBj
 github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
 github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
 github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
 github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
@@ -198,14 +197,14 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m
 github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
 github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
 github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
-github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY=
-github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw=
-github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
-github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
-github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 h1:J1wuGhVxpsHykZBa6Beb1gQ96Ptej9AE/BvwCBiRj1E=
-github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
-github.com/openshift/library-go v0.0.0-20240711192904-190fec8c3f09 h1:2Ed1mxJTRFpbHIynxkuIyADeWdtyQ6NEZkTaf0wG39M=
-github.com/openshift/library-go v0.0.0-20240711192904-190fec8c3f09/go.mod h1:lFwyRj0XjUf25Da3Q00y+KuaxCWTJ6YzYPDX1+96nco=
+github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8=
+github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
+github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE=
+github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY=
+github.com/openshift/api v0.0.0-20250214103856-0cfc958f642b h1:jFfqihvTve/aXan02sfyN8pTBQ0A02AvaXUVZw+2w00=
+github.com/openshift/api v0.0.0-20250214103856-0cfc958f642b/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM=
+github.com/openshift/library-go v0.0.0-20241118144106-bfd968d8eef4 h1:PMSC7hk/jrgRPztEw5kBonLZ5O/0NvhY8elZlZ9kvnE=
+github.com/openshift/library-go v0.0.0-20241118144106-bfd968d8eef4/go.mod h1:PdASVamWinll2BPxiUpXajTwZxV8A1pQbWEsCN1od7I=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -427,30 +426,28 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A=
-k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0=
-k8s.io/apiextensions-apiserver v0.29.2 h1:UK3xB5lOWSnhaCk0RFZ0LUacPZz9RY4wi/yt2Iu+btg=
-k8s.io/apiextensions-apiserver v0.29.2/go.mod h1:aLfYjpA5p3OwtqNXQFkhJ56TB+spV8Gc4wfMhUA3/b8=
-k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8=
-k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU=
-k8s.io/cli-runtime v0.29.2 h1:smfsOcT4QujeghsNjECKN3lwyX9AwcFU0nvJ7sFN3ro=
-k8s.io/cli-runtime v0.29.2/go.mod h1:KLisYYfoqeNfO+MkTWvpqIyb1wpJmmFJhioA0xd4MW8=
-k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg=
-k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA=
-k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8=
-k8s.io/component-base v0.29.2/go.mod h1:BfB3SLrefbZXiBfbM+2H1dlat21Uewg/5qtKOl8degM=
+k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY=
+k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM=
+k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws=
+k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4=
+k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U=
+k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
+k8s.io/cli-runtime v0.30.1 h1:kSBBpfrJGS6lllc24KeniI9JN7ckOOJKnmFYH1RpTOw=
+k8s.io/cli-runtime v0.30.1/go.mod h1:zhHgbqI4J00pxb6gM3gJPVf2ysDjhQmQtnTxnMScab8=
+k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q=
+k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc=
 k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
 k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
-k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
-k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
-k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
-k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
-k8s.io/kubectl v0.29.2 h1:uaDYaBhumvkwz0S2XHt36fK0v5IdNgL7HyUniwb2IUo=
-k8s.io/kubectl v0.29.2/go.mod h1:BhizuYBGcKaHWyq+G7txGw2fXg576QbPrrnQdQDZgqI=
+k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
+k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
+k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
+k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
+k8s.io/kubectl v0.30.1 h1:sHFIRI3oP0FFZmBAVEE8ErjnTyXDPkBcvO88mH9RjuY=
+k8s.io/kubectl v0.30.1/go.mod h1:7j+L0Cc38RYEcx+WH3y44jRBe1Q1jxdGPKkX0h4iDq0=
 k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
 k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
-sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
-sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
+sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw=
+sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=
 sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
 sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
 sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0=
diff --git a/openshift-ci/Dockerfile.tools b/openshift-ci/Dockerfile.tools
index 93a34989b..c362bc468 100644
--- a/openshift-ci/Dockerfile.tools
+++ b/openshift-ci/Dockerfile.tools
@@ -8,8 +8,8 @@ ENV LANG=en_US.utf8 \
     GOCACHE=/tmp/.cache \
     GIT_COMMITTER_NAME="KubeSaw" \
     GIT_COMMITTER_EMAIL=devsandbox@redhat.com \
-    GOLANG_VERSION=go1.21.13 \
-    GOLANG_SHA256=502fc16d5910562461e6a6631fb6377de2322aad7304bf2bcd23500ba9dab4a7
+    GOLANG_VERSION=go1.22.12 \
+    GOLANG_SHA256=4fa4f869b0f7fc6bb1eb2660e74657fbf04cdd290b5aef905585c86051b34d43
 
 ARG GO_PACKAGE_PATH=github.com/codeready-toolchain/host-operator
 
diff --git a/pkg/counter/cache_test.go b/pkg/counter/cache_test.go
index f12f606a0..20032af85 100644
--- a/pkg/counter/cache_test.go
+++ b/pkg/counter/cache_test.go
@@ -2,10 +2,11 @@ package counter_test
 
 import (
 	"context"
-	runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
 	"sync"
 	"testing"
 
+	runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
+
 	toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1"
 	"github.com/codeready-toolchain/host-operator/pkg/counter"
 	"github.com/codeready-toolchain/host-operator/pkg/metrics"
diff --git a/pkg/templates/usertiers/usertier_generator_whitebox_test.go b/pkg/templates/usertiers/usertier_generator_whitebox_test.go
index ad0e1cf4f..135337d45 100644
--- a/pkg/templates/usertiers/usertier_generator_whitebox_test.go
+++ b/pkg/templates/usertiers/usertier_generator_whitebox_test.go
@@ -125,7 +125,7 @@ func TestLoadTemplatesByTiers(t *testing.T) {
 			_, err := loadTemplatesByTiers(assets)
 			// then
 			require.Error(t, err)
-			assert.EqualError(t, err, "unable to load templates: invalid name format for file '.DS_Store'")
+			require.EqualError(t, err, "unable to load templates: invalid name format for file '.DS_Store'")
 		})
 
 		t.Run("invalid filename scope", func(t *testing.T) {
diff --git a/test/spacebinding/spacebinding_assertions.go b/test/spacebinding/spacebinding_assertions.go
index 79d9efff3..a0e05abd8 100644
--- a/test/spacebinding/spacebinding_assertions.go
+++ b/test/spacebinding/spacebinding_assertions.go
@@ -64,7 +64,7 @@ func (a *Assertion) Exists() *Assertion {
 func (a *Assertion) DoesNotExist() *Assertion {
 	err := a.loadResource()
 	require.Error(a.t, err)
-	assert.EqualError(a.t, err, "no spacebinding found")
+	require.EqualError(a.t, err, "no spacebinding found")
 	return a
 }
 


Reviews:
user: login: alexeykazakov
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-02-19T20:24:34Z
user: login: ranakan19
body: Looks good
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-02-26T00:04:45Z
user: login: MatousJobanek
body: Looks good :+1: 
I would love to use the generic functions to propagate the object type into the specific predicates & mappers. This can be done as a separate task though - in a separate PR, let's just create a story for it.
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-02-27T19:17:13Z
user: login: fbm3307
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-02-28T08:10:26Z
user: login: rsoaresd
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T11:35:28Z
user: login: rsoaresd
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T11:44:23Z

Review comments:
diff_hunk: @@ -49,9 +48,9 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, memberClusters map[strin
 	// Watch SpaceBindingRequests in all member clusters and all namespaces.
 	for _, memberCluster := range memberClusters {
 		b = b.WatchesRawSource(
-			source.Kind(memberCluster.Cache, &toolchainv1alpha1.SpaceBindingRequest{}),
-			&handler.EnqueueRequestForObject{},
-			builder.WithPredicates(predicate.GenerationChangedPredicate{}))
+			source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.SpaceBindingRequest{},
+				&handler.EnqueueRequestForObject{},
+				predicate.GenerationChangedPredicate{}))
path: controllers/spacebindingrequest/spacebindingrequest_controller.go
user: login: MatousJobanek
body: Btw, there are typed versions of the handlers and predicates, so you can use it:
```go
source.Kind(memberCluster.Cache, &toolchainv1alpha1.SpaceBindingRequest{},
	&handler.TypedEnqueueRequestForObject[*toolchainv1alpha1.SpaceBindingRequest]{},
	predicate.TypedGenerationChangedPredicate[*toolchainv1alpha1.SpaceBindingRequest]{}))
```
but I'm not sure if it makes any sense in this particular case
created_at: 2025-02-27T19:08:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -47,9 +47,9 @@ func (r *Reconciler) SetupWithManager(mgr manager.Manager, memberClusters map[st
 
 	// watch UserAccounts in all the member clusters
 	for _, memberCluster := range memberClusters {
-		b = b.WatchesRawSource(source.Kind(memberCluster.Cache, &toolchainv1alpha1.UserAccount{}),
+		b = b.WatchesRawSource(source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.UserAccount{},
 			handler.EnqueueRequestsFromMapFunc(mapper.MapByResourceName(r.Namespace)),
-		)
+		))
path: controllers/masteruserrecord/masteruserrecord_controller.go
user: login: MatousJobanek
body: probably not really related to this particular case since the mapper is generic, but there a function 
```go
handler.TypedEnqueueRequestsFromMapFunc
```
that takes the type provided in the `source.Kind` function and use it as the generics to provide the same type down to the mapper and predicate. This can be very useful in the mappers and predicates that are specific to resource kind like this one:
https://github.com/codeready-toolchain/host-operator/blob/2d3af3b9d8435075a9d070c470d5b02fa4c8b0d0/controllers/usersignup/mapper.go#L15-L18
or this one:
https://github.com/codeready-toolchain/host-operator/blob/2d3af3b9d8435075a9d070c470d5b02fa4c8b0d0/controllers/spaceprovisionerconfig/mapper.go#L28-L33
 and there will be a few more
created_at: 2025-02-27T19:15:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -49,9 +48,9 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, memberClusters map[strin
 	// Watch SpaceBindingRequests in all member clusters and all namespaces.
 	for _, memberCluster := range memberClusters {
 		b = b.WatchesRawSource(
-			source.Kind(memberCluster.Cache, &toolchainv1alpha1.SpaceBindingRequest{}),
-			&handler.EnqueueRequestForObject{},
-			builder.WithPredicates(predicate.GenerationChangedPredicate{}))
+			source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.SpaceBindingRequest{},
+				&handler.EnqueueRequestForObject{},
+				predicate.GenerationChangedPredicate{}))
path: controllers/spacebindingrequest/spacebindingrequest_controller.go
user: login: rsoaresd
body: I think I tried that way when I saw that we needed to refactor the code. It gives this error:

> type predicate.TypedGenerationChangedPredicate[*v1alpha1.SpaceBindingRequest] of predicate.TypedGenerationChangedPredicate[*toolchainv1alpha1.SpaceBindingRequest]{} does not match predicate.TypedPredicate[T] (cannot infer T)compiler[CannotInferTypeArgs](https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#CannotInferTypeArgs)

created_at: 2025-03-05T11:35:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -47,9 +47,9 @@ func (r *Reconciler) SetupWithManager(mgr manager.Manager, memberClusters map[st
 
 	// watch UserAccounts in all the member clusters
 	for _, memberCluster := range memberClusters {
-		b = b.WatchesRawSource(source.Kind(memberCluster.Cache, &toolchainv1alpha1.UserAccount{}),
+		b = b.WatchesRawSource(source.Kind[runtimeclient.Object](memberCluster.Cache, &toolchainv1alpha1.UserAccount{},
 			handler.EnqueueRequestsFromMapFunc(mapper.MapByResourceName(r.Namespace)),
-		)
+		))
path: controllers/masteruserrecord/masteruserrecord_controller.go
user: login: rsoaresd
body: Do you mean replacing `EnqueueRequestsFromMapFunc` with `TypedEnqueueRequestsFromMapFunc` on those calls and refactoring the code?
created_at: 2025-03-05T11:44:23Z
author_association: CONTRIBUTOR

PR comments:
user: login: openshift-ci[bot]
created_at: 2025-02-28T08:10:30Z
body: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/codeready-toolchain/host-operator/pull/1146#pullrequestreview-2627901841" title="Approved">alexeykazakov</a>*, *<a href="https://github.com/codeready-toolchain/host-operator/pull/1146#pullrequestreview-2650037524" title="Approved">fbm3307</a>*, *<a href="https://github.com/codeready-toolchain/host-operator/pull/1146#pullrequestreview-2648810865" title="Approved">MatousJobanek</a>*, *<a href="https://github.com/codeready-toolchain/host-operator/pull/1146#pullrequestreview-2642726784" title="Approved">ranakan19</a>*, *<a href="https://github.com/codeready-toolchain/host-operator/pull/1146#" title="Author self-approved">rsoaresd</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=codeready-toolchain%2Fhost-operator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/codeready-toolchain/host-operator/blob/master/OWNERS)~~ [MatousJobanek,alexeykazakov,fbm3307,ranakan19,rsoaresd]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
author_association: NONE
user: login: rsoaresd
created_at: 2025-03-05T11:31:15Z
body: > Looks good 👍 I would love to use the generic functions to propagate the object type into the specific predicates & mappers. This can be done as a separate task though - in a separate PR, let's just create a story for it.

@MatousJobanek thank you so much! https://issues.redhat.com/browse/SANDBOX-1022
author_association: CONTRIBUTOR
user: login: sonarqubecloud[bot]
created_at: 2025-03-13T20:35:55Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=codeready-toolchain_host-operator&pullRequest=1146) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=codeready-toolchain_host-operator&pullRequest=1146&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=codeready-toolchain_host-operator&pullRequest=1146&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=codeready-toolchain_host-operator&pullRequest=1146&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=codeready-toolchain_host-operator&pullRequest=1146&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [6.7% Duplication on New Code](https://sonarcloud.io/component_measures?id=codeready-toolchain_host-operator&pullRequest=1146&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=codeready-toolchain_host-operator&pullRequest=1146)


author_association: NONE
user: login: codecov[bot]
created_at: 2025-03-14T06:48:23Z
body: ## [Codecov](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) Report
Attention: Patch coverage is `8.33333%` with `11 lines` in your changes missing coverage. Please review.
> Project coverage is 79.68%. Comparing base [(`62dcb7b`)](https://app.codecov.io/gh/codeready-toolchain/host-operator/commit/62dcb7b87895ef5735c9fe77281956cabd6b9ff0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) to head [(`506102f`)](https://app.codecov.io/gh/codeready-toolchain/host-operator/commit/506102f536de789877ff4af9907e7bb18a7e2ca1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain).
> Report is 1 commits behind head on master.

| [Files with missing lines](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) | Patch % | Lines |
|---|---|---|
| [controllers/space/space\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fspace%2Fspace_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvc3BhY2Uvc3BhY2VfY29udHJvbGxlci5nbw==) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) |
| [...cebindingrequest/spacebindingrequest\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fspacebindingrequest%2Fspacebindingrequest_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvc3BhY2ViaW5kaW5ncmVxdWVzdC9zcGFjZWJpbmRpbmdyZXF1ZXN0X2NvbnRyb2xsZXIuZ28=) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) |
| [...ontrollers/spacerequest/spacerequest\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fspacerequest%2Fspacerequest_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvc3BhY2VyZXF1ZXN0L3NwYWNlcmVxdWVzdF9jb250cm9sbGVyLmdv) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) |
| [...rs/masteruserrecord/masteruserrecord\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fmasteruserrecord%2Fmasteruserrecord_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvbWFzdGVydXNlcnJlY29yZC9tYXN0ZXJ1c2VycmVjb3JkX2NvbnRyb2xsZXIuZ28=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) |

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master    #1146   +/-   ##
=======================================
  Coverage   79.68%   79.68%           
=======================================
  Files          82       82           
  Lines        8245     8245           
=======================================
  Hits         6570     6570           
  Misses       1479     1479           
  Partials      196      196           
```

| [Files with missing lines](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain) | Coverage Δ | |
|---|---|---|
| [test/spacebinding/spacebinding\_assertions.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=test%2Fspacebinding%2Fspacebinding_assertions.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-dGVzdC9zcGFjZWJpbmRpbmcvc3BhY2ViaW5kaW5nX2Fzc2VydGlvbnMuZ28=) | `88.23% <100.00%> (ø)` | |
| [...rs/masteruserrecord/masteruserrecord\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fmasteruserrecord%2Fmasteruserrecord_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvbWFzdGVydXNlcnJlY29yZC9tYXN0ZXJ1c2VycmVjb3JkX2NvbnRyb2xsZXIuZ28=) | `80.64% <0.00%> (ø)` | |
| [controllers/space/space\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fspace%2Fspace_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvc3BhY2Uvc3BhY2VfY29udHJvbGxlci5nbw==) | `85.98% <0.00%> (ø)` | |
| [...cebindingrequest/spacebindingrequest\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fspacebindingrequest%2Fspacebindingrequest_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvc3BhY2ViaW5kaW5ncmVxdWVzdC9zcGFjZWJpbmRpbmdyZXF1ZXN0X2NvbnRyb2xsZXIuZ28=) | `84.47% <0.00%> (ø)` | |
| [...ontrollers/spacerequest/spacerequest\_controller.go](https://app.codecov.io/gh/codeready-toolchain/host-operator/pull/1146?src=pr&el=tree&filepath=controllers%2Fspacerequest%2Fspacerequest_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codeready-toolchain#diff-Y29udHJvbGxlcnMvc3BhY2VyZXF1ZXN0L3NwYWNlcmVxdWVzdF9jb250cm9sbGVyLmdv) | `87.79% <0.00%> (ø)` | |

</details>
<details><summary>🚀 New features to boost your workflow: </summary>

- ❄ [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
author_association: NONE