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 #1017

Merged
merged 19 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 15 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
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
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,7 @@ spec:
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 @@ -401,8 +395,7 @@ spec:
False, 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 @@ -1835,10 +1835,9 @@ func cachedToolchainCluster(cl runtimeclient.Client, name string, status corev1.
},
Client: cl,
ClusterStatus: &toolchainv1alpha1.ToolchainClusterStatus{
Conditions: []toolchainv1alpha1.ToolchainClusterCondition{{
Conditions: []toolchainv1alpha1.Condition{{
Type: toolchainv1alpha1.ToolchainClusterReady,
fbm3307 marked this conversation as resolved.
Show resolved Hide resolved
Status: status,
LastProbeTime: lastProbeTime,
LastUpdatedTime: &lastProbeTime,
}},
},
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module github.com/codeready-toolchain/host-operator

replace github.com/codeready-toolchain/api => github.com/fbm3307/toolchainapi v0.0.0-20240527070911-f37a60567c8b

replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240527085525-a1bc979c9c70
require (
github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5
github.com/codeready-toolchain/toolchain-common v0.0.0-20240514101749-1ceadb6ea36b
Expand Down Expand Up @@ -113,3 +116,5 @@ require (
)

go 1.20


8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,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-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/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 @@ -193,6 +189,10 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne
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-20240527085525-a1bc979c9c70 h1:bXkUar0zqhEjnWkrmcWAuRVh4Kzl5Og//XJ2APnFjOI=
github.com/fbm3307/toolchain-common v0.0.0-20240527085525-a1bc979c9c70/go.mod h1:CEYP+kvf4ckNVUocGJHTQNKAOwg21Dy2JtEUlYqSGic=
github.com/fbm3307/toolchainapi v0.0.0-20240527070911-f37a60567c8b h1:fF3V9dFDmZCzbV2rWkII7b/LJ9hj5yL2zR0vdaXzeK4=
github.com/fbm3307/toolchainapi v0.0.0-20240527070911-f37a60567c8b/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
2 changes: 1 addition & 1 deletion test/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func NewGetMemberCluster(ok bool, status corev1.ConditionStatus, modifiers ...Mo
},
Client: cl,
ClusterStatus: &toolchainv1alpha1.ToolchainClusterStatus{
Conditions: []toolchainv1alpha1.ToolchainClusterCondition{{
Conditions: []toolchainv1alpha1.Condition{{
Type: toolchainv1alpha1.ToolchainClusterReady,
Status: status,
}},
Expand Down
Loading