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 5 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,10 @@ func cachedToolchainCluster(cl runtimeclient.Client, name string, status corev1.
},
Client: cl,
ClusterStatus: &toolchainv1alpha1.ToolchainClusterStatus{
Conditions: []toolchainv1alpha1.ToolchainClusterCondition{{
Type: toolchainv1alpha1.ToolchainClusterReady,
Status: status,
LastProbeTime: lastProbeTime,
Conditions: []toolchainv1alpha1.Condition{{
Type: toolchainv1alpha1.ToolchainClusterReady,
Status: status,
LastTransitionTime: lastProbeTime,
}},
},
}
Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
module github.com/codeready-toolchain/host-operator

replace github.com/codeready-toolchain/api => github.com/fbm3307/toolchainapi v0.0.0-20240425095952-cd8e9731b967

replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240425102648-bac35a1b02f8

require (
github.com/codeready-toolchain/api v0.0.0-20240424103940-03edc96d88fb
github.com/codeready-toolchain/toolchain-common v0.0.0-20240424171146-581ea6502cad
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,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-20240424103940-03edc96d88fb h1:YvEVAetaNYLAyuwO8AmKTtWD9M7SZPhbBzTVMXhrGas=
github.com/codeready-toolchain/api v0.0.0-20240424103940-03edc96d88fb/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240424171146-581ea6502cad h1:ka0mIrFO8+0H4uIgfhgCGh1lmRjGndRUYNEEV8O7fkQ=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240424171146-581ea6502cad/go.mod h1:4BqdcAO16K/+YmPbn5XmTKOU4UUyuQPlge7ms9F1NsU=
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-20240425102648-bac35a1b02f8 h1:PVui6JJ8qnZJwO4tZMmNbS6j8iOIRyhNMt6XJfP2Oos=
github.com/fbm3307/toolchain-common v0.0.0-20240425102648-bac35a1b02f8/go.mod h1:XM/GvevqWYzwWrIqEkRyoImGnRY+R6uIyVJ5mkVqO7k=
github.com/fbm3307/toolchainapi v0.0.0-20240425095952-cd8e9731b967 h1:6NHrU9WNkeCnAniKFUb6YhUxKkccYidj5fD/yY912y0=
github.com/fbm3307/toolchainapi v0.0.0-20240425095952-cd8e9731b967/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