Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KUBESAW-10: Rename the ToolchainCluster controller to ToolchainCluster_cache controller #999

Merged
merged 6 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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-20240322131000-8d44f7428e83
github.com/codeready-toolchain/toolchain-common v0.0.0-20240403070054-183e7d407080
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-bindata/go-bindata v3.1.2+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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-20240322131000-8d44f7428e83 h1:j+3snE8RGTyB5MdwPUqIfmAm9C2aScCni+ma1EveC4c=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240322131000-8d44f7428e83/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240403070054-183e7d407080 h1:2ZzjVjiEbQmJoLrGfY4A4VH4MEkYj030aZ1gnDUhLgs=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240403070054-183e7d407080/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg=
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=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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"
commonclient "github.com/codeready-toolchain/toolchain-common/pkg/client"
commoncluster "github.com/codeready-toolchain/toolchain-common/pkg/cluster"
commonconfig "github.com/codeready-toolchain/toolchain-common/pkg/configuration"
Expand Down Expand Up @@ -215,12 +215,12 @@ func main() { // nolint:gocyclo
}

// Setup all Controllers
if err = toolchaincluster.NewReconciler(
if err = toolchainclustercache.NewReconciler(
mgr,
namespace,
memberClientTimeout,
Comment on lines +218 to 221
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please update also the error message a few lines below:

setupLog.Error(err, "unable to create controller", "controller", "ToolchainCluster")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean to add "ToolchainClusterCache" instead of "ToolchainCluster"..?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it

).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "ToolchainCluster")
setupLog.Error(err, "unable to create controller", "controller", "ToolchainClusterCache")
os.Exit(1)
}
if err := (&deactivation.Reconciler{
Expand Down Expand Up @@ -382,7 +382,7 @@ func main() { // nolint:gocyclo
}

setupLog.Info("Starting ToolchainCluster health checks.")
toolchaincluster.StartHealthChecks(ctx, mgr, namespace, 10*time.Second)
toolchainclustercache.StartHealthChecks(ctx, mgr, namespace, 10*time.Second)

// create or update Toolchain status during the operator deployment
setupLog.Info("Creating/updating the ToolchainStatus resource")
Expand Down
Loading