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-43: Replace the special ToolchainClusterCondition with the standard toolchain Condition #560

Merged
merged 13 commits into from
May 30, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module github.com/codeready-toolchain/member-operator

replace github.com/codeready-toolchain/api => github.com/fbm3307/toolchainapi v0.0.0-20240529064820-9bb19ad24c69

replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240529065824-3c5d4e2aceac

require (
github.com/codeready-toolchain/api v0.0.0-20240507023248-73662d6db2c5
github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5
github.com/codeready-toolchain/toolchain-common v0.0.0-20240513103602-0cabe6c279c8
github.com/go-logr/logr v1.2.3
github.com/google/go-cmp v0.5.9
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ 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-20240507023248-73662d6db2c5 h1:BPIwkb0fqJEJ5GjMFgkoo13f8AY5UTWmPD4Hcm1GqoU=
github.com/codeready-toolchain/api v0.0.0-20240507023248-73662d6db2c5/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240513103602-0cabe6c279c8 h1:6m0CiQDEzBbs9cR5UWLyOcuFgDSgWSgbGajsoV42fC0=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240513103602-0cabe6c279c8/go.mod h1:5ZCAINI2sJifBbe48IHJzDc/GuuWFb5HOL4kWB+a+pA=
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 Expand Up @@ -185,6 +181,10 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI=
github.com/fbm3307/toolchain-common v0.0.0-20240529065824-3c5d4e2aceac h1:WbOV613ZMtm/wzx1OOoDz7SiNgzlgN4KGusVL8vnMig=
github.com/fbm3307/toolchain-common v0.0.0-20240529065824-3c5d4e2aceac/go.mod h1:D/yFnVW7yM+OhIMDY5H/7jGZGlKIgaeTkiA4F5DIc4g=
github.com/fbm3307/toolchainapi v0.0.0-20240529064820-9bb19ad24c69 h1:WiMpRk3NnsEeCVzQzD2gzc2EFx15eWCrkdfmGeG2ltU=
github.com/fbm3307/toolchainapi v0.0.0-20240529064820-9bb19ad24c69/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
Expand Down
9 changes: 4 additions & 5 deletions test/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}},
},
Expand All @@ -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,
}},
},
Expand Down
Loading