diff --git a/go.mod b/go.mod index c26dd6896..2358d81ec 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/codeready-toolchain/host-operator require ( github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9 - github.com/codeready-toolchain/toolchain-common v0.0.0-20240417084737-d3c148491687 + github.com/codeready-toolchain/toolchain-common v0.0.0-20240422084400-e6d41ea74313 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.2.3 diff --git a/go.sum b/go.sum index 196b0e71f..adf87b39e 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,8 @@ github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoC github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9 h1:Lm7bFLrzfJzrUiRGVqtsSaZMpj+akLiR/fvAFjjE9gM= github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9/go.mod h1:cfNN6YPX4TORvhhZXMSjSPesqAHlB3nD/WAfGe4WLKQ= -github.com/codeready-toolchain/toolchain-common v0.0.0-20240417084737-d3c148491687 h1:ZPURdFfMNOsEyNKtCTzY9Gsj0jKQL13tR/uj7OAlZL4= -github.com/codeready-toolchain/toolchain-common v0.0.0-20240417084737-d3c148491687/go.mod h1:Iat3N+zBZcVgm/HWxa/ltSEoelM/YCXQUvbL9C8OSTw= +github.com/codeready-toolchain/toolchain-common v0.0.0-20240422084400-e6d41ea74313 h1:UuLjLbn8Rh1QX8jyLipAtaZ3o25Ard33B2+DCcmJLsQ= +github.com/codeready-toolchain/toolchain-common v0.0.0-20240422084400-e6d41ea74313/go.mod h1:rfVQhC9ctteNi2vbg300fgD0zgTfk/h3qjW9nsCayFs= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= diff --git a/main.go b/main.go index ecd59013f..84c9b9423 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,7 @@ import ( "github.com/codeready-toolchain/host-operator/pkg/templates/nstemplatetiers" "github.com/codeready-toolchain/host-operator/pkg/templates/usertiers" "github.com/codeready-toolchain/host-operator/version" + "github.com/codeready-toolchain/toolchain-common/controllers/toolchaincluster" "github.com/codeready-toolchain/toolchain-common/controllers/toolchainclustercache" "github.com/codeready-toolchain/toolchain-common/controllers/toolchainclusterresources" commonclient "github.com/codeready-toolchain/toolchain-common/pkg/client" @@ -223,6 +224,16 @@ func main() { // nolint:gocyclo setupLog.Error(err, "unable to create controller", "controller", "ToolchainClusterCache") os.Exit(1) } + + if err := (&toolchaincluster.Reconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + RequeAfter: 10 * time.Second, + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "ToolchainCluster") + os.Exit(1) + } + if err := (&deactivation.Reconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), @@ -381,9 +392,6 @@ func main() { // nolint:gocyclo os.Exit(1) } - setupLog.Info("Starting ToolchainCluster health checks.") - toolchainclustercache.StartHealthChecks(ctx, mgr, namespace, 10*time.Second) - // create or update Toolchain status during the operator deployment setupLog.Info("Creating/updating the ToolchainStatus resource") if err := toolchainstatus.CreateOrUpdateResources(ctx, mgr.GetClient(), namespace, toolchainconfig.ToolchainStatusName); err != nil {