Skip to content

Commit 19c244c

Browse files
authored
MGMT-24510: Upgrade CAPI to v1beta2 (#1020)
* MGMT-24510: Upgrade CAPI to v1beta2 Upgrade CAPI version to v1beta2 after Hypershift's upgrade. * MGMT-24510: Changes after v1beta2 upgrade Updates the conditions and status of the CRs to match v1beta2 and associated changes related to setting/getting the status and conditions. Assisted-by: Claude Code <noreply@anthropic.com> * MGMT-24510: Update vendoring
1 parent 7e9b75f commit 19c244c

269 files changed

Lines changed: 446 additions & 234329 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ require (
3030
github.com/go-openapi/swag/yamlutils v0.25.3 // indirect
3131
github.com/gogo/protobuf v1.3.2 // indirect
3232
github.com/google/gnostic-models v0.7.1 // indirect
33-
github.com/google/go-cmp v0.7.0 // indirect
3433
github.com/json-iterator/go v1.1.12 // indirect
3534
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3635
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
36+
github.com/onsi/ginkgo/v2 v2.25.1 // indirect
3737
github.com/onsi/gomega v1.38.2 // indirect
38-
github.com/pkg/errors v0.9.1 // indirect
3938
github.com/spf13/pflag v1.0.10 // indirect
4039
github.com/stretchr/testify v1.11.1 // indirect
4140
github.com/x448/float16 v0.8.4 // indirect

api/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
7575
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
7676
github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 h1:J1wuGhVxpsHykZBa6Beb1gQ96Ptej9AE/BvwCBiRj1E=
7777
github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
78-
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
79-
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8078
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
8179
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
8280
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=

api/v1alpha1/agentcluster_types.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1alpha1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
21+
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
2222
)
2323

2424
type ClusterDeploymentReference struct {
@@ -70,10 +70,13 @@ type AgentClusterStatus struct {
7070

7171
// Conditions defines current service state of the ClusterDeployment.
7272
// +optional
73-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
73+
Conditions []metav1.Condition `json:"conditions,omitempty"`
7474

7575
// FailureDomains is a list of failure domain objects synced from the infrastructure provider.
76-
FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
76+
// +optional
77+
// +listType=map
78+
// +listMapKey=name
79+
FailureDomains []clusterv1.FailureDomain `json:"failureDomains,omitempty"`
7780
}
7881

7982
//+kubebuilder:object:root=true

api/v1alpha1/agentmachine_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1alpha1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
21+
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
2222
"sigs.k8s.io/cluster-api/errors"
2323
)
2424

@@ -96,7 +96,7 @@ type AgentMachineStatus struct {
9696

9797
// Conditions defines current service state of the AgentMachine.
9898
// +optional
99-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
99+
Conditions []metav1.Condition `json:"conditions,omitempty"`
100100
}
101101

102102
//+kubebuilder:object:root=true
@@ -112,13 +112,13 @@ type AgentMachine struct {
112112
Status AgentMachineStatus `json:"status,omitempty"`
113113
}
114114

115-
// GetConditions returns the observations of the operational state of the AWSMachine resource.
116-
func (r *AgentMachine) GetConditions() clusterv1.Conditions {
115+
// GetConditions returns the observations of the operational state of the AgentMachine resource.
116+
func (r *AgentMachine) GetConditions() []metav1.Condition {
117117
return r.Status.Conditions
118118
}
119119

120-
// SetConditions sets the underlying service state of the AWSMachine to the predescribed clusterv1.Conditions.
121-
func (r *AgentMachine) SetConditions(conditions clusterv1.Conditions) {
120+
// SetConditions sets the conditions for the AgentMachine.
121+
func (r *AgentMachine) SetConditions(conditions []metav1.Condition) {
122122
r.Status.Conditions = conditions
123123
}
124124

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta1/agentcluster_types.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1beta1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
21+
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
2222
)
2323

2424
type ClusterDeploymentReference struct {
@@ -70,10 +70,13 @@ type AgentClusterStatus struct {
7070

7171
// Conditions defines current service state of the ClusterDeployment.
7272
// +optional
73-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
73+
Conditions []metav1.Condition `json:"conditions,omitempty"`
7474

7575
// FailureDomains is a list of failure domain objects synced from the infrastructure provider.
76-
FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
76+
// +optional
77+
// +listType=map
78+
// +listMapKey=name
79+
FailureDomains []clusterv1.FailureDomain `json:"failureDomains,omitempty"`
7780
}
7881

7982
//+kubebuilder:object:root=true

api/v1beta1/agentmachine_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package v1beta1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21-
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
21+
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
2222
"sigs.k8s.io/cluster-api/errors"
2323
)
2424

@@ -96,7 +96,7 @@ type AgentMachineStatus struct {
9696

9797
// Conditions defines current service state of the AgentMachine.
9898
// +optional
99-
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
99+
Conditions []metav1.Condition `json:"conditions,omitempty"`
100100
}
101101

102102
//+kubebuilder:object:root=true
@@ -112,13 +112,13 @@ type AgentMachine struct {
112112
Status AgentMachineStatus `json:"status,omitempty"`
113113
}
114114

115-
// GetConditions returns the observations of the operational state of the AWSMachine resource.
116-
func (r *AgentMachine) GetConditions() clusterv1.Conditions {
115+
// GetConditions returns the observations of the operational state of the AgentMachine resource.
116+
func (r *AgentMachine) GetConditions() []metav1.Condition {
117117
return r.Status.Conditions
118118
}
119119

120-
// SetConditions sets the underlying service state of the AWSMachine to the predescribed clusterv1.Conditions.
121-
func (r *AgentMachine) SetConditions(conditions clusterv1.Conditions) {
120+
// SetConditions sets the conditions for the AgentMachine.
121+
func (r *AgentMachine) SetConditions(conditions []metav1.Condition) {
122122
r.Status.Conditions = conditions
123123
}
124124

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/google/go-cmp/LICENSE

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)