Skip to content

Commit

Permalink
Dropping the unused parameters (#925)
Browse files Browse the repository at this point in the history
* Dropping the unused parameters

Signed-off-by: Feny Mehta <fbm3307@gmail.com>

* Removing the unrelated changes in CRD

Signed-off-by: Feny Mehta <fbm3307@gmail.com>

* Update the api version and mur controller

Signed-off-by: Feny Mehta <fbm3307@gmail.com>

* Removing the replace

Signed-off-by: Feny Mehta <fbm3307@gmail.com>

* Updating the APi and toolchain-common dependencies

Signed-off-by: Feny Mehta <fbm3307@gmail.com>

---------

Signed-off-by: Feny Mehta <fbm3307@gmail.com>
Co-authored-by: Francisc Munteanu <fmuntean@redhat.com>
Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
  • Loading branch information
3 people authored Nov 22, 2023
1 parent bf36f66 commit f2ede04
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,11 @@ spec:
cluster:
description: Cluster is the cluster in which the user exists
properties:
apiEndpoint:
description: APIEndpoint is the API Endpoint of the cluster
type: string
cheDashboardURL:
description: CheDashboardURL is the Che Dashboard URL of
the cluster if Che is installed
type: string
consoleURL:
description: ConsoleURL is the web console URL of the cluster
type: string
name:
description: Name is the name of the corresponding ToolchainCluster
resource
type: string
required:
- apiEndpoint
- consoleURL
- name
type: object
conditions:
Expand Down
6 changes: 0 additions & 6 deletions controllers/masteruserrecord/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ func (s *Synchronizer) withClusterDetails(ctx context.Context, status toolchainv
return status, errs.Wrapf(err, "unable to read ToolchainStatus resource")
}

if status.Cluster.APIEndpoint == "" {
status.Cluster.APIEndpoint = s.memberCluster.APIEndpoint
}

for _, memberStatus := range toolchainStatus.Status.Members {
if memberStatus.ClusterName == status.Cluster.Name {
if memberStatus.MemberStatus.Routes == nil {
Expand All @@ -164,8 +160,6 @@ func (s *Synchronizer) withClusterDetails(ctx context.Context, status toolchainv
ready, _ := condition.FindConditionByType(memberStatus.MemberStatus.Routes.Conditions, toolchainv1alpha1.ConditionReady)
return status, fmt.Errorf("routes are not properly set in ToolchainStatus - the reason is: `%s` with message: `%s`", ready.Reason, ready.Message)
}
status.Cluster.ConsoleURL = memberStatus.MemberStatus.Routes.ConsoleURL
status.Cluster.CheDashboardURL = memberStatus.MemberStatus.Routes.CheDashboardURL
return status, nil
}
}
Expand Down
20 changes: 4 additions & 16 deletions controllers/masteruserrecord/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,7 @@ func TestRoutes(t *testing.T) {
HasConditions(condition)
murtest.AssertThatMasterUserRecord(t, "john", hostClient).
AllUserAccountsHaveCluster(toolchainv1alpha1.Cluster{
Name: test.MemberClusterName,
APIEndpoint: "https://api.member-cluster:6433",
ConsoleURL: "https://console.member-cluster/",
CheDashboardURL: "https://che-toolchain-che.member-cluster/",
Name: test.MemberClusterName,
}).
AllUserAccountsHaveCondition(condition)
})
Expand Down Expand Up @@ -962,10 +959,7 @@ func TestRoutes(t *testing.T) {
HasConditions(condition)
murtest.AssertThatMasterUserRecord(t, "john", hostClient).
AllUserAccountsHaveCluster(toolchainv1alpha1.Cluster{
Name: test.MemberClusterName,
APIEndpoint: "https://api.member-cluster:6433",
ConsoleURL: "https://console.member-cluster/",
CheDashboardURL: "",
Name: test.MemberClusterName,
}).
AllUserAccountsHaveCondition(condition)
})
Expand Down Expand Up @@ -996,10 +990,7 @@ func TestRoutes(t *testing.T) {
HasConditions(condition)
murtest.AssertThatMasterUserRecord(t, "john", hostClient).
AllUserAccountsHaveCluster(toolchainv1alpha1.Cluster{
Name: test.MemberClusterName,
APIEndpoint: "https://api.member-cluster:6433",
ConsoleURL: "",
CheDashboardURL: "",
Name: test.MemberClusterName,
}).
AllUserAccountsHaveCondition(condition)
})
Expand Down Expand Up @@ -1033,10 +1024,7 @@ func verifySyncMurStatusWithUserAccountStatus(t *testing.T, memberClient, hostCl
HasConditions(expMurCon...).
HasStatusUserAccounts(test.MemberClusterName).
AllUserAccountsHaveCluster(toolchainv1alpha1.Cluster{
Name: test.MemberClusterName,
APIEndpoint: "https://api.member-cluster:6433",
ConsoleURL: "https://console.member-cluster/",
CheDashboardURL: "http://che-toolchain-che.member-cluster/",
Name: test.MemberClusterName,
}).
AllUserAccountsHaveCondition(userAccountCondition)
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/codeready-toolchain/host-operator

require (
github.com/codeready-toolchain/api v0.0.0-20231107202930-b028ae440a26
github.com/codeready-toolchain/toolchain-common v0.0.0-20231117145902-3e7430ae48bb
github.com/codeready-toolchain/api v0.0.0-20231122125952-9e6527f5e746
github.com/codeready-toolchain/toolchain-common v0.0.0-20231122135421-3933b292cbb6
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
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
github.com/codeready-toolchain/api v0.0.0-20231107202930-b028ae440a26 h1:7l/9jcykzh/Qq93EnPYQYpaejPkWaaHB6BLCwTKngJE=
github.com/codeready-toolchain/api v0.0.0-20231107202930-b028ae440a26/go.mod h1:bImSKnxrpNmCmW/YEGiiZnZqJm3kAmfP5hW4YndK0hE=
github.com/codeready-toolchain/toolchain-common v0.0.0-20231117145902-3e7430ae48bb h1:TVgy4tO2oy2YwWTZXXYytY9soshylURDzmdkY6ch1+o=
github.com/codeready-toolchain/toolchain-common v0.0.0-20231117145902-3e7430ae48bb/go.mod h1:fmMAvkwt/OfANx8l/BDbuaHkjInlRJ3uYmIjjVmjd9w=
github.com/codeready-toolchain/api v0.0.0-20231122125952-9e6527f5e746 h1:By8gc3SbJl1GHf7LfPTxfLYC0IuTeF4wiZHvtBxPx4s=
github.com/codeready-toolchain/api v0.0.0-20231122125952-9e6527f5e746/go.mod h1:FO7kgXH1x1LqkF327D5a36u0WIrwjVCbeijPkzgwaZc=
github.com/codeready-toolchain/toolchain-common v0.0.0-20231122135421-3933b292cbb6 h1:+xecIaHMA1T9fioEVWsR9hyh736xHLBZEY6h3LWdj9M=
github.com/codeready-toolchain/toolchain-common v0.0.0-20231122135421-3933b292cbb6/go.mod h1:SonFn2Nu9p70l4gYaf4+XUzCn9dQdpFfpqQ+E4MVILU=
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

0 comments on commit f2ede04

Please sign in to comment.