From c8d18208ac0bb72e36b119771581ce8e809d9e90 Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Thu, 30 May 2024 20:36:51 +0530 Subject: [PATCH] KUBESAW-43: Replace the special ToolchainClusterCondition with the standard toolchain Condition (#560) * KUBESAW-43: Replace the special ToolchainClusterCondition with the standard toolchain Condition Signed-off-by: Feny Mehta * Updating tc, api dependency Signed-off-by: Feny Mehta * Updating api,tc dependecny-3 Signed-off-by: Feny Mehta * updating api,toolchaincommon and related changes Signed-off-by: Feny Mehta * updating the dependency of api, tc with latest changes Signed-off-by: Feny Mehta * api,tc update Signed-off-by: Feny Mehta * removing the duplicate conditiontype , api tc update Signed-off-by: Feny Mehta * Final update api,tc Signed-off-by: Feny Mehta --------- Signed-off-by: Feny Mehta --- .../toolchain.dev.openshift.com_memberstatuses.yaml | 8 +------- .../toolchain.dev.openshift.com_toolchainclusters.yaml | 8 +------- go.mod | 4 ++-- go.sum | 8 ++++---- test/cluster.go | 9 ++++----- 5 files changed, 12 insertions(+), 25 deletions(-) diff --git a/config/crd/bases/toolchain.dev.openshift.com_memberstatuses.yaml b/config/crd/bases/toolchain.dev.openshift.com_memberstatuses.yaml index f964ff82..c10311fc 100644 --- a/config/crd/bases/toolchain.dev.openshift.com_memberstatuses.yaml +++ b/config/crd/bases/toolchain.dev.openshift.com_memberstatuses.yaml @@ -169,13 +169,7 @@ spec: conditions: description: Conditions is an array of current cluster conditions. items: - description: ToolchainClusterCondition describes current state - of a cluster. properties: - lastProbeTime: - description: Last time the condition was checked. - format: date-time - type: string lastTransitionTime: description: Last time the condition transit from one status to another. @@ -197,7 +191,7 @@ spec: Unknown. type: string type: - description: Type of cluster condition, Ready or Offline. + description: Type of condition type: string required: - status diff --git a/config/crd/bases/toolchain.dev.openshift.com_toolchainclusters.yaml b/config/crd/bases/toolchain.dev.openshift.com_toolchainclusters.yaml index 85c161ad..9ae3eae7 100644 --- a/config/crd/bases/toolchain.dev.openshift.com_toolchainclusters.yaml +++ b/config/crd/bases/toolchain.dev.openshift.com_toolchainclusters.yaml @@ -81,13 +81,7 @@ spec: conditions: description: Conditions is an array of current cluster conditions. items: - description: ToolchainClusterCondition describes current state of - a cluster. properties: - lastProbeTime: - description: Last time the condition was checked. - format: date-time - type: string lastTransitionTime: description: Last time the condition transit from one status to another. @@ -108,7 +102,7 @@ spec: description: Status of the condition, one of True, False, Unknown. type: string type: - description: Type of cluster condition, Ready or Offline. + description: Type of condition type: string required: - status diff --git a/go.mod b/go.mod index 069d7fe9..9c9a7d1e 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/codeready-toolchain/member-operator require ( - github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5 - github.com/codeready-toolchain/toolchain-common v0.0.0-20240514101749-1ceadb6ea36b + github.com/codeready-toolchain/api v0.0.0-20240530120602-c11598ccffb7 + github.com/codeready-toolchain/toolchain-common v0.0.0-20240530121312-98aad712838f github.com/go-logr/logr v1.2.3 github.com/google/go-cmp v0.5.9 // using latest commit from 'github.com/openshift/api branch release-4.12' diff --git a/go.sum b/go.sum index 1deecdce..02080f34 100644 --- a/go.sum +++ b/go.sum @@ -134,10 +134,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-20240514085958-3b5237399fe5 h1:lfW7VPmj70Tt75VzgOfAdVEGKMCR5/zACugWl1BDw34= -github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E= -github.com/codeready-toolchain/toolchain-common v0.0.0-20240514101749-1ceadb6ea36b h1:9WGqXkgAmnMOYUvYSdeIszTfE5NbuZ2hmibXchTU7r0= -github.com/codeready-toolchain/toolchain-common v0.0.0-20240514101749-1ceadb6ea36b/go.mod h1:oG4ywphvcYpFuaxrJcAkEVrBfhXsXPPQ2ieF3Y+e/wo= +github.com/codeready-toolchain/api v0.0.0-20240530120602-c11598ccffb7 h1:o5JLcHCVS1BlZevw2mh1mH+iKwn9fLUrT1Ek8NFjvPY= +github.com/codeready-toolchain/api v0.0.0-20240530120602-c11598ccffb7/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E= +github.com/codeready-toolchain/toolchain-common v0.0.0-20240530121312-98aad712838f h1:2qfRfyh7wfEnnfxrUtQeQrvhzWlkBCN0B/UXv1YUMiA= +github.com/codeready-toolchain/toolchain-common v0.0.0-20240530121312-98aad712838f/go.mod h1:cyHrUfvBYEtsf+FbqQYmR9y0AQi9QAVtM3SUWLA5bd4= 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/test/cluster.go b/test/cluster.go index 1f4a673e..2f60418d 100644 --- a/test/cluster.go +++ b/test/cluster.go @@ -28,8 +28,8 @@ func NewGetHostCluster(cl client.Client, ok bool, status v1.ConditionStatus) clu }, Client: cl, ClusterStatus: &toolchainv1alpha1.ToolchainClusterStatus{ - Conditions: []toolchainv1alpha1.ToolchainClusterCondition{{ - Type: toolchainv1alpha1.ToolchainClusterReady, + Conditions: []toolchainv1alpha1.Condition{{ + Type: toolchainv1alpha1.ConditionReady, Status: status, }}, }, @@ -55,10 +55,9 @@ func NewGetHostClusterWithProbe(cl client.Client, ok bool, status v1.ConditionSt }, Client: cl, ClusterStatus: &toolchainv1alpha1.ToolchainClusterStatus{ - Conditions: []toolchainv1alpha1.ToolchainClusterCondition{{ - Type: toolchainv1alpha1.ToolchainClusterReady, + Conditions: []toolchainv1alpha1.Condition{{ + Type: toolchainv1alpha1.ConditionReady, Status: status, - LastProbeTime: lastProbeTime, LastUpdatedTime: &lastProbeTime, }}, },