From 962c4189ef3e48eee518a0167a6eb421ec612e71 Mon Sep 17 00:00:00 2001 From: Karthik Bhat Date: Tue, 10 Jun 2025 20:09:41 +0530 Subject: [PATCH 1/3] Adopt CAPI v1beta2 api's --- .golangci.yml | 8 +- Makefile | 2 +- api/v1beta1/conditions_consts.go | 10 +- api/v1beta1/ibmpowervscluster_types.go | 4 +- .../ibmpowervsclustertemplate_types.go | 6 +- api/v1beta1/ibmpowervsimage_types.go | 8 +- api/v1beta1/ibmpowervsmachine_types.go | 8 +- api/v1beta1/ibmvpccluster_types.go | 10 +- api/v1beta1/zz_generated.conversion.go | 14 +- api/v1beta1/zz_generated.deepcopy.go | 8 +- api/v1beta2/conditions_consts.go | 32 ++-- api/v1beta2/ibmpowervscluster_types.go | 22 +-- .../ibmpowervsclustertemplate_types.go | 6 +- api/v1beta2/ibmpowervsimage_types.go | 12 +- api/v1beta2/ibmpowervsmachine_types.go | 20 +-- api/v1beta2/ibmvpccluster_types.go | 14 +- api/v1beta2/ibmvpcclustertemplate_types.go | 6 +- api/v1beta2/ibmvpcmachine_types.go | 12 +- api/v1beta2/zz_generated.deepcopy.go | 12 +- cloud/scope/cluster.go | 6 +- cloud/scope/common_test.go | 18 +- cloud/scope/machine.go | 10 +- cloud/scope/machine_test.go | 6 +- cloud/scope/powervs_cluster.go | 6 +- cloud/scope/powervs_cluster_test.go | 54 +++--- cloud/scope/powervs_machine.go | 10 +- cloud/scope/powervs_machine_test.go | 52 +++--- cloud/scope/suite_test.go | 4 +- cloud/scope/vpc_cluster.go | 6 +- controllers/ibmpowervscluster_controller.go | 56 +++--- .../ibmpowervscluster_controller_test.go | 116 ++++++------ controllers/ibmpowervsimage_controller.go | 16 +- .../ibmpowervsimage_controller_test.go | 12 +- controllers/ibmpowervsmachine_controller.go | 49 +++--- .../ibmpowervsmachine_controller_test.go | 148 +++++++++------- controllers/ibmvpccluster_controller.go | 16 +- controllers/ibmvpccluster_controller_test.go | 20 +-- controllers/ibmvpcmachine_controller.go | 14 +- controllers/ibmvpcmachine_controller_test.go | 44 ++--- controllers/suite_test.go | 4 +- go.mod | 73 ++++---- go.sum | 165 +++++++----------- hack/tools/go.mod | 41 ++--- hack/tools/go.sum | 91 +++++----- main.go | 6 +- test/e2e/e2e_test.go | 4 +- test/helpers/crd.go | 2 +- test/helpers/envtest.go | 4 +- 48 files changed, 626 insertions(+), 641 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index cebb0bbed..aafa887ab 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -88,8 +88,10 @@ linters-settings: alias: capiv1alpha3 - pkg: sigs.k8s.io/cluster-api/api/v1alpha4 alias: capiv1alpha4 - - pkg: sigs.k8s.io/cluster-api/api/v1beta1 + - pkg: sigs.k8s.io/cluster-api/api/core/v1beta1 alias: capiv1beta1 + - pkg: sigs.k8s.io/cluster-api/api/core/v1beta2 + alias: clusterv1 # CAPI-IBMCLOUD - pkg: sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta1 alias: infrav1beta1 @@ -121,7 +123,7 @@ linters-settings: - whyNoLint - wrapperFunc unused: - go: "1.23" + go: "1.24" issues: max-same-issues: 0 max-issues-per-linter: 0 @@ -207,7 +209,7 @@ issues: - "zz_generated.*\\.go$" run: - go: "1.23" + go: "1.24" timeout: 20m build-tags: - tools diff --git a/Makefile b/Makefile index 5cd8d535d..1020232a6 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ RELEASE_NOTES_DIR := CHANGELOG OUTPUT_TYPE ?= type=registry # Go -GO_VERSION ?=1.23.9 +GO_VERSION ?=1.24.0 GO_CONTAINER_IMAGE ?= golang:$(GO_VERSION) # Trivy diff --git a/api/v1beta1/conditions_consts.go b/api/v1beta1/conditions_consts.go index cdc8fc595..28138d76c 100644 --- a/api/v1beta1/conditions_consts.go +++ b/api/v1beta1/conditions_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( @@ -42,7 +42,7 @@ const ( const ( // InstanceReadyCondition reports on current status of the instance. Ready indicates the instance is in a Running state. - InstanceReadyCondition capiv1beta1.ConditionType = "InstanceReady" + InstanceReadyCondition clusterv1.ConditionType = "InstanceReady" ) const ( @@ -60,10 +60,10 @@ const ( const ( // ImageReadyCondition reports on current status of the image. Ready indicates the image is in a active state. - ImageReadyCondition capiv1beta1.ConditionType = "ImageReady" + ImageReadyCondition clusterv1.ConditionType = "ImageReady" // ImageImportedCondition reports on current status of the image import job. Ready indicates the import job is finished. - ImageImportedCondition capiv1beta1.ConditionType = "ImageImported" + ImageImportedCondition clusterv1.ConditionType = "ImageImported" ) const ( @@ -73,5 +73,5 @@ const ( const ( // LoadBalancerReadyCondition reports on current status of the load balancer. Ready indicates the load balancer is in a active state. - LoadBalancerReadyCondition capiv1beta1.ConditionType = "LoadBalancerReady" + LoadBalancerReadyCondition clusterv1.ConditionType = "LoadBalancerReady" ) diff --git a/api/v1beta1/ibmpowervscluster_types.go b/api/v1beta1/ibmpowervscluster_types.go index 8b0bdbcf8..3ded34a6c 100644 --- a/api/v1beta1/ibmpowervscluster_types.go +++ b/api/v1beta1/ibmpowervscluster_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -44,7 +44,7 @@ type IBMPowerVSClusterSpec struct { // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional - ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"` + ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"` } // IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster. diff --git a/api/v1beta1/ibmpowervsclustertemplate_types.go b/api/v1beta1/ibmpowervsclustertemplate_types.go index f83136e2c..5af99c9fd 100644 --- a/api/v1beta1/ibmpowervsclustertemplate_types.go +++ b/api/v1beta1/ibmpowervsclustertemplate_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // IBMPowerVSClusterTemplateSpec defines the desired state of IBMPowerVSClusterTemplate. @@ -53,8 +53,8 @@ type IBMPowerVSClusterTemplateResource struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional - ObjectMeta capiv1beta1.ObjectMeta `json:"metadata,omitempty"` - Spec IBMPowerVSClusterSpec `json:"spec"` + ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` + Spec IBMPowerVSClusterSpec `json:"spec"` } func init() { diff --git a/api/v1beta1/ibmpowervsimage_types.go b/api/v1beta1/ibmpowervsimage_types.go index 1c8386ada..40414f960 100644 --- a/api/v1beta1/ibmpowervsimage_types.go +++ b/api/v1beta1/ibmpowervsimage_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -82,7 +82,7 @@ type IBMPowerVSImageStatus struct { // Conditions defines current service state of the IBMPowerVSImage. // +optional - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` } //+kubebuilder:object:root=true @@ -100,12 +100,12 @@ type IBMPowerVSImage struct { } // GetConditions returns the observations of the operational state of the IBMPowerVSImage resource. -func (r *IBMPowerVSImage) GetConditions() capiv1beta1.Conditions { +func (r *IBMPowerVSImage) GetConditions() clusterv1.Conditions { return r.Status.Conditions } // SetConditions sets the underlying service state of the IBMPowerVSImage to the predescribed clusterv1.Conditions. -func (r *IBMPowerVSImage) SetConditions(conditions capiv1beta1.Conditions) { +func (r *IBMPowerVSImage) SetConditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } diff --git a/api/v1beta1/ibmpowervsmachine_types.go b/api/v1beta1/ibmpowervsmachine_types.go index 09c5eaa2e..265de147a 100644 --- a/api/v1beta1/ibmpowervsmachine_types.go +++ b/api/v1beta1/ibmpowervsmachine_types.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -164,7 +164,7 @@ type IBMPowerVSMachineStatus struct { // Conditions defines current service state of the IBMPowerVSMachine. // +optional - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` // Region specifies the Power VS Service instance region. Region *string `json:"region,omitempty"` @@ -194,12 +194,12 @@ type IBMPowerVSMachine struct { } // GetConditions returns the observations of the operational state of the IBMPowerVSMachine resource. -func (r *IBMPowerVSMachine) GetConditions() capiv1beta1.Conditions { +func (r *IBMPowerVSMachine) GetConditions() clusterv1.Conditions { return r.Status.Conditions } // SetConditions sets the underlying service state of the IBMPowerVSMachine to the predescribed clusterv1.Conditions. -func (r *IBMPowerVSMachine) SetConditions(conditions capiv1beta1.Conditions) { +func (r *IBMPowerVSMachine) SetConditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } diff --git a/api/v1beta1/ibmvpccluster_types.go b/api/v1beta1/ibmvpccluster_types.go index 813b3df7b..6a141c784 100644 --- a/api/v1beta1/ibmvpccluster_types.go +++ b/api/v1beta1/ibmvpccluster_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -49,7 +49,7 @@ type IBMVPCClusterSpec struct { // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional - ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"` + ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"` // ControlPlaneLoadBalancer is optional configuration for customizing control plane behavior. // +optional @@ -83,7 +83,7 @@ type IBMVPCClusterStatus struct { // Conditions defines current service state of the load balancer. // +optional - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` } // VPC holds the VPC information. @@ -121,11 +121,11 @@ func init() { } // GetConditions returns the observations of the operational state of the IBMVPCCluster resource. -func (r *IBMVPCCluster) GetConditions() capiv1beta1.Conditions { +func (r *IBMVPCCluster) GetConditions() clusterv1.Conditions { return r.Status.Conditions } // SetConditions sets the underlying service state of the IBMVPCCluster to the predescribed clusterv1.Conditions. -func (r *IBMVPCCluster) SetConditions(conditions capiv1beta1.Conditions) { +func (r *IBMVPCCluster) SetConditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } diff --git a/api/v1beta1/zz_generated.conversion.go b/api/v1beta1/zz_generated.conversion.go index ffeb92e41..734c26695 100644 --- a/api/v1beta1/zz_generated.conversion.go +++ b/api/v1beta1/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" v1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func init() { @@ -821,7 +821,7 @@ func autoConvert_v1beta1_IBMPowerVSImageStatus_To_v1beta2_IBMPowerVSImageStatus( out.ImageID = in.ImageID out.ImageState = v1beta2.PowerVSImageState(in.ImageState) out.JobID = in.JobID - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*corev1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } @@ -835,7 +835,7 @@ func autoConvert_v1beta2_IBMPowerVSImageStatus_To_v1beta1_IBMPowerVSImageStatus( out.ImageID = in.ImageID out.ImageState = PowerVSImageState(in.ImageState) out.JobID = in.JobID - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*corev1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } @@ -960,7 +960,7 @@ func autoConvert_v1beta1_IBMPowerVSMachineStatus_To_v1beta2_IBMPowerVSMachineSta out.Fault = in.Fault out.FailureReason = (*string)(unsafe.Pointer(in.FailureReason)) out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*corev1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) out.Region = (*string)(unsafe.Pointer(in.Region)) out.Zone = (*string)(unsafe.Pointer(in.Zone)) return nil @@ -980,7 +980,7 @@ func autoConvert_v1beta2_IBMPowerVSMachineStatus_To_v1beta1_IBMPowerVSMachineSta out.Fault = in.Fault out.FailureReason = (*string)(unsafe.Pointer(in.FailureReason)) out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*corev1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) out.Region = (*string)(unsafe.Pointer(in.Region)) out.Zone = (*string)(unsafe.Pointer(in.Zone)) // WARNING: in.V1Beta2 requires manual conversion: does not exist in peer-type @@ -1282,7 +1282,7 @@ func autoConvert_v1beta1_IBMVPCClusterStatus_To_v1beta2_IBMVPCClusterStatus(in * return err } out.ControlPlaneLoadBalancerState = v1beta2.VPCLoadBalancerState(in.ControlPlaneLoadBalancerState) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*corev1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } @@ -1306,7 +1306,7 @@ func autoConvert_v1beta2_IBMVPCClusterStatus_To_v1beta1_IBMVPCClusterStatus(in * return err } out.ControlPlaneLoadBalancerState = VPCLoadBalancerState(in.ControlPlaneLoadBalancerState) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*corev1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 95204009b..64b57d9a2 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1beta1 import ( "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -302,7 +302,7 @@ func (in *IBMPowerVSImageStatus) DeepCopyInto(out *IBMPowerVSImageStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(v1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -429,7 +429,7 @@ func (in *IBMPowerVSMachineStatus) DeepCopyInto(out *IBMPowerVSMachineStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(v1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -687,7 +687,7 @@ func (in *IBMVPCClusterStatus) DeepCopyInto(out *IBMVPCClusterStatus) { in.VPCEndpoint.DeepCopyInto(&out.VPCEndpoint) if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(v1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/api/v1beta2/conditions_consts.go b/api/v1beta2/conditions_consts.go index 1b8390e3c..e5ccdebec 100644 --- a/api/v1beta2/conditions_consts.go +++ b/api/v1beta2/conditions_consts.go @@ -17,7 +17,9 @@ limitations under the License. package v1beta2 import ( - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + //nolint:staticcheck + capiv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // IBMPowerVSMachine's InstanceReady condition and corresponding reasons that will be used in v1Beta2 API version. @@ -52,17 +54,17 @@ const ( // IBMPowerVSMachineInstanceWaitingForClusterInfrastructureReadyV1Beta2Reason documents the virtual machine that is controller by // IBMPowerVSMachine waiting for the cluster infrastructure to be ready. - // TODO: Use when CAPI version is updated: IBMPowerVSMachineInstanceWaitingForClusterInfrastructureReadyV1Beta2Reason = capiv1beta1.WaitingForClusterInfrastructureReadyV1Beta2Reason. + // TODO: Use when CAPI version is updated: IBMPowerVSMachineInstanceWaitingForClusterInfrastructureReadyV1Beta2Reason = clusterv1.WaitingForClusterInfrastructureReadyV1Beta2Reason. IBMPowerVSMachineInstanceWaitingForClusterInfrastructureReadyV1Beta2Reason = "WaitingForClusterInfrastructureReady" // IBMPowerVSMachineInstanceWaitingForControlPlaneInitializedV1Beta2Reason documents the virtual machine that is controller by IBMPowerVSMachine waiting // for the control plane to be initialized. - // TODO: Use when CAPI version is updated: IBMPowerVSMachineInstanceWaitingForControlPlaneInitializedV1Beta2Reason = capiv1beta1.WaitingForControlPlaneInitializedV1Beta2Reason. + // TODO: Use when CAPI version is updated: IBMPowerVSMachineInstanceWaitingForControlPlaneInitializedV1Beta2Reason = clusterv1.WaitingForControlPlaneInitializedV1Beta2Reason. IBMPowerVSMachineInstanceWaitingForControlPlaneInitializedV1Beta2Reason = "WaitingForControlPlaneInitialized" // IBMPowerVSMachineInstanceWaitingForBootstrapDataV1Beta2Reason documents the virtual machine that is controller by IBMPowerVSMachine waiting for the bootstrap // data to be ready. - // TODO: Use when CAPI version is updated: IBMPowerVSMachineInstanceWaitingForBootstrapDataV1Beta2Reason = capiv1beta1.WaitingForBootstrapDataV1Beta2Reason. + // TODO: Use when CAPI version is updated: IBMPowerVSMachineInstanceWaitingForBootstrapDataV1Beta2Reason = clusterv1.WaitingForBootstrapDataV1Beta2Reason. IBMPowerVSMachineInstanceWaitingForBootstrapDataV1Beta2Reason = "WaitingForBootstrapData" // IBMPowerVSMachineInstanceDeletingV1Beta2Reason surfaces when the virtual machine controller by IBMPowerVSMachine is deleting. @@ -101,7 +103,7 @@ const ( const ( // InstanceReadyCondition reports on current status of the instance. Ready indicates the instance is in a Running state. - InstanceReadyCondition capiv1beta1.ConditionType = "InstanceReady" + InstanceReadyCondition clusterv1.ConditionType = "InstanceReady" ) const ( @@ -122,10 +124,10 @@ const ( const ( // ImageReadyCondition reports on current status of the image. Ready indicates the image is in a active state. - ImageReadyCondition capiv1beta1.ConditionType = "ImageReady" + ImageReadyCondition clusterv1.ConditionType = "ImageReady" // ImageImportedCondition reports on current status of the image import job. Ready indicates the import job is finished. - ImageImportedCondition capiv1beta1.ConditionType = "ImageImported" + ImageImportedCondition clusterv1.ConditionType = "ImageImported" ) const ( @@ -135,42 +137,42 @@ const ( const ( // ServiceInstanceReadyCondition reports on the successful reconciliation of a Power VS workspace. - ServiceInstanceReadyCondition capiv1beta1.ConditionType = "ServiceInstanceReady" + ServiceInstanceReadyCondition clusterv1.ConditionType = "ServiceInstanceReady" // ServiceInstanceReconciliationFailedReason used when an error occurs during workspace reconciliation. ServiceInstanceReconciliationFailedReason = "ServiceInstanceReconciliationFailed" // NetworkReadyCondition reports on the successful reconciliation of a Power VS network. - NetworkReadyCondition capiv1beta1.ConditionType = "NetworkReady" + NetworkReadyCondition clusterv1.ConditionType = "NetworkReady" // NetworkReconciliationFailedReason used when an error occurs during network reconciliation. NetworkReconciliationFailedReason = "NetworkReconciliationFailed" // VPCSecurityGroupReadyCondition reports on the successful reconciliation of a VPC. - VPCSecurityGroupReadyCondition capiv1beta1.ConditionType = "VPCSecurityGroupReady" + VPCSecurityGroupReadyCondition clusterv1.ConditionType = "VPCSecurityGroupReady" // VPCSecurityGroupReconciliationFailedReason used when an error occurs during VPC reconciliation. VPCSecurityGroupReconciliationFailedReason = "VPCSecurityGroupReconciliationFailed" // VPCReadyCondition reports on the successful reconciliation of a VPC. - VPCReadyCondition capiv1beta1.ConditionType = "VPCReady" + VPCReadyCondition clusterv1.ConditionType = "VPCReady" // VPCReconciliationFailedReason used when an error occurs during VPC reconciliation. VPCReconciliationFailedReason = "VPCReconciliationFailed" // VPCSubnetReadyCondition reports on the successful reconciliation of a VPC subnet. - VPCSubnetReadyCondition capiv1beta1.ConditionType = "VPCSubnetReady" + VPCSubnetReadyCondition clusterv1.ConditionType = "VPCSubnetReady" // VPCSubnetReconciliationFailedReason used when an error occurs during VPC subnet reconciliation. VPCSubnetReconciliationFailedReason = "VPCSubnetReconciliationFailed" // TransitGatewayReadyCondition reports on the successful reconciliation of a Power VS transit gateway. - TransitGatewayReadyCondition capiv1beta1.ConditionType = "TransitGatewayReady" + TransitGatewayReadyCondition clusterv1.ConditionType = "TransitGatewayReady" // TransitGatewayReconciliationFailedReason used when an error occurs during transit gateway reconciliation. TransitGatewayReconciliationFailedReason = "TransitGatewayReconciliationFailed" // LoadBalancerReadyCondition reports on the successful reconciliation of a Power VS network. - LoadBalancerReadyCondition capiv1beta1.ConditionType = "LoadBalancerReady" + LoadBalancerReadyCondition clusterv1.ConditionType = "LoadBalancerReady" // LoadBalancerReconciliationFailedReason used when an error occurs during loadbalancer reconciliation. LoadBalancerReconciliationFailedReason = "LoadBalancerReconciliationFailed" // COSInstanceReadyCondition reports on the successful reconciliation of a COS instance. - COSInstanceReadyCondition capiv1beta1.ConditionType = "COSInstanceCreated" + COSInstanceReadyCondition clusterv1.ConditionType = "COSInstanceCreated" // COSInstanceReconciliationFailedReason used when an error occurs during COS instance reconciliation. COSInstanceReconciliationFailedReason = "COSInstanceCreationFailed" ) diff --git a/api/v1beta2/ibmpowervscluster_types.go b/api/v1beta2/ibmpowervscluster_types.go index 6d6b69acf..1673d1555 100644 --- a/api/v1beta2/ibmpowervscluster_types.go +++ b/api/v1beta2/ibmpowervscluster_types.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -54,7 +54,7 @@ type IBMPowerVSClusterSpec struct { // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional - ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"` + ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"` // serviceInstance is the reference to the Power VS server workspace on which the server instance(VM) will be created. // Power VS server workspace is a container for all Power VS instances at a specific geographic region. @@ -231,7 +231,7 @@ type IBMPowerVSClusterStatus struct { LoadBalancers map[string]VPCLoadBalancerStatus `json:"loadBalancers,omitempty"` // Conditions defines current service state of the IBMPowerVSCluster. - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in IBMPowerVSCluster's status with the V1Beta2 version. // +optional @@ -334,26 +334,26 @@ type CosInstance struct { BucketRegion string `json:"bucketRegion,omitempty"` } -// GetConditions returns the observations of the operational state of the IBMPowerVSCluster resource. -func (r *IBMPowerVSCluster) GetConditions() capiv1beta1.Conditions { +// GetV1Beta1Conditions returns the observations of the operational state of the IBMPowerVSCluster resource. +func (r *IBMPowerVSCluster) GetV1Beta1Conditions() clusterv1.Conditions { return r.Status.Conditions } -// SetConditions sets the underlying service state of the IBMPowerVSCluster to the predescribed clusterv1.Conditions. -func (r *IBMPowerVSCluster) SetConditions(conditions capiv1beta1.Conditions) { +// SetV1Beta1Conditions sets the underlying service state of the IBMPowerVSCluster to the predescribed clusterv1.Conditions. +func (r *IBMPowerVSCluster) SetV1Beta1Conditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } -// GetV1Beta2Conditions returns the set of conditions for this object. -func (r *IBMPowerVSCluster) GetV1Beta2Conditions() []metav1.Condition { +// GetConditions returns the set of conditions for this object. +func (r *IBMPowerVSCluster) GetConditions() []metav1.Condition { if r.Status.V1Beta2 == nil { return nil } return r.Status.V1Beta2.Conditions } -// SetV1Beta2Conditions sets conditions for an API object. -func (r *IBMPowerVSCluster) SetV1Beta2Conditions(conditions []metav1.Condition) { +// SetConditions sets conditions for an API object. +func (r *IBMPowerVSCluster) SetConditions(conditions []metav1.Condition) { if r.Status.V1Beta2 == nil { r.Status.V1Beta2 = &IBMPowerVSClusterV1Beta2Status{} } diff --git a/api/v1beta2/ibmpowervsclustertemplate_types.go b/api/v1beta2/ibmpowervsclustertemplate_types.go index 202a6b188..decedf383 100644 --- a/api/v1beta2/ibmpowervsclustertemplate_types.go +++ b/api/v1beta2/ibmpowervsclustertemplate_types.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // IBMPowerVSClusterTemplateSpec defines the desired state of IBMPowerVSClusterTemplate. @@ -54,8 +54,8 @@ type IBMPowerVSClusterTemplateResource struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional - ObjectMeta capiv1beta1.ObjectMeta `json:"metadata,omitempty"` - Spec IBMPowerVSClusterSpec `json:"spec"` + ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` + Spec IBMPowerVSClusterSpec `json:"spec"` } func init() { diff --git a/api/v1beta2/ibmpowervsimage_types.go b/api/v1beta2/ibmpowervsimage_types.go index 4431e5fa0..7cd8c2fa0 100644 --- a/api/v1beta2/ibmpowervsimage_types.go +++ b/api/v1beta2/ibmpowervsimage_types.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -93,7 +93,7 @@ type IBMPowerVSImageStatus struct { // Conditions defines current service state of the IBMPowerVSImage. // +optional - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` } //+kubebuilder:object:root=true @@ -111,13 +111,13 @@ type IBMPowerVSImage struct { Status IBMPowerVSImageStatus `json:"status,omitempty"` } -// GetConditions returns the observations of the operational state of the IBMPowerVSImage resource. -func (r *IBMPowerVSImage) GetConditions() capiv1beta1.Conditions { +// GetV1Beta1Conditions returns the observations of the operational state of the IBMPowerVSImage resource. +func (r *IBMPowerVSImage) GetV1Beta1Conditions() clusterv1.Conditions { return r.Status.Conditions } -// SetConditions sets the underlying service state of the IBMPowerVSImage to the predescribed clusterv1.Conditions. -func (r *IBMPowerVSImage) SetConditions(conditions capiv1beta1.Conditions) { +// SetV1Beta1Conditions sets the underlying service state of the IBMPowerVSImage to the predescribed clusterv1.Conditions. +func (r *IBMPowerVSImage) SetV1Beta1Conditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } diff --git a/api/v1beta2/ibmpowervsmachine_types.go b/api/v1beta2/ibmpowervsmachine_types.go index 523e2b805..d966ff302 100644 --- a/api/v1beta2/ibmpowervsmachine_types.go +++ b/api/v1beta2/ibmpowervsmachine_types.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -220,7 +220,7 @@ type IBMPowerVSMachineStatus struct { // Conditions defines current service state of the IBMPowerVSMachine. // +optional - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` // Region specifies the Power VS Service instance region. Region *string `json:"region,omitempty"` @@ -266,26 +266,26 @@ type IBMPowerVSMachine struct { Status IBMPowerVSMachineStatus `json:"status,omitempty"` } -// GetConditions returns the observations of the operational state of the IBMPowerVSMachine resource. -func (r *IBMPowerVSMachine) GetConditions() capiv1beta1.Conditions { +// GetV1Beta1Conditions returns the observations of the operational state of the IBMPowerVSMachine resource. +func (r *IBMPowerVSMachine) GetV1Beta1Conditions() clusterv1.Conditions { return r.Status.Conditions } -// SetConditions sets the underlying service state of the IBMPowerVSMachine to the predescribed clusterv1.Conditions. -func (r *IBMPowerVSMachine) SetConditions(conditions capiv1beta1.Conditions) { +// SetV1Beta1Conditions sets the underlying service state of the IBMPowerVSMachine to the predescribed clusterv1.Conditions. +func (r *IBMPowerVSMachine) SetV1Beta1Conditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } -// GetV1Beta2Conditions returns the set of conditions for this object. -func (r *IBMPowerVSMachine) GetV1Beta2Conditions() []metav1.Condition { +// GetConditions returns the set of conditions for this object. +func (r *IBMPowerVSMachine) GetConditions() []metav1.Condition { if r.Status.V1Beta2 == nil { return nil } return r.Status.V1Beta2.Conditions } -// SetV1Beta2Conditions sets conditions for an API object. -func (r *IBMPowerVSMachine) SetV1Beta2Conditions(conditions []metav1.Condition) { +// SetConditions sets conditions for an API object. +func (r *IBMPowerVSMachine) SetConditions(conditions []metav1.Condition) { if r.Status.V1Beta2 == nil { r.Status.V1Beta2 = &IBMPowerVSMachineV1Beta2Status{} } diff --git a/api/v1beta2/ibmvpccluster_types.go b/api/v1beta2/ibmvpccluster_types.go index 682229d0d..ebbb4f4e6 100644 --- a/api/v1beta2/ibmvpccluster_types.go +++ b/api/v1beta2/ibmvpccluster_types.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -49,7 +49,7 @@ type IBMVPCClusterSpec struct { // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional - ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"` + ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"` // ControlPlaneLoadBalancer is optional configuration for customizing control plane behavior. // Use this for legacy support, use Network.LoadBalancers for the extended VPC support. @@ -319,7 +319,7 @@ type IBMVPCClusterStatus struct { // Conditions defines current service state of the load balancer. // +optional - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` } // VPCNetworkStatus provides details on the status of VPC network resources for extended VPC Infrastructure support. @@ -390,13 +390,13 @@ type IBMVPCClusterList struct { Items []IBMVPCCluster `json:"items"` } -// GetConditions returns the observations of the operational state of the IBMVPCCluster resource. -func (r *IBMVPCCluster) GetConditions() capiv1beta1.Conditions { +// GetV1Beta1Conditions returns the observations of the operational state of the IBMVPCCluster resource. +func (r *IBMVPCCluster) GetV1Beta1Conditions() clusterv1.Conditions { return r.Status.Conditions } -// SetConditions sets the underlying service state of the IBMVPCCluster to the predescribed clusterv1.Conditions. -func (r *IBMVPCCluster) SetConditions(conditions capiv1beta1.Conditions) { +// SetV1Beta1Conditions sets the underlying service state of the IBMVPCCluster to the predescribed clusterv1.Conditions. +func (r *IBMVPCCluster) SetV1Beta1Conditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } diff --git a/api/v1beta2/ibmvpcclustertemplate_types.go b/api/v1beta2/ibmvpcclustertemplate_types.go index 855920c0c..aaf223fb0 100644 --- a/api/v1beta2/ibmvpcclustertemplate_types.go +++ b/api/v1beta2/ibmvpcclustertemplate_types.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // IBMVPCClusterTemplateSpec defines the desired state of IBMVPCClusterTemplate. @@ -53,8 +53,8 @@ type IBMVPCClusterTemplateResource struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional - ObjectMeta capiv1beta1.ObjectMeta `json:"metadata,omitempty"` - Spec IBMVPCClusterSpec `json:"spec"` + ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` + Spec IBMVPCClusterSpec `json:"spec"` } func init() { diff --git a/api/v1beta2/ibmvpcmachine_types.go b/api/v1beta2/ibmvpcmachine_types.go index df3aae0db..81a4c6376 100644 --- a/api/v1beta2/ibmvpcmachine_types.go +++ b/api/v1beta2/ibmvpcmachine_types.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -154,7 +154,7 @@ type IBMVPCMachineStatus struct { // Conditions deefines current service state of the IBMVPCMachine. // +optional - Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` + Conditions clusterv1.Conditions `json:"conditions,omitempty"` // FailureReason will be set in the event that there is a terminal problem // reconciling the Machine and will contain a succinct value suitable @@ -192,13 +192,13 @@ type IBMVPCMachine struct { Status IBMVPCMachineStatus `json:"status,omitempty"` } -// GetConditions returns the observations of the operational state of the IBMVPCMachine resource. -func (r *IBMVPCMachine) GetConditions() capiv1beta1.Conditions { +// GetV1Beta1Conditions returns the observations of the operational state of the IBMVPCMachine resource. +func (r *IBMVPCMachine) GetV1Beta1Conditions() clusterv1.Conditions { return r.Status.Conditions } -// SetConditions sets the underlying service state of the IBMVPCMachine to the predescribed clusterv1.Conditions. -func (r *IBMVPCMachine) SetConditions(conditions capiv1beta1.Conditions) { +// SetV1Beta1Conditions sets the underlying service state of the IBMVPCMachine to the predescribed clusterv1.Conditions. +func (r *IBMVPCMachine) SetV1Beta1Conditions(conditions clusterv1.Conditions) { r.Status.Conditions = conditions } diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index 73f53dc01..e4f0a90bd 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/api/v1beta1" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -356,7 +356,7 @@ func (in *IBMPowerVSClusterStatus) DeepCopyInto(out *IBMPowerVSClusterStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(v1beta1.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -590,7 +590,7 @@ func (in *IBMPowerVSImageStatus) DeepCopyInto(out *IBMPowerVSImageStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(v1beta1.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -723,7 +723,7 @@ func (in *IBMPowerVSMachineStatus) DeepCopyInto(out *IBMPowerVSMachineStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(v1beta1.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1033,7 +1033,7 @@ func (in *IBMVPCClusterStatus) DeepCopyInto(out *IBMVPCClusterStatus) { in.VPCEndpoint.DeepCopyInto(&out.VPCEndpoint) if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(v1beta1.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1269,7 +1269,7 @@ func (in *IBMVPCMachineStatus) DeepCopyInto(out *IBMVPCMachineStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(v1beta1.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/cloud/scope/cluster.go b/cloud/scope/cluster.go index 0ad2d0667..e1df9113e 100644 --- a/cloud/scope/cluster.go +++ b/cloud/scope/cluster.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/patch" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -47,7 +47,7 @@ type ClusterScopeParams struct { IBMVPCClient vpc.Vpc Client client.Client Logger logr.Logger - Cluster *capiv1beta1.Cluster + Cluster *clusterv1.Cluster IBMVPCCluster *infrav1beta2.IBMVPCCluster ServiceEndpoint []endpoints.ServiceEndpoint } @@ -59,7 +59,7 @@ type ClusterScope struct { patchHelper *patch.Helper IBMVPCClient vpc.Vpc - Cluster *capiv1beta1.Cluster + Cluster *clusterv1.Cluster IBMVPCCluster *infrav1beta2.IBMVPCCluster ServiceEndpoint []endpoints.ServiceEndpoint } diff --git a/cloud/scope/common_test.go b/cloud/scope/common_test.go index 8cbff8edb..64eb5734a 100644 --- a/cloud/scope/common_test.go +++ b/cloud/scope/common_test.go @@ -22,7 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" ) @@ -34,13 +34,13 @@ const ( pvsNetwork = "foo-network" ) -func newCluster(name string) *capiv1beta1.Cluster { - return &capiv1beta1.Cluster{ +func newCluster(name string) *clusterv1.Cluster { + return &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", }, - Spec: capiv1beta1.ClusterSpec{}, + Spec: clusterv1.ClusterSpec{}, } } @@ -62,14 +62,14 @@ func newPowerVSCluster(name string) *infrav1beta2.IBMPowerVSCluster { } } -func newMachine(machineName string) *capiv1beta1.Machine { - return &capiv1beta1.Machine{ +func newMachine(machineName string) *clusterv1.Machine { + return &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{ Name: machineName, Namespace: "default", }, - Spec: capiv1beta1.MachineSpec{ - Bootstrap: capiv1beta1.Bootstrap{ + Spec: clusterv1.MachineSpec{ + Bootstrap: clusterv1.Bootstrap{ DataSecretName: core.StringPtr(machineName), }, }, @@ -80,7 +80,7 @@ func newBootstrapSecret(clusterName, machineName string) *corev1.Secret { return &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - capiv1beta1.ClusterNameLabel: clusterName, + clusterv1.ClusterNameLabel: clusterName, }, Name: machineName, Namespace: "default", diff --git a/cloud/scope/machine.go b/cloud/scope/machine.go index ee5a36582..9666dd54c 100644 --- a/cloud/scope/machine.go +++ b/cloud/scope/machine.go @@ -35,7 +35,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/patch" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -53,8 +53,8 @@ type MachineScopeParams struct { IBMVPCClient vpc.Vpc Client client.Client Logger logr.Logger - Cluster *capiv1beta1.Cluster - Machine *capiv1beta1.Machine + Cluster *clusterv1.Cluster + Machine *clusterv1.Machine IBMVPCCluster *infrav1beta2.IBMVPCCluster IBMVPCMachine *infrav1beta2.IBMVPCMachine ServiceEndpoint []endpoints.ServiceEndpoint @@ -68,8 +68,8 @@ type MachineScope struct { IBMVPCClient vpc.Vpc GlobalTaggingClient globaltagging.GlobalTagging - Cluster *capiv1beta1.Cluster - Machine *capiv1beta1.Machine + Cluster *clusterv1.Cluster + Machine *clusterv1.Machine IBMVPCCluster *infrav1beta2.IBMVPCCluster IBMVPCMachine *infrav1beta2.IBMVPCMachine ServiceEndpoint []endpoints.ServiceEndpoint diff --git a/cloud/scope/machine_test.go b/cloud/scope/machine_test.go index 9ddf386ab..c1aa14bc5 100644 --- a/cloud/scope/machine_test.go +++ b/cloud/scope/machine_test.go @@ -31,7 +31,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/klog/v2" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -47,7 +47,7 @@ func newVPCMachine(clusterName, machineName string) *infrav1beta2.IBMVPCMachine return &infrav1beta2.IBMVPCMachine{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - capiv1beta1.ClusterNameLabel: clusterName, + clusterv1.ClusterNameLabel: clusterName, }, Name: machineName, Namespace: "default", @@ -263,7 +263,7 @@ func TestCreateMachine(t *testing.T) { secret := &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - capiv1beta1.ClusterNameLabel: clusterName, + clusterv1.ClusterNameLabel: clusterName, }, Name: machineName, Namespace: "default", diff --git a/cloud/scope/powervs_cluster.go b/cloud/scope/powervs_cluster.go index 1fe0ed2c5..049c7b730 100644 --- a/cloud/scope/powervs_cluster.go +++ b/cloud/scope/powervs_cluster.go @@ -45,7 +45,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/patch" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -86,7 +86,7 @@ const ( type PowerVSClusterScopeParams struct { Client client.Client Logger logr.Logger - Cluster *capiv1beta1.Cluster + Cluster *clusterv1.Cluster IBMPowerVSCluster *infrav1beta2.IBMPowerVSCluster ServiceEndpoint []endpoints.ServiceEndpoint @@ -116,7 +116,7 @@ type PowerVSClusterScope struct { COSClient cos.Cos ResourceManagerClient resourcemanager.ResourceManager - Cluster *capiv1beta1.Cluster + Cluster *clusterv1.Cluster IBMPowerVSCluster *infrav1beta2.IBMPowerVSCluster ServiceEndpoint []endpoints.ServiceEndpoint } diff --git a/cloud/scope/powervs_cluster_test.go b/cloud/scope/powervs_cluster_test.go index 44b774252..4e106b847 100644 --- a/cloud/scope/powervs_cluster_test.go +++ b/cloud/scope/powervs_cluster_test.go @@ -36,7 +36,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" "sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/utils" @@ -95,7 +95,7 @@ func TestNewPowerVSClusterScope(t *testing.T) { GenerateName: "powervs-test-", OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -124,7 +124,7 @@ func TestNewPowerVSClusterScope(t *testing.T) { GenerateName: "powervs-test-", OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -1419,9 +1419,9 @@ func TestReconcileLoadBalancers(t *testing.T) { }, }, }, - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: &clusterNetworkAPIServerPort, }, }, @@ -1470,9 +1470,9 @@ func TestReconcileLoadBalancers(t *testing.T) { }, }, }, - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: &clusterAPIServerPort, }, }, @@ -1521,9 +1521,9 @@ func TestReconcileLoadBalancers(t *testing.T) { }, }, }, - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: &clusterAPIServerPort, }, }, @@ -1669,9 +1669,9 @@ func TestCreateLoadbalancer(t *testing.T) { }, }, }, - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: &clusterAPIServerPort, }, }, @@ -1728,9 +1728,9 @@ func TestCreateLoadbalancer(t *testing.T) { }, }, }, - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: &clusterAPIServerPort, }, }, @@ -1768,9 +1768,9 @@ func TestCheckLoadBalancerPort(t *testing.T) { expectedErr := fmt.Errorf("port %d for the %s load balancer cannot be used as an additional listener port, as it is already assigned to the API server", port, lbName) clusterScope := PowerVSClusterScope{ - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: ptr.To(int32(port)), }, }, @@ -1790,9 +1790,9 @@ func TestCheckLoadBalancerPort(t *testing.T) { t.Run("When load balancer listener port and powerVS API server port are different", func(t *testing.T) { g := NewWithT(t) clusterScope := PowerVSClusterScope{ - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: ptr.To(int32(8080)), }, }, @@ -2555,7 +2555,7 @@ func TestReconcileVPC(t *testing.T) { clusterScope := PowerVSClusterScope{ IBMVPCClient: mockVPC, - Cluster: &capiv1beta1.Cluster{Spec: capiv1beta1.ClusterSpec{ClusterNetwork: nil}}, + Cluster: &clusterv1.Cluster{Spec: clusterv1.ClusterSpec{ClusterNetwork: nil}}, IBMPowerVSCluster: &infrav1beta2.IBMPowerVSCluster{Spec: infrav1beta2.IBMPowerVSClusterSpec{ ResourceGroup: &infrav1beta2.IBMPowerVSResourceReference{ID: ptr.To("resourceGroupID")}}}, } @@ -2712,7 +2712,7 @@ func TestPowerVSScopeCreateVPC(t *testing.T) { clusterScope := PowerVSClusterScope{ IBMVPCClient: mockVPC, - Cluster: &capiv1beta1.Cluster{Spec: capiv1beta1.ClusterSpec{ClusterNetwork: nil}}, + Cluster: &clusterv1.Cluster{Spec: clusterv1.ClusterSpec{ClusterNetwork: nil}}, IBMPowerVSCluster: &infrav1beta2.IBMPowerVSCluster{Spec: infrav1beta2.IBMPowerVSClusterSpec{ ResourceGroup: &infrav1beta2.IBMPowerVSResourceReference{ID: ptr.To("resourceGroupID")}}}, } @@ -2732,7 +2732,7 @@ func TestPowerVSScopeCreateVPC(t *testing.T) { clusterScope := PowerVSClusterScope{ IBMVPCClient: mockVPC, - Cluster: &capiv1beta1.Cluster{Spec: capiv1beta1.ClusterSpec{ClusterNetwork: nil}}, + Cluster: &clusterv1.Cluster{Spec: clusterv1.ClusterSpec{ClusterNetwork: nil}}, IBMPowerVSCluster: &infrav1beta2.IBMPowerVSCluster{Spec: infrav1beta2.IBMPowerVSClusterSpec{ ResourceGroup: &infrav1beta2.IBMPowerVSResourceReference{ID: ptr.To("resourceGroupID")}}}, } diff --git a/cloud/scope/powervs_machine.go b/cloud/scope/powervs_machine.go index eb2b4b30f..0c77b4de1 100644 --- a/cloud/scope/powervs_machine.go +++ b/cloud/scope/powervs_machine.go @@ -55,7 +55,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -76,8 +76,8 @@ const cosURLDomain = "cloud-object-storage.appdomain.cloud" type PowerVSMachineScopeParams struct { Logger logr.Logger Client client.Client - Cluster *capiv1beta1.Cluster - Machine *capiv1beta1.Machine + Cluster *clusterv1.Cluster + Machine *clusterv1.Machine IBMPowerVSCluster *infrav1beta2.IBMPowerVSCluster IBMPowerVSMachine *infrav1beta2.IBMPowerVSMachine IBMPowerVSImage *infrav1beta2.IBMPowerVSImage @@ -92,8 +92,8 @@ type PowerVSMachineScope struct { IBMPowerVSClient powervs.PowerVS IBMVPCClient vpc.Vpc ResourceClient resourcecontroller.ResourceController - Cluster *capiv1beta1.Cluster - Machine *capiv1beta1.Machine + Cluster *clusterv1.Cluster + Machine *clusterv1.Machine IBMPowerVSCluster *infrav1beta2.IBMPowerVSCluster IBMPowerVSMachine *infrav1beta2.IBMPowerVSMachine IBMPowerVSImage *infrav1beta2.IBMPowerVSImage diff --git a/cloud/scope/powervs_machine_test.go b/cloud/scope/powervs_machine_test.go index 63af599ad..75cd1b04a 100644 --- a/cloud/scope/powervs_machine_test.go +++ b/cloud/scope/powervs_machine_test.go @@ -43,7 +43,7 @@ import ( resourcecontrollermock "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/resourcecontroller/mock" vpcmock "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/vpc/mock" "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/options" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -69,7 +69,7 @@ func newPowerVSMachine(clusterName, machineName string, imageRef *string, networ return &infrav1beta2.IBMPowerVSMachine{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - capiv1beta1.ClusterNameLabel: clusterName, + clusterv1.ClusterNameLabel: clusterName, }, Name: machineName, Namespace: "default", @@ -139,9 +139,9 @@ func TestAPIServerPort(t *testing.T) { name: "Returns assigned port number", expectedPortNumber: int32(6445), machineScope: PowerVSMachineScope{ - Cluster: &capiv1beta1.Cluster{ - Spec: capiv1beta1.ClusterSpec{ - ClusterNetwork: &capiv1beta1.ClusterNetwork{ + Cluster: &clusterv1.Cluster{ + Spec: clusterv1.ClusterSpec{ + ClusterNetwork: &clusterv1.ClusterNetwork{ APIServerPort: ptr.To(int32(6445)), }, }, @@ -151,7 +151,7 @@ func TestAPIServerPort(t *testing.T) { name: "Returns DefaultAPIServerPort when machineScope.Cluster.Spec.ClusterNetwork is nil", expectedPortNumber: infrav1beta2.DefaultAPIServerPort, machineScope: PowerVSMachineScope{ - Cluster: &capiv1beta1.Cluster{}, + Cluster: &clusterv1.Cluster{}, }, }, } @@ -678,7 +678,7 @@ func TestBootstrapDataKey(t *testing.T) { }{ { name: "Returns BootstrapDataKey for a machine in control plane", - machineLabel: capiv1beta1.MachineControlPlaneLabel, + machineLabel: clusterv1.MachineControlPlaneLabel, machineName: "foo-machine-0", expectedBootstrapDataKey: path.Join("control-plane", "foo-machine-0"), }, @@ -699,7 +699,7 @@ func TestBootstrapDataKey(t *testing.T) { Name: tc.machineName, }, }, - Machine: &capiv1beta1.Machine{ + Machine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ tc.machineLabel: "", @@ -1142,9 +1142,9 @@ func TestDeleteMachineIgnition(t *testing.T) { t.Run("Fails to retrieve bootstrap data: linked Machine's bootstrap.dataSecretName is nil", func(t *testing.T) { g := NewWithT(t) scope := PowerVSMachineScope{ - Machine: &capiv1beta1.Machine{ - Spec: capiv1beta1.MachineSpec{ - Bootstrap: capiv1beta1.Bootstrap{ + Machine: &clusterv1.Machine{ + Spec: clusterv1.MachineSpec{ + Bootstrap: clusterv1.Bootstrap{ DataSecretName: nil, }, }, @@ -1165,9 +1165,9 @@ func TestDeleteMachineIgnition(t *testing.T) { IBMPowerVSCluster: &infrav1beta2.IBMPowerVSCluster{ Spec: infrav1beta2.IBMPowerVSClusterSpec{}, }, - Machine: &capiv1beta1.Machine{ - Spec: capiv1beta1.MachineSpec{ - Bootstrap: capiv1beta1.Bootstrap{ + Machine: &clusterv1.Machine{ + Spec: clusterv1.MachineSpec{ + Bootstrap: clusterv1.Bootstrap{ DataSecretName: ptr.To(machineName), }, }, @@ -1203,9 +1203,9 @@ func TestDeleteMachineIgnition(t *testing.T) { }, }, ResourceClient: mockResourceController, - Machine: &capiv1beta1.Machine{ - Spec: capiv1beta1.MachineSpec{ - Bootstrap: capiv1beta1.Bootstrap{ + Machine: &clusterv1.Machine{ + Spec: clusterv1.MachineSpec{ + Bootstrap: clusterv1.Bootstrap{ DataSecretName: ptr.To(machineName), }, }, @@ -1253,9 +1253,9 @@ func TestDeleteMachineIgnition(t *testing.T) { }, }, ResourceClient: mockResourceController, - Machine: &capiv1beta1.Machine{ - Spec: capiv1beta1.MachineSpec{ - Bootstrap: capiv1beta1.Bootstrap{ + Machine: &clusterv1.Machine{ + Spec: clusterv1.MachineSpec{ + Bootstrap: clusterv1.Bootstrap{ DataSecretName: ptr.To(machineName), }, }, @@ -1344,7 +1344,7 @@ func TestCreateMachinePVS(t *testing.T) { t.Cleanup(teardown) expectedOutput := (*models.PVMInstanceReference)(nil) scope := setupPowerVSMachineScope(clusterName, "foo-machine-2", ptr.To(pvsImage), ptr.To(pvsNetwork), true, mockpowervs) - scope.IBMPowerVSMachine.Status.Conditions = append(scope.IBMPowerVSMachine.Status.Conditions, capiv1beta1.Condition{ + scope.IBMPowerVSMachine.Status.Conditions = append(scope.IBMPowerVSMachine.Status.Conditions, clusterv1.Condition{ Type: infrav1beta2.InstanceReadyCondition, Status: corev1.ConditionUnknown, }) @@ -1394,7 +1394,7 @@ func TestCreateMachinePVS(t *testing.T) { secret := &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - capiv1beta1.ClusterNameLabel: clusterName, + clusterv1.ClusterNameLabel: clusterName, }, Name: machineName, Namespace: "default", @@ -1542,7 +1542,7 @@ func TestCreateVPCLoadBalancerPoolMemberPowerVSMachine(t *testing.T) { mockClient := vpcmock.NewMockVpc(mockCtrl) scope := PowerVSMachineScope{ - Machine: &capiv1beta1.Machine{ + Machine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{}, }, IBMVPCClient: mockClient, @@ -1626,7 +1626,7 @@ func TestCreateVPCLoadBalancerPoolMemberPowerVSMachine(t *testing.T) { mockClient := vpcmock.NewMockVpc(mockCtrl) scope := PowerVSMachineScope{ - Machine: &capiv1beta1.Machine{ + Machine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{}, }, IBMVPCClient: mockClient, @@ -1713,7 +1713,7 @@ func TestCreateVPCLoadBalancerPoolMemberPowerVSMachine(t *testing.T) { mockClient := vpcmock.NewMockVpc(mockCtrl) scope := PowerVSMachineScope{ - Machine: &capiv1beta1.Machine{ + Machine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{}, }, IBMVPCClient: mockClient, @@ -1803,7 +1803,7 @@ func TestCreateVPCLoadBalancerPoolMemberPowerVSMachine(t *testing.T) { mockClient := vpcmock.NewMockVpc(mockCtrl) scope := PowerVSMachineScope{ - Machine: &capiv1beta1.Machine{ + Machine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "cluster.x-k8s.io/control-plane": "true", diff --git a/cloud/scope/suite_test.go b/cloud/scope/suite_test.go index e0d0bfe97..6fe2f4943 100644 --- a/cloud/scope/suite_test.go +++ b/cloud/scope/suite_test.go @@ -24,7 +24,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes/scheme" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ctrl "sigs.k8s.io/controller-runtime" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -47,7 +47,7 @@ func TestMain(m *testing.M) { // Setting up the test environment. func setup() { utilruntime.Must(infrav1beta2.AddToScheme(scheme.Scheme)) - utilruntime.Must(capiv1beta1.AddToScheme(scheme.Scheme)) + utilruntime.Must(clusterv1.AddToScheme(scheme.Scheme)) testEnvConfig := helpers.NewTestEnvironmentConfiguration([]string{ path.Join("config", "crd", "bases"), }, diff --git a/cloud/scope/vpc_cluster.go b/cloud/scope/vpc_cluster.go index a07a70feb..94668e575 100644 --- a/cloud/scope/vpc_cluster.go +++ b/cloud/scope/vpc_cluster.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/patch" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -65,7 +65,7 @@ const ( // VPCClusterScopeParams defines the input parameters used to create a new VPCClusterScope. type VPCClusterScopeParams struct { Client client.Client - Cluster *capiv1beta1.Cluster + Cluster *clusterv1.Cluster IBMVPCCluster *infrav1beta2.IBMVPCCluster Logger logr.Logger ServiceEndpoint []endpoints.ServiceEndpoint @@ -85,7 +85,7 @@ type VPCClusterScope struct { ResourceManagerClient resourcemanager.ResourceManager VPCClient vpc.Vpc - Cluster *capiv1beta1.Cluster + Cluster *clusterv1.Cluster IBMVPCCluster *infrav1beta2.IBMVPCCluster ServiceEndpoint []endpoints.ServiceEndpoint } diff --git a/controllers/ibmpowervscluster_controller.go b/controllers/ibmpowervscluster_controller.go index 51186912e..edf133410 100644 --- a/controllers/ibmpowervscluster_controller.go +++ b/controllers/ibmpowervscluster_controller.go @@ -39,12 +39,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + capiv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" - "sigs.k8s.io/cluster-api/util/conditions" - v1beta2conditions "sigs.k8s.io/cluster-api/util/conditions/v1beta2" + v1beta2conditions "sigs.k8s.io/cluster-api/util/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" + "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch" //nolint:staticcheck "sigs.k8s.io/cluster-api/util/finalizers" - "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/cluster-api/util/paused" "sigs.k8s.io/cluster-api/util/predicates" @@ -200,6 +201,7 @@ func (r *IBMPowerVSClusterReconciler) reconcile(ctx context.Context, clusterScop var errList []error // receive return values from the channel and decide the requeue for val := range ch { + //nolint:staticcheck if val.Requeue { requeue = true } @@ -219,7 +221,7 @@ func (r *IBMPowerVSClusterReconciler) reconcile(ctx context.Context, clusterScop // reconcile Transit Gateway log.Info("Reconciling transit gateway") if requeue, err := clusterScope.ReconcileTransitGateway(ctx); err != nil { - conditions.MarkFalse(powerVSCluster.cluster, infrav1beta2.TransitGatewayReadyCondition, infrav1beta2.TransitGatewayReconciliationFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(powerVSCluster.cluster, infrav1beta2.TransitGatewayReadyCondition, infrav1beta2.TransitGatewayReconciliationFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) v1beta2conditions.Set(powerVSCluster.cluster, metav1.Condition{ Type: infrav1beta2.TransitGatewayReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -242,7 +244,7 @@ func (r *IBMPowerVSClusterReconciler) reconcile(ctx context.Context, clusterScop if clusterScope.IBMPowerVSCluster.Spec.Ignition != nil { log.Info("Reconciling COS service instance") if err := clusterScope.ReconcileCOSInstance(ctx); err != nil { - conditions.MarkFalse(powerVSCluster.cluster, infrav1beta2.COSInstanceReadyCondition, infrav1beta2.COSInstanceReconciliationFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(powerVSCluster.cluster, infrav1beta2.COSInstanceReadyCondition, infrav1beta2.COSInstanceReconciliationFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) v1beta2conditions.Set(powerVSCluster.cluster, metav1.Condition{ Type: infrav1beta2.COSInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -303,11 +305,11 @@ func (r *IBMPowerVSClusterReconciler) reconcilePowerVSResources(ctx context.Cont // reconcile PowerVS service instance log.Info("Reconciling PowerVS service instance") if requeue, err := clusterScope.ReconcilePowerVSServiceInstance(ctx); err != nil { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionFalse, Type: infrav1beta2.ServiceInstanceReadyCondition, Reason: infrav1beta2.ServiceInstanceReconciliationFailedReason, - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, Message: err.Error(), }) //TODO: When we completely transition into v1beta2 api's update the conditions with lock @@ -324,7 +326,7 @@ func (r *IBMPowerVSClusterReconciler) reconcilePowerVSResources(ctx context.Cont ch <- reconcileResult{reconcile.Result{Requeue: true}, nil} return } - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionTrue, Type: infrav1beta2.ServiceInstanceReadyCondition, }) @@ -339,11 +341,11 @@ func (r *IBMPowerVSClusterReconciler) reconcilePowerVSResources(ctx context.Cont // reconcile network log.Info("Reconciling network") if networkActive, err := clusterScope.ReconcileNetwork(ctx); err != nil { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionFalse, Type: infrav1beta2.NetworkReadyCondition, Reason: infrav1beta2.NetworkReconciliationFailedReason, - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, Message: err.Error(), }) v1beta2conditions.Set(powerVSCluster.cluster, metav1.Condition{ @@ -355,7 +357,7 @@ func (r *IBMPowerVSClusterReconciler) reconcilePowerVSResources(ctx context.Cont ch <- reconcileResult{reconcile.Result{}, fmt.Errorf("failed to reconcile network: %w", err)} return } else if networkActive { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionTrue, Type: infrav1beta2.NetworkReadyCondition, }) @@ -380,11 +382,11 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, defer log.Info("Finished VPC reconciliation") if requeue, err := clusterScope.ReconcileVPC(ctx); err != nil { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionFalse, Type: infrav1beta2.VPCReadyCondition, Reason: infrav1beta2.VPCReconciliationFailedReason, - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, Message: err.Error(), }) v1beta2conditions.Set(powerVSCluster.cluster, metav1.Condition{ @@ -400,7 +402,7 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, ch <- reconcileResult{reconcile.Result{Requeue: true}, nil} return } - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionTrue, Type: infrav1beta2.VPCReadyCondition, }) @@ -413,11 +415,11 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, // reconcile VPC Subnet log.Info("Reconciling VPC subnets") if requeue, err := clusterScope.ReconcileVPCSubnets(ctx); err != nil { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionFalse, Type: infrav1beta2.VPCSubnetReadyCondition, Reason: infrav1beta2.VPCSubnetReconciliationFailedReason, - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, Message: err.Error(), }) v1beta2conditions.Set(powerVSCluster.cluster, metav1.Condition{ @@ -433,7 +435,7 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, ch <- reconcileResult{reconcile.Result{Requeue: true}, nil} return } - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionTrue, Type: infrav1beta2.VPCSubnetReadyCondition, }) @@ -446,11 +448,11 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, // reconcile VPC security group log.Info("Reconciling VPC security group") if err := clusterScope.ReconcileVPCSecurityGroups(ctx); err != nil { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionFalse, Type: infrav1beta2.VPCSecurityGroupReadyCondition, Reason: infrav1beta2.VPCSecurityGroupReconciliationFailedReason, - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, Message: err.Error(), }) v1beta2conditions.Set(powerVSCluster.cluster, metav1.Condition{ @@ -462,7 +464,7 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, ch <- reconcileResult{reconcile.Result{}, fmt.Errorf("failed to reconcile VPC security groups: %w", err)} return } - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionTrue, Type: infrav1beta2.VPCSecurityGroupReadyCondition, }) @@ -475,11 +477,11 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, // reconcile LoadBalancer log.Info("Reconciling VPC load balancers") if loadBalancerReady, err := clusterScope.ReconcileLoadBalancers(ctx); err != nil { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionFalse, Type: infrav1beta2.LoadBalancerReadyCondition, Reason: infrav1beta2.LoadBalancerReconciliationFailedReason, - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, Message: err.Error(), }) v1beta2conditions.Set(powerVSCluster.cluster, metav1.Condition{ @@ -491,7 +493,7 @@ func (r *IBMPowerVSClusterReconciler) reconcileVPCResources(ctx context.Context, ch <- reconcileResult{reconcile.Result{}, fmt.Errorf("failed to reconcile VPC load balancers: %w", err)} return } else if loadBalancerReady { - powerVSCluster.updateCondition(capiv1beta1.Condition{ + powerVSCluster.updateCondition(clusterv1.Condition{ Status: corev1.ConditionTrue, Type: infrav1beta2.LoadBalancerReadyCondition, }) @@ -634,7 +636,7 @@ func (r *IBMPowerVSClusterReconciler) reconcileDelete(ctx context.Context, clust return ctrl.Result{}, nil } -func (update *powerVSCluster) updateCondition(condition capiv1beta1.Condition) { +func (update *powerVSCluster) updateCondition(condition clusterv1.Condition) { update.mu.Lock() defer update.mu.Unlock() conditions.Set(update.cluster, &condition) @@ -724,7 +726,7 @@ func (r *IBMPowerVSClusterReconciler) listDescendants(ctx context.Context, clust listOptions := []client.ListOption{ client.InNamespace(cluster.Namespace), - client.MatchingLabels(map[string]string{capiv1beta1.ClusterNameLabel: cluster.Name}), + client.MatchingLabels(map[string]string{clusterv1.ClusterNameLabel: cluster.Name}), } if err := r.Client.List(ctx, &descendants.ibmPowerVSImages, listOptions...); err != nil { @@ -827,7 +829,7 @@ func (r *IBMPowerVSClusterReconciler) SetupWithManager(ctx context.Context, mgr WithEventFilter(predicates.ResourceHasFilterLabel(r.Scheme, predicateLog, r.WatchFilterValue)). WithEventFilter(predicates.ResourceIsNotExternallyManaged(r.Scheme, predicateLog)). Watches( - &capiv1beta1.Cluster{}, + &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(ctx, infrav1beta2.GroupVersion.WithKind("IBMPowerVSCluster"), mgr.GetClient(), &infrav1beta2.IBMPowerVSCluster{})), builder.WithPredicates(predicates.All(r.Scheme, predicateLog, predicates.ResourceIsChanged(r.Scheme, predicateLog), diff --git a/controllers/ibmpowervscluster_controller_test.go b/controllers/ibmpowervscluster_controller_test.go index 80a2f2b05..95b6c3cbe 100644 --- a/controllers/ibmpowervscluster_controller_test.go +++ b/controllers/ibmpowervscluster_controller_test.go @@ -44,7 +44,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -106,7 +106,7 @@ func TestIBMPowerVSClusterReconciler_Reconcile(t *testing.T) { Finalizers: []string{infrav1beta2.IBMPowerVSClusterFinalizer}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -191,7 +191,7 @@ func TestIBMPowerVSClusterReconciler_Reconcile(t *testing.T) { Finalizers: []string{infrav1beta2.IBMPowerVSClusterFinalizer}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -226,7 +226,7 @@ func TestIBMPowerVSClusterReconciler_Reconcile(t *testing.T) { Finalizers: []string{infrav1beta2.IBMPowerVSClusterFinalizer}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -234,7 +234,7 @@ func TestIBMPowerVSClusterReconciler_Reconcile(t *testing.T) { Spec: infrav1beta2.IBMPowerVSClusterSpec{Zone: ptr.To("zone")}, } - ownerCluster := &capiv1beta1.Cluster{ + ownerCluster := &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test", Namespace: ns.Name, @@ -290,7 +290,7 @@ func TestIBMPowerVSClusterReconciler_Reconcile(t *testing.T) { Finalizers: []string{infrav1beta2.IBMPowerVSClusterFinalizer}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -298,7 +298,7 @@ func TestIBMPowerVSClusterReconciler_Reconcile(t *testing.T) { Spec: infrav1beta2.IBMPowerVSClusterSpec{Zone: ptr.To("zone")}, } - ownerCluster := &capiv1beta1.Cluster{ + ownerCluster := &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test", Namespace: ns.Name, @@ -353,7 +353,7 @@ func TestIBMPowerVSClusterReconciler_reconcile(t *testing.T) { clusterStatus bool expectedResult ctrl.Result expectedError error - conditions capiv1beta1.Conditions + conditions clusterv1.Conditions }{ { name: "Should add finalizer and reconcile IBMPowerVSCluster", @@ -584,14 +584,14 @@ func TestIBMPowerVSClusterReconciler_reconcile(t *testing.T) { return clusterScope }, expectedError: errors.New("error getting transit gateway"), - conditions: capiv1beta1.Conditions{ + conditions: clusterv1.Conditions{ getVPCLBReadyCondition(), getNetworkReadyCondition(), getServiceInstanceReadyCondition(), - capiv1beta1.Condition{ + clusterv1.Condition{ Type: infrav1beta2.TransitGatewayReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.TransitGatewayReconciliationFailedReason, Message: "failed to get transit gateway: error getting transit gateway", @@ -658,11 +658,11 @@ func TestIBMPowerVSClusterReconciler_reconcile(t *testing.T) { return clusterScope }, expectedError: errors.New("error getting instance by name"), - conditions: capiv1beta1.Conditions{ - capiv1beta1.Condition{ + conditions: clusterv1.Conditions{ + clusterv1.Condition{ Type: infrav1beta2.COSInstanceReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.COSInstanceReconciliationFailedReason, Message: "failed to check if COS instance in cloud: failed to get COS service instance: error getting instance by name", @@ -735,7 +735,7 @@ func TestIBMPowerVSClusterReconciler_reconcile(t *testing.T) { name: "When reconcile is successful", powervsClusterScope: func() *scope.PowerVSClusterScope { clusterScope := &scope.PowerVSClusterScope{ - Cluster: &capiv1beta1.Cluster{}, + Cluster: &clusterv1.Cluster{}, IBMPowerVSCluster: getPowerVSClusterWithSpecAndStatus(), } clusterScope.IBMPowerVSClient = getMockPowerVS(t) @@ -780,7 +780,7 @@ func TestIBMPowerVSClusterReconciler_reconcile(t *testing.T) { ignoreLastTransitionTime := cmp.Transformer("", func(metav1.Time) metav1.Time { return metav1.Time{} }) - g.Expect(powerVSClusterScope.IBMPowerVSCluster.GetConditions()).To(BeComparableTo(tc.conditions, ignoreLastTransitionTime)) + g.Expect(powerVSClusterScope.IBMPowerVSCluster.GetV1Beta1Conditions()).To(BeComparableTo(tc.conditions, ignoreLastTransitionTime)) } }) } @@ -811,7 +811,7 @@ func TestIBMPowerVSClusterReconciler_delete(t *testing.T) { Annotations: map[string]string{"powervs.cluster.x-k8s.io/create-infra": "true"}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -879,7 +879,7 @@ func TestIBMPowerVSClusterReconciler_delete(t *testing.T) { UID: "1", }, }, - Labels: map[string]string{capiv1beta1.ClusterNameLabel: "capi-powervs-cluster"}, + Labels: map[string]string{clusterv1.ClusterNameLabel: "capi-powervs-cluster"}, }, Spec: infrav1beta2.IBMPowerVSImageSpec{ ClusterName: "capi-powervs-cluster", @@ -899,7 +899,7 @@ func TestIBMPowerVSClusterReconciler_delete(t *testing.T) { UID: "1", }, }, - Labels: map[string]string{capiv1beta1.ClusterNameLabel: "capi-powervs-cluster"}, + Labels: map[string]string{clusterv1.ClusterNameLabel: "capi-powervs-cluster"}, }, Spec: infrav1beta2.IBMPowerVSImageSpec{ ClusterName: "capi-powervs-cluster", @@ -1322,7 +1322,7 @@ func TestReconcileVPCResources(t *testing.T) { name string powerVSClusterScopeFunc func() *scope.PowerVSClusterScope reconcileResult reconcileResult - conditions capiv1beta1.Conditions + conditions clusterv1.Conditions }{ { name: "when ReconcileVPC returns error", @@ -1338,11 +1338,11 @@ func TestReconcileVPCResources(t *testing.T) { reconcileResult: reconcileResult{ error: errors.New("vpc not found"), }, - conditions: capiv1beta1.Conditions{ - capiv1beta1.Condition{ + conditions: clusterv1.Conditions{ + clusterv1.Condition{ Type: infrav1beta2.VPCReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.VPCReconciliationFailedReason, Message: "failed to check if VPC exists: failed to get VPC: error fetching VPC details with name: vpc not found", @@ -1399,12 +1399,12 @@ func TestReconcileVPCResources(t *testing.T) { error: errors.New("vpc subnet not found"), }, - conditions: capiv1beta1.Conditions{ + conditions: clusterv1.Conditions{ getVPCReadyCondition(), - capiv1beta1.Condition{ + clusterv1.Condition{ Type: infrav1beta2.VPCSubnetReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.VPCSubnetReconciliationFailedReason, Message: "error checking VPC subnet with name: vpc subnet not found", @@ -1444,7 +1444,7 @@ func TestReconcileVPCResources(t *testing.T) { Requeue: true, }, }, - conditions: capiv1beta1.Conditions{ + conditions: clusterv1.Conditions{ getVPCReadyCondition(), }, }, @@ -1486,12 +1486,12 @@ func TestReconcileVPCResources(t *testing.T) { error: errors.New("failed to validate existing security group: vpc security group not found"), }, - conditions: capiv1beta1.Conditions{ + conditions: clusterv1.Conditions{ getVPCReadyCondition(), - capiv1beta1.Condition{ + clusterv1.Condition{ Type: infrav1beta2.VPCSecurityGroupReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.VPCSecurityGroupReconciliationFailedReason, Message: "failed to validate existing security group: vpc security group not found", @@ -1537,11 +1537,11 @@ func TestReconcileVPCResources(t *testing.T) { error: errors.New("load balancer not found"), }, - conditions: capiv1beta1.Conditions{ - capiv1beta1.Condition{ + conditions: clusterv1.Conditions{ + clusterv1.Condition{ Type: infrav1beta2.LoadBalancerReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.LoadBalancerReconciliationFailedReason, Message: "failed to fetch load balancer details: load balancer not found", @@ -1589,7 +1589,7 @@ func TestReconcileVPCResources(t *testing.T) { clusterScope.IBMVPCClient = mockVPC return clusterScope }, - conditions: capiv1beta1.Conditions{ + conditions: clusterv1.Conditions{ getVPCLBReadyCondition(), getVPCReadyCondition(), getVPCSGReadyCondition(), @@ -1623,7 +1623,7 @@ func TestReconcileVPCResources(t *testing.T) { ignoreLastTransitionTime := cmp.Transformer("", func(metav1.Time) metav1.Time { return metav1.Time{} }) - g.Expect(pvsCluster.cluster.GetConditions()).To(BeComparableTo(tc.conditions, ignoreLastTransitionTime)) + g.Expect(pvsCluster.cluster.GetV1Beta1Conditions()).To(BeComparableTo(tc.conditions, ignoreLastTransitionTime)) }) } } @@ -1633,7 +1633,7 @@ func TestReconcilePowerVSResources(t *testing.T) { name string powerVSClusterScopeFunc func() *scope.PowerVSClusterScope reconcileResult reconcileResult - conditions capiv1beta1.Conditions + conditions clusterv1.Conditions }{ { name: "When Reconciling PowerVS service instance returns error", @@ -1656,11 +1656,11 @@ func TestReconcilePowerVSResources(t *testing.T) { error: errors.New("error getting resource instance"), }, - conditions: capiv1beta1.Conditions{ - capiv1beta1.Condition{ + conditions: clusterv1.Conditions{ + clusterv1.Condition{ Type: infrav1beta2.ServiceInstanceReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.ServiceInstanceReconciliationFailedReason, Message: "failed to fetch service instance details: error getting resource instance", @@ -1716,11 +1716,11 @@ func TestReconcilePowerVSResources(t *testing.T) { reconcileResult: reconcileResult{ error: errors.New("error getting network"), }, - conditions: capiv1beta1.Conditions{ - capiv1beta1.Condition{ + conditions: clusterv1.Conditions{ + clusterv1.Condition{ Type: infrav1beta2.NetworkReadyCondition, Status: "False", - Severity: capiv1beta1.ConditionSeverityError, + Severity: clusterv1.ConditionSeverityError, LastTransitionTime: metav1.Time{}, Reason: infrav1beta2.NetworkReconciliationFailedReason, Message: "failed to fetch network by ID: error getting network", @@ -1751,7 +1751,7 @@ func TestReconcilePowerVSResources(t *testing.T) { clusterScope.IBMPowerVSClient = mockPowerVS return clusterScope }, - conditions: capiv1beta1.Conditions{ + conditions: clusterv1.Conditions{ getNetworkReadyCondition(), getServiceInstanceReadyCondition(), }, @@ -1783,41 +1783,41 @@ func TestReconcilePowerVSResources(t *testing.T) { ignoreLastTransitionTime := cmp.Transformer("", func(metav1.Time) metav1.Time { return metav1.Time{} }) - g.Expect(pvsCluster.cluster.GetConditions()).To(BeComparableTo(tc.conditions, ignoreLastTransitionTime)) + g.Expect(pvsCluster.cluster.GetV1Beta1Conditions()).To(BeComparableTo(tc.conditions, ignoreLastTransitionTime)) }) } } -func getVPCReadyCondition() capiv1beta1.Condition { - return capiv1beta1.Condition{ +func getVPCReadyCondition() clusterv1.Condition { + return clusterv1.Condition{ Type: infrav1beta2.VPCReadyCondition, Status: "True", } } -func getVPCSubnetReadyCondition() capiv1beta1.Condition { - return capiv1beta1.Condition{ +func getVPCSubnetReadyCondition() clusterv1.Condition { + return clusterv1.Condition{ Type: infrav1beta2.VPCSubnetReadyCondition, Status: "True", } } -func getVPCSGReadyCondition() capiv1beta1.Condition { - return capiv1beta1.Condition{ +func getVPCSGReadyCondition() clusterv1.Condition { + return clusterv1.Condition{ Type: infrav1beta2.VPCSecurityGroupReadyCondition, Status: "True", } } -func getVPCLBReadyCondition() capiv1beta1.Condition { - return capiv1beta1.Condition{ +func getVPCLBReadyCondition() clusterv1.Condition { + return clusterv1.Condition{ Type: infrav1beta2.LoadBalancerReadyCondition, Status: "True", } } -func getTGReadyCondition() capiv1beta1.Condition { - return capiv1beta1.Condition{ +func getTGReadyCondition() clusterv1.Condition { + return clusterv1.Condition{ Type: infrav1beta2.TransitGatewayReadyCondition, Status: "True", } @@ -1956,14 +1956,14 @@ func cleanupCluster(g *WithT, powervsCluster *infrav1beta2.IBMPowerVSCluster, na } } -func getServiceInstanceReadyCondition() capiv1beta1.Condition { - return capiv1beta1.Condition{ +func getServiceInstanceReadyCondition() clusterv1.Condition { + return clusterv1.Condition{ Type: infrav1beta2.ServiceInstanceReadyCondition, Status: "True", } } -func getNetworkReadyCondition() capiv1beta1.Condition { - return capiv1beta1.Condition{ +func getNetworkReadyCondition() clusterv1.Condition { + return clusterv1.Condition{ Type: infrav1beta2.NetworkReadyCondition, Status: "True", } diff --git a/controllers/ibmpowervsimage_controller.go b/controllers/ibmpowervsimage_controller.go index 2ad94ac6f..771fd8ae5 100644 --- a/controllers/ibmpowervsimage_controller.go +++ b/controllers/ibmpowervsimage_controller.go @@ -33,9 +33,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterv1util "sigs.k8s.io/cluster-api/util" - "sigs.k8s.io/cluster-api/util/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" "sigs.k8s.io/cluster-api-provider-ibmcloud/cloud/scope" @@ -116,8 +116,8 @@ func (r *IBMPowerVSImageReconciler) reconcile(cluster *infrav1beta2.IBMPowerVSCl imageScope.IBMPowerVSImage.Labels = make(map[string]string) } - if _, ok := imageScope.IBMPowerVSImage.Labels[capiv1beta1.ClusterNameLabel]; !ok { - imageScope.IBMPowerVSImage.Labels[capiv1beta1.ClusterNameLabel] = imageScope.IBMPowerVSImage.Spec.ClusterName + if _, ok := imageScope.IBMPowerVSImage.Labels[clusterv1.ClusterNameLabel]; !ok { + imageScope.IBMPowerVSImage.Labels[clusterv1.ClusterNameLabel] = imageScope.IBMPowerVSImage.Spec.ClusterName } if r.shouldAdopt(*imageScope.IBMPowerVSImage) { @@ -143,17 +143,17 @@ func (r *IBMPowerVSImageReconciler) reconcile(cluster *infrav1beta2.IBMPowerVSCl case "failed": imageScope.SetNotReady() imageScope.SetImageState(string(infrav1beta2.PowerVSImageStateFailed)) - conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageImportedCondition, infrav1beta2.ImageImportFailedReason, capiv1beta1.ConditionSeverityError, "%s", job.Status.Message) + conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageImportedCondition, infrav1beta2.ImageImportFailedReason, clusterv1.ConditionSeverityError, "%s", job.Status.Message) return ctrl.Result{RequeueAfter: 2 * time.Minute}, fmt.Errorf("failed to import image, message: %s", job.Status.Message) case "queued": imageScope.SetNotReady() imageScope.SetImageState(string(infrav1beta2.PowerVSImageStateQue)) - conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageImportedCondition, string(infrav1beta2.PowerVSImageStateQue), capiv1beta1.ConditionSeverityInfo, "%s", job.Status.Message) + conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageImportedCondition, string(infrav1beta2.PowerVSImageStateQue), clusterv1.ConditionSeverityInfo, "%s", job.Status.Message) return ctrl.Result{RequeueAfter: 2 * time.Minute}, nil default: imageScope.SetNotReady() imageScope.SetImageState(string(infrav1beta2.PowerVSImageStateImporting)) - conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageImportedCondition, *job.Status.State, capiv1beta1.ConditionSeverityInfo, "%s", job.Status.Message) + conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageImportedCondition, *job.Status.State, clusterv1.ConditionSeverityInfo, "%s", job.Status.Message) return ctrl.Result{RequeueAfter: 2 * time.Minute}, nil } } @@ -187,7 +187,7 @@ func reconcileImage(img *models.ImageReference, imageScope *scope.PowerVSImageSc case infrav1beta2.PowerVSImageStateQue: imageScope.Info("Image is in queued state") imageScope.SetNotReady() - conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageReadyCondition, infrav1beta2.ImageNotReadyReason, capiv1beta1.ConditionSeverityWarning, "") + conditions.MarkFalse(imageScope.IBMPowerVSImage, infrav1beta2.ImageReadyCondition, infrav1beta2.ImageNotReadyReason, clusterv1.ConditionSeverityWarning, "") return ctrl.Result{RequeueAfter: 1 * time.Minute}, nil case infrav1beta2.PowerVSImageStateACTIVE: imageScope.Info("Image is in active state") diff --git a/controllers/ibmpowervsimage_controller_test.go b/controllers/ibmpowervsimage_controller_test.go index b4d936f9b..b3e7fdd6c 100644 --- a/controllers/ibmpowervsimage_controller_test.go +++ b/controllers/ibmpowervsimage_controller_test.go @@ -30,9 +30,9 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/klog/v2" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" - "sigs.k8s.io/cluster-api/util/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -231,7 +231,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) { g.Expect(imageScope.IBMPowerVSImage.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSImageFinalizer)) g.Expect(imageScope.IBMPowerVSImage.Status.Ready).To(Equal(false)) g.Expect(imageScope.IBMPowerVSImage.Status.ImageState).To(BeEquivalentTo(infrav1beta2.PowerVSImageStateQue)) - expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityInfo, string(infrav1beta2.PowerVSImageStateQue)}}) + expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, string(infrav1beta2.PowerVSImageStateQue)}}) g.Expect(result.RequeueAfter).To(Not(BeZero())) }) t.Run("When importing image is still in progress", func(_ *testing.T) { @@ -242,7 +242,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) { g.Expect(imageScope.IBMPowerVSImage.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSImageFinalizer)) g.Expect(imageScope.IBMPowerVSImage.Status.Ready).To(Equal(false)) g.Expect(imageScope.IBMPowerVSImage.Status.ImageState).To(BeEquivalentTo(infrav1beta2.PowerVSImageStateImporting)) - expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityInfo, *job.Status.State}}) + expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, *job.Status.State}}) g.Expect(result.RequeueAfter).To(Not(BeZero())) }) t.Run("When import job status is failed", func(_ *testing.T) { @@ -253,7 +253,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) { g.Expect(imageScope.IBMPowerVSImage.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSImageFinalizer)) g.Expect(imageScope.IBMPowerVSImage.Status.Ready).To(Equal(false)) g.Expect(imageScope.IBMPowerVSImage.Status.ImageState).To(BeEquivalentTo(infrav1beta2.PowerVSImageStateFailed)) - expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityError, infrav1beta2.ImageImportFailedReason}}) + expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityError, infrav1beta2.ImageImportFailedReason}}) g.Expect(result.RequeueAfter).To(Not(BeZero())) }) job.Status.State = ptr.To("completed") @@ -288,7 +288,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) { g.Expect(err).To(BeNil()) g.Expect(imageScope.IBMPowerVSImage.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSImageFinalizer)) g.Expect(imageScope.IBMPowerVSImage.Status.Ready).To(Equal(false)) - expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityWarning, infrav1beta2.ImageNotReadyReason}}) + expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityWarning, infrav1beta2.ImageNotReadyReason}}) g.Expect(result.RequeueAfter).To(Not(BeZero())) }) t.Run("When import job status is completed and image state is undefined", func(_ *testing.T) { diff --git a/controllers/ibmpowervsmachine_controller.go b/controllers/ibmpowervsmachine_controller.go index 8f4715205..0893adb59 100644 --- a/controllers/ibmpowervsmachine_controller.go +++ b/controllers/ibmpowervsmachine_controller.go @@ -36,13 +36,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + capiv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" - "sigs.k8s.io/cluster-api/util/conditions" - v1beta2conditions "sigs.k8s.io/cluster-api/util/conditions/v1beta2" + v1beta2conditions "sigs.k8s.io/cluster-api/util/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" + "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch" //nolint:staticcheck "sigs.k8s.io/cluster-api/util/finalizers" clog "sigs.k8s.io/cluster-api/util/log" - "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/cluster-api/util/paused" "sigs.k8s.io/cluster-api/util/predicates" @@ -122,7 +123,7 @@ func (r *IBMPowerVSMachineReconciler) Reconcile(ctx context.Context, req ctrl.Re return ctrl.Result{}, nil } if cluster == nil { - log.Info(fmt.Sprintf("Please associate this machine with a cluster using the label %s: ", capiv1beta1.ClusterNameLabel)) + log.Info(fmt.Sprintf("Please associate this machine with a cluster using the label %s: ", clusterv1.ClusterNameLabel)) return ctrl.Result{}, nil } @@ -207,7 +208,7 @@ func (r *IBMPowerVSMachineReconciler) Reconcile(ctx context.Context, req ctrl.Re func (r *IBMPowerVSMachineReconciler) reconcileDelete(ctx context.Context, scope *scope.PowerVSMachineScope) (_ ctrl.Result, reterr error) { log := ctrl.LoggerFrom(ctx) - conditions.MarkFalse(scope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, capiv1beta1.DeletingReason, capiv1beta1.ConditionSeverityInfo, "") + conditions.MarkFalse(scope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, clusterv1.DeletingReason, clusterv1.ConditionSeverityInfo, "") v1beta2conditions.Set(scope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -227,7 +228,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileDelete(ctx context.Context, scope } if err := scope.DeleteMachine(); err != nil { log.Error(err, "error deleting IBMPowerVSMachine") - conditions.MarkFalse(scope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, capiv1beta1.DeletionFailedReason, capiv1beta1.ConditionSeverityWarning, "") + conditions.MarkFalse(scope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, capiv1beta1.DeletionFailedReason, clusterv1.ConditionSeverityWarning, "") v1beta2conditions.Set(scope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -263,9 +264,9 @@ func (r *IBMPowerVSMachineReconciler) handleLoadBalancerPoolMemberConfiguration( func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machineScope *scope.PowerVSMachineScope) (ctrl.Result, error) { //nolint:gocyclo log := ctrl.LoggerFrom(ctx) - if !machineScope.Cluster.Status.InfrastructureReady { + if machineScope.Cluster.Status.Initialization == nil || !machineScope.Cluster.Status.Initialization.InfrastructureProvisioned { log.Info("Cluster infrastructure is not ready yet, skipping reconciliation") - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.WaitingForClusterInfrastructureReason, capiv1beta1.ConditionSeverityInfo, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.WaitingForClusterInfrastructureReason, clusterv1.ConditionSeverityInfo, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -277,7 +278,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi if machineScope.IBMPowerVSImage != nil { if !machineScope.IBMPowerVSImage.Status.Ready { log.Info("IBMPowerVSImage is not ready yet, skipping reconciliation") - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.WaitingForIBMPowerVSImageReason, capiv1beta1.ConditionSeverityInfo, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.WaitingForIBMPowerVSImageReason, clusterv1.ConditionSeverityInfo, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -289,9 +290,9 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi // Make sure bootstrap data is available and populated. if machineScope.Machine.Spec.Bootstrap.DataSecretName == nil { - if !util.IsControlPlaneMachine(machineScope.Machine) && !conditions.IsTrue(machineScope.Cluster, capiv1beta1.ControlPlaneInitializedCondition) { + if !util.IsControlPlaneMachine(machineScope.Machine) && !conditions.IsTrue(machineScope.Cluster, clusterv1.ControlPlaneInitializedV1Beta1Condition) { log.Info("Waiting for the control plane to be initialized, skipping reconciliation") - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, capiv1beta1.WaitingForControlPlaneAvailableReason, capiv1beta1.ConditionSeverityInfo, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, capiv1beta1.WaitingForControlPlaneAvailableReason, clusterv1.ConditionSeverityInfo, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -301,7 +302,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi } log.Info("Waiting for bootstrap data to be ready, skipping reconciliation") - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.WaitingForBootstrapDataReason, capiv1beta1.ConditionSeverityInfo, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.WaitingForBootstrapDataReason, clusterv1.ConditionSeverityInfo, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -313,7 +314,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi machine, err := machineScope.CreateMachine(ctx) if err != nil { log.Error(err, "Unable to create PowerVS machine") - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceProvisionFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceProvisionFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -349,7 +350,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi switch machineScope.GetInstanceState() { case infrav1beta2.PowerVSInstanceStateBUILD: machineScope.SetNotReady() - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceNotReadyReason, capiv1beta1.ConditionSeverityWarning, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceNotReadyReason, clusterv1.ConditionSeverityWarning, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -357,7 +358,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi }) case infrav1beta2.PowerVSInstanceStateSHUTOFF: machineScope.SetNotReady() - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceStoppedReason, capiv1beta1.ConditionSeverityError, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceStoppedReason, clusterv1.ConditionSeverityError, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -374,7 +375,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi machineScope.SetNotReady() machineScope.SetFailureReason(infrav1beta2.UpdateMachineError) machineScope.SetFailureMessage(msg) - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceErroredReason, capiv1beta1.ConditionSeverityError, "%s", msg) + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceErroredReason, clusterv1.ConditionSeverityError, "%s", msg) v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -416,7 +417,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi internalIP := machineScope.GetMachineInternalIP() if internalIP == "" { log.Info("Unable to update the load balancer, Machine internal IP not yet set") - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.IBMPowerVSMachineInstanceWaitingForNetworkAddressV1Beta2Reason, capiv1beta1.ConditionSeverityWarning, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.IBMPowerVSMachineInstanceWaitingForNetworkAddressV1Beta2Reason, clusterv1.ConditionSeverityWarning, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -428,7 +429,7 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(ctx context.Context, machi log.Info("Configuring load balancer for machine", "IP", internalIP) result, err := r.handleLoadBalancerPoolMemberConfiguration(ctx, machineScope) if err != nil { - conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.IBMPowerVSMachineInstanceLoadBalancerConfigurationFailedV1Beta2Reason, capiv1beta1.ConditionSeverityWarning, "") + conditions.MarkFalse(machineScope.IBMPowerVSMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.IBMPowerVSMachineInstanceLoadBalancerConfigurationFailedV1Beta2Reason, clusterv1.ConditionSeverityWarning, "") v1beta2conditions.Set(machineScope.IBMPowerVSMachine, metav1.Condition{ Type: infrav1beta2.IBMPowerVSMachineInstanceReadyV1Beta2Condition, Status: metav1.ConditionFalse, @@ -466,8 +467,8 @@ func (r *IBMPowerVSMachineReconciler) ibmPowerVSClusterToIBMPowerVSMachines(ctx return result } - labels := map[string]string{capiv1beta1.ClusterNameLabel: cluster.Name} - machineList := &capiv1beta1.MachineList{} + labels := map[string]string{clusterv1.ClusterNameLabel: cluster.Name} + machineList := &clusterv1.MachineList{} if err := r.List(ctx, machineList, client.InNamespace(c.Namespace), client.MatchingLabels(labels)); err != nil { log.Error(err, "failed to list Machines") return nil @@ -495,7 +496,7 @@ func (r *IBMPowerVSMachineReconciler) SetupWithManager(ctx context.Context, mgr For(&infrav1beta2.IBMPowerVSMachine{}). WithEventFilter(predicates.ResourceHasFilterLabel(r.Scheme, predicateLog, r.WatchFilterValue)). Watches( - &capiv1beta1.Machine{}, + &clusterv1.Machine{}, handler.EnqueueRequestsFromMapFunc(util.MachineToInfrastructureMapFunc(infrav1beta2.GroupVersion.WithKind("IBMPowerVSMachine"))), builder.WithPredicates(predicates.ResourceIsChanged(r.Scheme, predicateLog)), ). @@ -505,11 +506,11 @@ func (r *IBMPowerVSMachineReconciler) SetupWithManager(ctx context.Context, mgr builder.WithPredicates(predicates.ResourceIsChanged(r.Scheme, predicateLog)), ). Watches( - &capiv1beta1.Cluster{}, + &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(clusterToIBMPowerVSMachines), builder.WithPredicates(predicates.All(r.Scheme, predicateLog, predicates.ResourceIsChanged(r.Scheme, predicateLog), - predicates.ClusterPausedTransitionsOrInfrastructureReady(r.Scheme, predicateLog), + predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(r.Scheme, predicateLog), )), ). Complete(r) diff --git a/controllers/ibmpowervsmachine_controller_test.go b/controllers/ibmpowervsmachine_controller_test.go index d13709f4d..7a5a4dd66 100644 --- a/controllers/ibmpowervsmachine_controller_test.go +++ b/controllers/ibmpowervsmachine_controller_test.go @@ -24,6 +24,10 @@ import ( "go.uber.org/mock/gomock" + "github.com/IBM-Cloud/power-go-client/power/models" + "github.com/IBM/go-sdk-core/v5/core" + "github.com/IBM/vpc-go-sdk/vpcv1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -32,24 +36,22 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/util" - "sigs.k8s.io/cluster-api/util/conditions" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/util" + conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" + infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" "sigs.k8s.io/cluster-api-provider-ibmcloud/cloud/scope" "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/powervs" "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/powervs/mock" mockVPC "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/vpc/mock" "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/options" + capiv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck - "github.com/IBM-Cloud/power-go-client/power/models" - "github.com/IBM/go-sdk-core/v5/core" - "github.com/IBM/vpc-go-sdk/vpcv1" . "github.com/onsi/gomega" ) @@ -57,9 +59,9 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { testCases := []struct { name string powervsMachine *infrav1beta2.IBMPowerVSMachine - ownerMachine *capiv1beta1.Machine + ownerMachine *clusterv1.Machine powervsCluster *infrav1beta2.IBMPowerVSCluster - ownerCluster *capiv1beta1.Cluster + ownerCluster *clusterv1.Cluster expectError bool }{ { @@ -83,7 +85,7 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { Name: "powervs-test-2", OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Machine", Name: "capi-test-machine", UID: "1", @@ -104,7 +106,7 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { Name: "powervs-test-3", OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Machine", Name: "capi-test-machine", UID: "1", @@ -114,9 +116,9 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { ServiceInstanceID: "service-instance-1", Image: &infrav1beta2.IBMPowerVSResourceReference{}}, }, - ownerMachine: &capiv1beta1.Machine{ + ownerMachine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{Name: "capi-test-machine"}}, - ownerCluster: &capiv1beta1.Cluster{ + ownerCluster: &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{Name: "capi-test-1"}}, expectError: false, }, @@ -125,16 +127,16 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { powervsMachine: &infrav1beta2.IBMPowerVSMachine{ ObjectMeta: metav1.ObjectMeta{ Name: "powervs-test-4", - Labels: map[string]string{capiv1beta1.ClusterNameAnnotation: "capi-test-2"}, + Labels: map[string]string{clusterv1.ClusterNameAnnotation: "capi-test-2"}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Machine", Name: "capi-test-machine", UID: "1", }, { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test-2", UID: "1", @@ -144,12 +146,12 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { ServiceInstanceID: "service-instance-1", Image: &infrav1beta2.IBMPowerVSResourceReference{}}, }, - ownerMachine: &capiv1beta1.Machine{ + ownerMachine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{Name: "capi-test-machine"}}, - ownerCluster: &capiv1beta1.Cluster{ + ownerCluster: &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test-2"}, - Spec: capiv1beta1.ClusterSpec{ + Spec: clusterv1.ClusterSpec{ InfrastructureRef: &corev1.ObjectReference{ Name: "powervs-cluster"}}}, expectError: false, @@ -159,16 +161,16 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { powervsMachine: &infrav1beta2.IBMPowerVSMachine{ ObjectMeta: metav1.ObjectMeta{ Name: "powervs-test-5", - Labels: map[string]string{capiv1beta1.ClusterNameAnnotation: "capi-test-3"}, + Labels: map[string]string{clusterv1.ClusterNameAnnotation: "capi-test-3"}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Machine", Name: "capi-test-machine", UID: "1", }, { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test-3", UID: "1", @@ -181,12 +183,12 @@ func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { Name: "capi-image", }}, }, - ownerMachine: &capiv1beta1.Machine{ + ownerMachine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{Name: "capi-test-machine"}}, - ownerCluster: &capiv1beta1.Cluster{ + ownerCluster: &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test-3"}, - Spec: capiv1beta1.ClusterSpec{ + Spec: clusterv1.ClusterSpec{ InfrastructureRef: &corev1.ObjectReference{Name: "powervs-cluster"}}}, powervsCluster: &infrav1beta2.IBMPowerVSCluster{ ObjectMeta: metav1.ObjectMeta{Name: "powervs-cluster"}, @@ -377,9 +379,9 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { setup(t) t.Cleanup(teardown) machineScope = &scope.PowerVSMachineScope{ - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: false, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{}, }, }, IBMPowerVSMachine: &infrav1beta2.IBMPowerVSMachine{}, @@ -387,7 +389,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { result, err := reconciler.reconcileNormal(ctx, machineScope) g.Expect(err).To(BeNil()) g.Expect(result.RequeueAfter).To(Not(BeZero())) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityInfo, infrav1beta2.WaitingForClusterInfrastructureReason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, infrav1beta2.WaitingForClusterInfrastructureReason}}) }) t.Run("Should requeue if IBMPowerVSImage status is not ready", func(t *testing.T) { @@ -395,9 +397,11 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { setup(t) t.Cleanup(teardown) machineScope = &scope.PowerVSMachineScope{ - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: true, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{ + InfrastructureProvisioned: true, + }, }, }, IBMPowerVSMachine: &infrav1beta2.IBMPowerVSMachine{}, @@ -410,7 +414,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { result, err := reconciler.reconcileNormal(ctx, machineScope) g.Expect(err).To(BeNil()) g.Expect(result.RequeueAfter).To(Not(BeZero())) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityInfo, infrav1beta2.WaitingForIBMPowerVSImageReason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, infrav1beta2.WaitingForIBMPowerVSImageReason}}) }) t.Run("Should requeue if boostrap data secret reference is not found", func(t *testing.T) { @@ -418,12 +422,14 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { setup(t) t.Cleanup(teardown) machineScope = &scope.PowerVSMachineScope{ - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: true, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{ + InfrastructureProvisioned: true, + }, }, }, - Machine: &capiv1beta1.Machine{}, + Machine: &clusterv1.Machine{}, IBMPowerVSMachine: &infrav1beta2.IBMPowerVSMachine{}, IBMPowerVSImage: &infrav1beta2.IBMPowerVSImage{ Status: infrav1beta2.IBMPowerVSImageStatus{ @@ -434,7 +440,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { result, err := reconciler.reconcileNormal(ctx, machineScope) g.Expect(err).To(BeNil()) g.Expect(result.RequeueAfter).To(BeZero()) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityInfo, capiv1beta1.WaitingForControlPlaneAvailableReason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, capiv1beta1.WaitingForControlPlaneAvailableReason}}) }) t.Run("Should fail reconcile with create instance failure due to error in retrieving bootstrap data secret", func(t *testing.T) { @@ -447,9 +453,11 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { mockClient := fake.NewClientBuilder().WithScheme(scheme.Scheme).WithObjects().Build() machineScope = &scope.PowerVSMachineScope{ Client: mockClient, - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: true, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{ + InfrastructureProvisioned: true, + }, }, }, Machine: machine, @@ -467,7 +475,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { g.Expect(err).To(HaveOccurred()) g.Expect(result.RequeueAfter).To(BeZero()) g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer)) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityError, infrav1beta2.InstanceProvisionFailedReason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityError, infrav1beta2.InstanceProvisionFailedReason}}) }) t.Run("Should fail reconcile if creation of the load balancer pool member is unsuccessful", func(t *testing.T) { @@ -486,9 +494,11 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { machineScope = &scope.PowerVSMachineScope{ Client: mockclient, - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: true, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{ + InfrastructureProvisioned: true, + }, }, }, Machine: machine, @@ -560,10 +570,11 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { mockvpc.EXPECT().GetLoadBalancer(gomock.AssignableToTypeOf(&vpcv1.GetLoadBalancerOptions{})).Return(loadBalancer, &core.DetailedResponse{}, nil) result, err := reconciler.reconcileNormal(ctx, machineScope) g.Expect(err).ToNot(BeNil()) + //nolint:staticcheck g.Expect(result.Requeue).To(BeFalse()) g.Expect(result.RequeueAfter).To(BeZero()) g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer)) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityWarning, infrav1beta2.IBMPowerVSMachineInstanceLoadBalancerConfigurationFailedV1Beta2Reason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityWarning, infrav1beta2.IBMPowerVSMachineInstanceLoadBalancerConfigurationFailedV1Beta2Reason}}) }) t.Run("Should requeue if the load balancer pool member is created successfully, but its provisioning status is not active", func(t *testing.T) { @@ -581,9 +592,11 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { mockclient := fake.NewClientBuilder().WithObjects([]client.Object{secret, pvsmachine, machine}...).Build() machineScope = &scope.PowerVSMachineScope{ Client: mockclient, - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: true, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{ + InfrastructureProvisioned: true, + }, }, }, Machine: machine, @@ -695,9 +708,11 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { mockclient := fake.NewClientBuilder().WithObjects([]client.Object{secret, pvsmachine, machine}...).Build() machineScope = &scope.PowerVSMachineScope{ Client: mockclient, - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: true, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{ + InfrastructureProvisioned: true, + }, }, }, Machine: machine, @@ -739,7 +754,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { g.Expect(result.RequeueAfter).To(Not(BeZero())) g.Expect(machineScope.IBMPowerVSMachine.Status.Ready).To(Equal(false)) g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer)) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityWarning, infrav1beta2.InstanceNotReadyReason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityWarning, infrav1beta2.InstanceNotReadyReason}}) t.Run("When PVM instance is in SHUTOFF state", func(_ *testing.T) { instance.Status = ptr.To("SHUTOFF") @@ -750,7 +765,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { g.Expect(result.RequeueAfter).To(BeZero()) g.Expect(machineScope.IBMPowerVSMachine.Status.Ready).To(Equal(false)) g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer)) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityError, infrav1beta2.InstanceStoppedReason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityError, infrav1beta2.InstanceStoppedReason}}) }) t.Run("When PVM instance is in ACTIVE state", func(_ *testing.T) { instance.Status = ptr.To("ACTIVE") @@ -773,7 +788,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { g.Expect(result.RequeueAfter).To(BeZero()) g.Expect(machineScope.IBMPowerVSMachine.Status.Ready).To(Equal(false)) g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer)) - expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityError, infrav1beta2.InstanceErroredReason}}) + expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityError, infrav1beta2.InstanceErroredReason}}) }) t.Run("When PVM instance is in unknown state", func(_ *testing.T) { instance.Status = ptr.To("UNKNOWN") @@ -805,9 +820,11 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { machineScope = &scope.PowerVSMachineScope{ Client: mockclient, - Cluster: &capiv1beta1.Cluster{ - Status: capiv1beta1.ClusterStatus{ - InfrastructureReady: true, + Cluster: &clusterv1.Cluster{ + Status: clusterv1.ClusterStatus{ + Initialization: &clusterv1.ClusterInitializationStatus{ + InfrastructureProvisioned: true, + }, }, }, Machine: machine, @@ -868,6 +885,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { mockpowervs.EXPECT().GetInstance(gomock.AssignableToTypeOf("capi-test-machine-id")).Return(instance, nil) result, err := reconciler.reconcileNormal(ctx, machineScope) g.Expect(err).To(BeNil()) + //nolint:staticcheck g.Expect(result.Requeue).To(BeFalse()) g.Expect(result.RequeueAfter).To(BeZero()) g.Expect(machineScope.IBMPowerVSMachine.Status.Ready).To(Equal(true)) @@ -877,9 +895,9 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) { } type conditionAssertion struct { - conditionType capiv1beta1.ConditionType + conditionType clusterv1.ConditionType status corev1.ConditionStatus - severity capiv1beta1.ConditionSeverity + severity clusterv1.ConditionSeverity reason string } @@ -912,7 +930,7 @@ func newSecret() *corev1.Secret { return &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - capiv1beta1.ClusterNameLabel: "powervs-cluster", + clusterv1.ClusterNameLabel: "powervs-cluster", }, Name: "bootsecret", Namespace: "default", @@ -943,14 +961,14 @@ func newIBMPowerVSMachine() *infrav1beta2.IBMPowerVSMachine { } } -func newMachine() *capiv1beta1.Machine { - return &capiv1beta1.Machine{ +func newMachine() *clusterv1.Machine { + return &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{ Name: "owner-machine", Namespace: "default", }, - Spec: capiv1beta1.MachineSpec{ - Bootstrap: capiv1beta1.Bootstrap{ + Spec: clusterv1.MachineSpec{ + Bootstrap: clusterv1.Bootstrap{ DataSecretName: ptr.To("bootsecret"), }, }, diff --git a/controllers/ibmvpccluster_controller.go b/controllers/ibmvpccluster_controller.go index 3ab9476a1..28d871754 100644 --- a/controllers/ibmvpccluster_controller.go +++ b/controllers/ibmvpccluster_controller.go @@ -34,9 +34,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" - "sigs.k8s.io/cluster-api/util/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" "sigs.k8s.io/cluster-api/util/predicates" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" @@ -239,7 +239,7 @@ func (r *IBMVPCClusterReconciler) reconcileCluster(clusterScope *scope.VPCCluste clusterScope.Info("Reconciling VPC") if requeue, err := clusterScope.ReconcileVPC(); err != nil { clusterScope.Error(err, "failed to reconcile VPC") - conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.VPCReadyCondition, infrav1beta2.VPCReconciliationFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.VPCReadyCondition, infrav1beta2.VPCReconciliationFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) return reconcile.Result{}, err } else if requeue { clusterScope.Info("VPC creation is pending, requeuing") @@ -252,7 +252,7 @@ func (r *IBMVPCClusterReconciler) reconcileCluster(clusterScope *scope.VPCCluste clusterScope.Info("Reconciling VPC Custom Image") if requeue, err := clusterScope.ReconcileVPCCustomImage(); err != nil { clusterScope.Error(err, "failed to reconcile VPC Custom Image") - conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.ImageReadyCondition, infrav1beta2.ImageReconciliationFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.ImageReadyCondition, infrav1beta2.ImageReconciliationFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) return reconcile.Result{}, err } else if requeue { clusterScope.Info("VPC Custom Image creation is pending, requeueing") @@ -265,7 +265,7 @@ func (r *IBMVPCClusterReconciler) reconcileCluster(clusterScope *scope.VPCCluste clusterScope.Info("Reconciling VPC Subnets") if requeue, err := clusterScope.ReconcileSubnets(); err != nil { clusterScope.Error(err, "failed to reconcile VPC Subnets") - conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.VPCSubnetReadyCondition, infrav1beta2.VPCSubnetReconciliationFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.VPCSubnetReadyCondition, infrav1beta2.VPCSubnetReconciliationFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) return reconcile.Result{}, err } else if requeue { clusterScope.Info("VPC Subnets creation is pending, requeueing") @@ -278,7 +278,7 @@ func (r *IBMVPCClusterReconciler) reconcileCluster(clusterScope *scope.VPCCluste clusterScope.Info("Reconciling Security Groups") if requeue, err := clusterScope.ReconcileSecurityGroups(); err != nil { clusterScope.Error(err, "failed to reconcile Security Groups") - conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.VPCSecurityGroupReadyCondition, infrav1beta2.VPCSecurityGroupReconciliationFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.VPCSecurityGroupReadyCondition, infrav1beta2.VPCSecurityGroupReconciliationFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) return reconcile.Result{}, err } else if requeue { clusterScope.Info("Security Groups creation is pending, requeueing") @@ -291,7 +291,7 @@ func (r *IBMVPCClusterReconciler) reconcileCluster(clusterScope *scope.VPCCluste clusterScope.Info("Reconciling Load Balancers") if requeue, err := clusterScope.ReconcileLoadBalancers(); err != nil { clusterScope.Error(err, "failed to reconcile Load Balancers") - conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.LoadBalancerReadyCondition, infrav1beta2.LoadBalancerReconciliationFailedReason, capiv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.LoadBalancerReadyCondition, infrav1beta2.LoadBalancerReconciliationFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) return reconcile.Result{}, err } else if requeue { clusterScope.Info("Load Balancers creation is pending, requeueing") @@ -400,7 +400,7 @@ func (r *IBMVPCClusterReconciler) reconcileLBState(clusterScope *scope.ClusterSc case infrav1beta2.VPCLoadBalancerStateCreatePending: clusterScope.Logger.V(3).Info("LoadBalancer is in create state") clusterScope.SetNotReady() - conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.LoadBalancerReadyCondition, string(infrav1beta2.VPCLoadBalancerStateCreatePending), capiv1beta1.ConditionSeverityInfo, "%s", *loadBalancer.OperatingStatus) + conditions.MarkFalse(clusterScope.IBMVPCCluster, infrav1beta2.LoadBalancerReadyCondition, string(infrav1beta2.VPCLoadBalancerStateCreatePending), clusterv1.ConditionSeverityInfo, "%s", *loadBalancer.OperatingStatus) case infrav1beta2.VPCLoadBalancerStateActive: clusterScope.Logger.V(3).Info("LoadBalancer is in active state") clusterScope.SetReady() diff --git a/controllers/ibmvpccluster_controller_test.go b/controllers/ibmvpccluster_controller_test.go index 2bf95d79a..1ab9311e7 100644 --- a/controllers/ibmvpccluster_controller_test.go +++ b/controllers/ibmvpccluster_controller_test.go @@ -30,7 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -46,7 +46,7 @@ func TestIBMVPCClusterReconciler_Reconcile(t *testing.T) { testCases := []struct { name string vpcCluster *infrav1beta2.IBMVPCCluster - ownerCluster *capiv1beta1.Cluster + ownerCluster *clusterv1.Cluster expectError bool }{ { @@ -56,7 +56,7 @@ func TestIBMVPCClusterReconciler_Reconcile(t *testing.T) { GenerateName: "vpc-test-", OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test", UID: "1", @@ -105,7 +105,7 @@ func TestIBMVPCClusterReconciler_Reconcile(t *testing.T) { }(tc.ownerCluster) tc.vpcCluster.OwnerReferences = []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: tc.ownerCluster.Name, UID: "1", @@ -158,7 +158,7 @@ func TestIBMVPCClusterReconciler_reconcile(t *testing.T) { } clusterScope = &scope.ClusterScope{ IBMVPCClient: mockvpc, - Cluster: &capiv1beta1.Cluster{}, + Cluster: &clusterv1.Cluster{}, Logger: klog.Background(), IBMVPCCluster: &infrav1beta2.IBMVPCCluster{ ObjectMeta: metav1.ObjectMeta{ @@ -258,7 +258,7 @@ func TestIBMVPCClusterReconciler_reconcile(t *testing.T) { t.Cleanup(teardown) clusterScope.IBMVPCCluster.Finalizers = []string{infrav1beta2.ClusterFinalizer} port := int32(412) - clusterScope.Cluster.Spec.ClusterNetwork = &capiv1beta1.ClusterNetwork{APIServerPort: &port} + clusterScope.Cluster.Spec.ClusterNetwork = &clusterv1.ClusterNetwork{APIServerPort: &port} mockvpc.EXPECT().ListVpcs(listVpcsOptions).Return(vpclist, response, nil) mockvpc.EXPECT().ListSubnets(subnetOptions).Return(subnets, response, nil) mockvpc.EXPECT().ListLoadBalancers(loadBalancerOptions).Return(loadBalancers, response, nil) @@ -295,7 +295,7 @@ func TestIBMVPCClusterLBReconciler_reconcile(t *testing.T) { } clusterScope := &scope.ClusterScope{ IBMVPCClient: mockvpc, - Cluster: &capiv1beta1.Cluster{}, + Cluster: &clusterv1.Cluster{}, Logger: klog.Background(), IBMVPCCluster: &infrav1beta2.IBMVPCCluster{ ObjectMeta: metav1.ObjectMeta{ @@ -376,7 +376,7 @@ func TestIBMVPCClusterLBReconciler_reconcile(t *testing.T) { t.Cleanup(mockController.Finish) clusterScope.IBMVPCCluster.Finalizers = []string{infrav1beta2.ClusterFinalizer} port := int32(412) - clusterScope.Cluster.Spec.ClusterNetwork = &capiv1beta1.ClusterNetwork{APIServerPort: &port} + clusterScope.Cluster.Spec.ClusterNetwork = &clusterv1.ClusterNetwork{APIServerPort: &port} mockvpc.EXPECT().ListVpcs(&vpcv1.ListVpcsOptions{}).Return(vpclist, &core.DetailedResponse{}, nil) mockvpc.EXPECT().ListSubnets(&vpcv1.ListSubnetsOptions{}).Return(subnets, &core.DetailedResponse{}, nil) mockvpc.EXPECT().ListLoadBalancers(&vpcv1.ListLoadBalancersOptions{}).Return(loadBalancerCollection, &core.DetailedResponse{}, nil) @@ -391,7 +391,7 @@ func TestIBMVPCClusterLBReconciler_reconcile(t *testing.T) { mockController, mockvpc, clusterScope, reconciler := setup(t) t.Cleanup(mockController.Finish) clusterScope.IBMVPCCluster.Finalizers = []string{infrav1beta2.ClusterFinalizer} - clusterScope.IBMVPCCluster.Spec.ControlPlaneEndpoint = capiv1beta1.APIEndpoint{ + clusterScope.IBMVPCCluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{ Host: *core.StringPtr("vpc-load-balancer-hostname"), } mockvpc.EXPECT().ListVpcs(&vpcv1.ListVpcsOptions{}).Return(vpclist, &core.DetailedResponse{}, nil) @@ -571,7 +571,7 @@ func TestIBMVPCClusterLBReconciler_delete(t *testing.T) { ControlPlaneLoadBalancer: &infrav1beta2.VPCLoadBalancerSpec{ Name: "vpc-load-balancer", }, - ControlPlaneEndpoint: capiv1beta1.APIEndpoint{ + ControlPlaneEndpoint: clusterv1.APIEndpoint{ Host: "vpc-load-balancer-hostname", }, }, diff --git a/controllers/ibmvpcmachine_controller.go b/controllers/ibmvpcmachine_controller.go index 08e4383cf..22fd854b7 100644 --- a/controllers/ibmvpcmachine_controller.go +++ b/controllers/ibmvpcmachine_controller.go @@ -33,9 +33,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" - "sigs.k8s.io/cluster-api/util/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" "sigs.k8s.io/cluster-api-provider-ibmcloud/cloud/scope" @@ -181,10 +181,10 @@ func (r *IBMVPCMachineReconciler) reconcileNormal(machineScope *scope.MachineSco switch machineScope.GetInstanceStatus() { case vpcv1.InstanceStatusPendingConst: machineScope.SetNotReady() - conditions.MarkFalse(machineScope.IBMVPCMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceNotReadyReason, capiv1beta1.ConditionSeverityWarning, "") + conditions.MarkFalse(machineScope.IBMVPCMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceNotReadyReason, clusterv1.ConditionSeverityWarning, "") case vpcv1.InstanceStatusStoppedConst: machineScope.SetNotReady() - conditions.MarkFalse(machineScope.IBMVPCMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceStoppedReason, capiv1beta1.ConditionSeverityError, "") + conditions.MarkFalse(machineScope.IBMVPCMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceStoppedReason, clusterv1.ConditionSeverityError, "") case vpcv1.InstanceStatusFailedConst: msg := "" healthReasonsLen := len(instance.HealthReasons) @@ -196,7 +196,7 @@ func (r *IBMVPCMachineReconciler) reconcileNormal(machineScope *scope.MachineSco machineScope.SetNotReady() machineScope.SetFailureReason(infrav1beta2.UpdateMachineError) machineScope.SetFailureMessage(msg) - conditions.MarkFalse(machineScope.IBMVPCMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceErroredReason, capiv1beta1.ConditionSeverityError, "%s", msg) + conditions.MarkFalse(machineScope.IBMVPCMachine, infrav1beta2.InstanceReadyCondition, infrav1beta2.InstanceErroredReason, clusterv1.ConditionSeverityError, "%s", msg) capibmrecord.Warnf(machineScope.IBMVPCMachine, "FailedBuildInstance", "Failed to build the instance - %s", msg) return ctrl.Result{}, nil case vpcv1.InstanceStatusRunningConst: @@ -235,7 +235,7 @@ func (r *IBMVPCMachineReconciler) reconcileNormal(machineScope *scope.MachineSco } } else { // Otherwise, default to previous Load Balancer Pool Member configuration. - _, ok := machineScope.IBMVPCMachine.Labels[capiv1beta1.MachineControlPlaneNameLabel] + _, ok := machineScope.IBMVPCMachine.Labels[clusterv1.MachineControlPlaneNameLabel] if err = machineScope.SetProviderID(instance.ID); err != nil { return ctrl.Result{}, fmt.Errorf("failed to set provider id IBMVPCMachine %s/%s: %w", machineScope.IBMVPCMachine.Namespace, machineScope.IBMVPCMachine.Name, err) } @@ -269,7 +269,7 @@ func (r *IBMVPCMachineReconciler) getOrCreate(scope *scope.MachineScope) (*vpcv1 func (r *IBMVPCMachineReconciler) reconcileDelete(scope *scope.MachineScope) (_ ctrl.Result, reterr error) { scope.Info("Handling deleted IBMVPCMachine") - if _, ok := scope.IBMVPCMachine.Labels[capiv1beta1.MachineControlPlaneNameLabel]; ok { + if _, ok := scope.IBMVPCMachine.Labels[clusterv1.MachineControlPlaneNameLabel]; ok { if err := scope.DeleteVPCLoadBalancerPoolMember(); err != nil { return ctrl.Result{}, fmt.Errorf("failed to delete loadBalancer pool member: %w", err) } diff --git a/controllers/ibmvpcmachine_controller_test.go b/controllers/ibmvpcmachine_controller_test.go index 48b91c8a9..ed46b8e6a 100644 --- a/controllers/ibmvpcmachine_controller_test.go +++ b/controllers/ibmvpcmachine_controller_test.go @@ -31,7 +31,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -49,9 +49,9 @@ func TestIBMVPCMachineReconciler_Reconcile(t *testing.T) { testCases := []struct { name string vpcMachine *infrav1beta2.IBMVPCMachine - ownerMachine *capiv1beta1.Machine + ownerMachine *clusterv1.Machine vpcCluster *infrav1beta2.IBMVPCCluster - ownerCluster *capiv1beta1.Cluster + ownerCluster *clusterv1.Cluster expectError bool }{ { @@ -77,7 +77,7 @@ func TestIBMVPCMachineReconciler_Reconcile(t *testing.T) { Name: "vpc-test-2", OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Machine", Name: "capi-test-machine", UID: "1", @@ -96,7 +96,7 @@ func TestIBMVPCMachineReconciler_Reconcile(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "vpc-test-3", OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Machine", Name: "capi-test-machine", UID: "1", @@ -107,10 +107,10 @@ func TestIBMVPCMachineReconciler_Reconcile(t *testing.T) { Image: &infrav1beta2.IBMVPCResourceReference{}, }, }, - ownerMachine: &capiv1beta1.Machine{ + ownerMachine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test-machine"}}, - ownerCluster: &capiv1beta1.Cluster{ + ownerCluster: &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test-1"}}, expectError: false, @@ -120,16 +120,16 @@ func TestIBMVPCMachineReconciler_Reconcile(t *testing.T) { vpcMachine: &infrav1beta2.IBMVPCMachine{ ObjectMeta: metav1.ObjectMeta{ Name: "vpc-test-4", Labels: map[string]string{ - capiv1beta1.ClusterNameAnnotation: "capi-test-2"}, + clusterv1.ClusterNameAnnotation: "capi-test-2"}, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Machine", Name: "capi-test-machine", UID: "1", }, { - APIVersion: capiv1beta1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "Cluster", Name: "capi-test-2", UID: "1", @@ -140,13 +140,13 @@ func TestIBMVPCMachineReconciler_Reconcile(t *testing.T) { Image: &infrav1beta2.IBMVPCResourceReference{}, }, }, - ownerMachine: &capiv1beta1.Machine{ + ownerMachine: &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test-machine"}}, - ownerCluster: &capiv1beta1.Cluster{ + ownerCluster: &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: "capi-test-2"}, - Spec: capiv1beta1.ClusterSpec{ + Spec: clusterv1.ClusterSpec{ InfrastructureRef: &corev1.ObjectReference{ Name: "vpc-cluster"}}}, expectError: false, @@ -234,13 +234,13 @@ func TestIBMVPCMachineReconciler_reconcile(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "capi-machine", Labels: map[string]string{ - capiv1beta1.MachineControlPlaneNameLabel: "capi-control-plane-machine", + clusterv1.MachineControlPlaneNameLabel: "capi-control-plane-machine", }, Finalizers: []string{infrav1beta2.MachineFinalizer}, }, }, - Machine: &capiv1beta1.Machine{ - Spec: capiv1beta1.MachineSpec{ + Machine: &clusterv1.Machine{ + Spec: clusterv1.MachineSpec{ ClusterName: "vpc-cluster", }, }, @@ -293,15 +293,15 @@ func TestIBMVPCMachineLBReconciler_reconcile(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "capi-machine", Labels: map[string]string{ - capiv1beta1.MachineControlPlaneNameLabel: "capi-control-plane-machine", + clusterv1.MachineControlPlaneNameLabel: "capi-control-plane-machine", }, Finalizers: []string{infrav1beta2.MachineFinalizer}, }, }, - Machine: &capiv1beta1.Machine{ - Spec: capiv1beta1.MachineSpec{ + Machine: &clusterv1.Machine{ + Spec: clusterv1.MachineSpec{ ClusterName: "vpc-cluster", - Bootstrap: capiv1beta1.Bootstrap{ + Bootstrap: clusterv1.Bootstrap{ DataSecretName: ptr.To("capi-machine"), }, }, @@ -321,7 +321,7 @@ func TestIBMVPCMachineLBReconciler_reconcile(t *testing.T) { }, }, }, - Cluster: &capiv1beta1.Cluster{}, + Cluster: &clusterv1.Cluster{}, IBMVPCClient: mockvpc, GlobalTaggingClient: mockgt, } @@ -644,7 +644,7 @@ func TestIBMVPCMachineLBReconciler_Delete(t *testing.T) { Name: "capi-machine", Finalizers: []string{infrav1beta2.MachineFinalizer}, Labels: map[string]string{ - capiv1beta1.MachineControlPlaneNameLabel: "capi-control-plane-machine", + clusterv1.MachineControlPlaneNameLabel: "capi-control-plane-machine", }, }, Status: infrav1beta2.IBMVPCMachineStatus{ diff --git a/controllers/suite_test.go b/controllers/suite_test.go index e17195184..008db141b 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -30,7 +30,7 @@ import ( infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" "sigs.k8s.io/cluster-api-provider-ibmcloud/internal/webhooks" "sigs.k8s.io/cluster-api-provider-ibmcloud/test/helpers" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( @@ -48,7 +48,7 @@ func TestMain(m *testing.M) { // Setting up the test environment. func setup() { utilruntime.Must(infrav1beta2.AddToScheme(scheme.Scheme)) - utilruntime.Must(capiv1beta1.AddToScheme(scheme.Scheme)) + utilruntime.Must(clusterv1.AddToScheme(scheme.Scheme)) testEnvConfig := helpers.NewTestEnvironmentConfiguration([]string{ path.Join("config", "crd", "bases"), }, diff --git a/go.mod b/go.mod index 346095aa3..d1f355eae 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module sigs.k8s.io/cluster-api-provider-ibmcloud -go 1.23.2 +go 1.24.0 // Keep these modules sync with sigs.k8s.io/cluster-api repository replace ( github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.23.3 github.com/onsi/gomega => github.com/onsi/gomega v1.36.3 - sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.10.2 + sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-alpha.0 ) require ( @@ -32,30 +32,26 @@ require ( golang.org/x/crypto v0.38.0 golang.org/x/net v0.40.0 golang.org/x/text v0.26.0 - k8s.io/api v0.32.3 - k8s.io/apiextensions-apiserver v0.32.3 - k8s.io/apimachinery v0.32.3 + k8s.io/api v0.33.1 + k8s.io/apiextensions-apiserver v0.33.1 + k8s.io/apimachinery v0.33.1 k8s.io/cli-runtime v0.30.3 - k8s.io/client-go v0.32.3 - k8s.io/component-base v0.32.3 + k8s.io/client-go v0.33.1 + k8s.io/component-base v0.33.1 k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 - sigs.k8s.io/cluster-api v1.10.2 - sigs.k8s.io/cluster-api/test v1.10.2 - sigs.k8s.io/controller-runtime v0.20.4 + sigs.k8s.io/cluster-api v1.11.0-alpha.0 + sigs.k8s.io/cluster-api/test v1.11.0-alpha.0 + sigs.k8s.io/controller-runtime v0.21.0 sigs.k8s.io/yaml v1.4.0 ) require ( al.essio.dev/pkg/shellescape v1.5.1 // indirect - cel.dev/expr v0.19.0 // indirect - dario.cat/mergo v1.0.1 // indirect + cel.dev/expr v0.19.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.4.0 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.3.0 // indirect - github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect @@ -72,7 +68,7 @@ require ( github.com/coreos/vcontext v0.0.0-20230201181013-d72178a18687 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v28.0.2+incompatible // indirect + github.com/docker/docker v28.1.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect @@ -101,34 +97,30 @@ require ( github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/gobuffalo/flect v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/cel-go v0.22.0 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/cel-go v0.23.2 // indirect + github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-github/v53 v53.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect - github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect + github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect - github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -142,36 +134,34 @@ require ( github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rivo/uniseg v0.4.2 // indirect github.com/sagikazarmark/locafero v0.7.0 // indirect - github.com/shopspring/decimal v1.4.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.12.0 // indirect github.com/spf13/cast v1.7.1 // indirect - github.com/spf13/viper v1.20.0 // indirect + github.com/spf13/viper v1.20.1 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/valyala/fastjson v1.6.4 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect github.com/x448/float16 v0.8.4 // indirect go.mongodb.org/mongo-driver v1.17.3 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect go.opentelemetry.io/otel/metric v1.34.0 // indirect go.opentelemetry.io/otel/sdk v1.34.0 // indirect go.opentelemetry.io/otel/trace v1.34.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.opentelemetry.io/proto/otlp v1.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/oauth2 v0.28.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.15.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/term v0.32.0 // indirect @@ -185,11 +175,12 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.32.3 // indirect - k8s.io/cluster-bootstrap v0.32.3 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect + k8s.io/apiserver v0.33.1 // indirect + k8s.io/cluster-bootstrap v0.33.1 // indirect + k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/kind v0.27.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect + sigs.k8s.io/kind v0.29.0 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect ) diff --git a/go.sum b/go.sum index f358a8f96..ff6684543 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho= al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= -cel.dev/expr v0.19.0 h1:lXuo+nDhpyJSpWxpPVi5cPUwzKb+dsdOiw6IreM5yt0= -cel.dev/expr v0.19.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= +cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= @@ -81,16 +81,14 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v28.0.2+incompatible h1:9BILleFwug5FSSqWBgVevgL3ewDJfWWWyZVqlDMttE8= -github.com/docker/docker v28.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I= +github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 h1:7QPwrLT79GlD5sizHf27aoY2RTvw62mO6x7mxkScNk0= github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46/go.mod h1:esf2rsHFNlZlxsqsZDojNBcnNs5REqIvRrWRHqX0vEU= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= @@ -159,10 +157,10 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= -github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= +github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -175,24 +173,14 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= -github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+IrK7d0gGgpjGGvd2kz+FzTHVzdqI= -github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= -github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= @@ -209,18 +197,20 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= -github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= @@ -243,6 +233,10 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -283,12 +277,12 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/ppc64le-cloud/powervs-utils v0.0.0-20250403153021-219b161805db h1:Fy2pmDLfLq2H0N77KD2LpNoCWbDGP0BknZU/odPx2+c= github.com/ppc64le-cloud/powervs-utils v0.0.0-20250403153021-219b161805db/go.mod h1:yfr6HHPYyJzVgnivMsobLMbHQqUHrzcIqWM4Nav4kc8= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -304,8 +298,6 @@ github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+D github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= @@ -316,13 +308,15 @@ github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.20.0 h1:zrxIyR3RQIOsarIrgL8+sAvALXul9jeEPa06Y0Ph6vY= -github.com/spf13/viper v1.20.0/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= +github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= +github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -332,48 +326,24 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= -github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= -github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= -github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk= -github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= -go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= -go.etcd.io/etcd/api/v3 v3.5.20 h1:aKfz3nPZECWoZJXMSH9y6h2adXjtOHaHTGEVCuCmaz0= -go.etcd.io/etcd/api/v3 v3.5.20/go.mod h1:QqKGViq4KTgOG43dr/uH0vmGWIaoJY3ggFi6ZH0TH/U= -go.etcd.io/etcd/client/pkg/v3 v3.5.20 h1:sZIAtra+xCo56gdf6BR62to/hiie5Bwl7hQIqMzVTEM= -go.etcd.io/etcd/client/pkg/v3 v3.5.20/go.mod h1:qaOi1k4ZA9lVLejXNvyPABrVEe7VymMF2433yyRQ7O0= -go.etcd.io/etcd/client/v2 v2.305.16 h1:kQrn9o5czVNaukf2A2At43cE9ZtWauOtf9vRZuiKXow= -go.etcd.io/etcd/client/v2 v2.305.16/go.mod h1:h9YxWCzcdvZENbfzBTFCnoNumr2ax3F19sKMqHFmXHE= -go.etcd.io/etcd/client/v3 v3.5.20 h1:jMT2MwQEhyvhQg49Cec+1ZHJzfUf6ZgcmV0GjPv0tIQ= -go.etcd.io/etcd/client/v3 v3.5.20/go.mod h1:J5lbzYRMUR20YolS5UjlqqMcu3/wdEvG5VNBhzyo3m0= -go.etcd.io/etcd/pkg/v3 v3.5.16 h1:cnavs5WSPWeK4TYwPYfmcr3Joz9BH+TZ6qoUtz6/+mc= -go.etcd.io/etcd/pkg/v3 v3.5.16/go.mod h1:+lutCZHG5MBBFI/U4eYT5yL7sJfnexsoM20Y0t2uNuY= -go.etcd.io/etcd/raft/v3 v3.5.16 h1:zBXA3ZUpYs1AwiLGPafYAKKl/CORn/uaxYDwlNwndAk= -go.etcd.io/etcd/raft/v3 v3.5.16/go.mod h1:P4UP14AxofMJ/54boWilabqqWoW9eLodl6I5GdGzazI= -go.etcd.io/etcd/server/v3 v3.5.16 h1:d0/SAdJ3vVsZvF8IFVb1k8zqMZ+heGcNfft71ul9GWE= -go.etcd.io/etcd/server/v3 v3.5.16/go.mod h1:ynhyZZpdDp1Gq49jkUg5mfkDWZwXnn3eIqCqtJnrD/s= go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeHxQ= go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 h1:rgMkmiGfix9vFJDcDi1PK8WEQP4FLQwLDfhp5ZLpFeE= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I= go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= @@ -384,8 +354,8 @@ go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiy go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= +go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= @@ -411,8 +381,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= -golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= -golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -452,8 +422,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= google.golang.org/genproto/googleapis/rpc v0.0.0-20250227231956-55c901821b1e h1:YA5lmSs3zc/5w+xsRcHqpETkaYyK63ivEPzNTcUUlSA= @@ -469,8 +437,6 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -481,41 +447,44 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= -k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= -k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY= -k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss= -k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= -k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/apiserver v0.32.3 h1:kOw2KBuHOA+wetX1MkmrxgBr648ksz653j26ESuWNY8= -k8s.io/apiserver v0.32.3/go.mod h1:q1x9B8E/WzShF49wh3ADOh6muSfpmFL0I2t+TG0Zdgc= +k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw= +k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw= +k8s.io/apiextensions-apiserver v0.33.1 h1:N7ccbSlRN6I2QBcXevB73PixX2dQNIW0ZRuguEE91zI= +k8s.io/apiextensions-apiserver v0.33.1/go.mod h1:uNQ52z1A1Gu75QSa+pFK5bcXc4hq7lpOXbweZgi4dqA= +k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4= +k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= +k8s.io/apiserver v0.33.1 h1:yLgLUPDVC6tHbNcw5uE9mo1T6ELhJj7B0geifra3Qdo= +k8s.io/apiserver v0.33.1/go.mod h1:VMbE4ArWYLO01omz+k8hFjAdYfc3GVAYPrhP2tTKccs= k8s.io/cli-runtime v0.30.3 h1:aG69oRzJuP2Q4o8dm+f5WJIX4ZBEwrvdID0+MXyUY6k= k8s.io/cli-runtime v0.30.3/go.mod h1:hwrrRdd9P84CXSKzhHxrOivAR9BRnkMt0OeP5mj7X30= -k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= -k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= -k8s.io/cluster-bootstrap v0.32.3 h1:AqIpsUhB6MUeaAsl1WvaUw54AHRd2hfZrESlKChtd8s= -k8s.io/cluster-bootstrap v0.32.3/go.mod h1:CHbBwgOb6liDV6JFUTkx5t85T2xidy0sChBDoyYw344= -k8s.io/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k= -k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI= +k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4= +k8s.io/client-go v0.33.1/go.mod h1:JAsUrl1ArO7uRVFWfcj6kOomSlCv+JpvIsp6usAGefA= +k8s.io/cluster-bootstrap v0.33.1 h1:esGY+qXFJ78myppBzMVqqj37ReGLOJpQNslRiqmQGes= +k8s.io/cluster-bootstrap v0.33.1/go.mod h1:YA4FsgPShsVoP84DkBJEkCKDgsH4PpgTa0NzNBf6y4I= +k8s.io/component-base v0.33.1 h1:EoJ0xA+wr77T+G8p6T3l4efT2oNwbqBVKR71E0tBIaI= +k8s.io/component-base v0.33.1/go.mod h1:guT/w/6piyPfTgq7gfvgetyXMIh10zuXA6cRRm3rDuY= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 h1:CPT0ExVicCzcpeN4baWEV2ko2Z/AsiZgEdwgcfwLgMo= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/cluster-api v1.10.2 h1:xfvtNu4Fy/41grL0ryH5xSKQjpJEWdO8HiV2lPCCozQ= -sigs.k8s.io/cluster-api v1.10.2/go.mod h1:/b9Un5Imprib6S7ZOcJitC2ep/5wN72b0pXpMQFfbTw= -sigs.k8s.io/cluster-api/test v1.10.2 h1:y6vSdS9FSAi/DNoFE2fZo2fed0m1cgW+ueBazk1g4i8= -sigs.k8s.io/cluster-api/test v1.10.2/go.mod h1:KLeRjNtQS8k5jIPvQF0QxOti/ATu5euwSusb6iFBga8= -sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU= -sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/cluster-api v1.11.0-alpha.0 h1:QyU9uGq2fAee+LC+/q3Q5QxCLnAUzMFYzIiIAM/sCfU= +sigs.k8s.io/cluster-api v1.11.0-alpha.0/go.mod h1:UmipfrOBTqjRNX7X4zuJCInq28/Fh6xq9RklOJ/DMR4= +sigs.k8s.io/cluster-api/test v1.11.0-alpha.0 h1:0On2A+zHyxhVQLN3Wq4mrmElDB7KZiKy5onHbpZUr+M= +sigs.k8s.io/cluster-api/test v1.11.0-alpha.0/go.mod h1:jXu1hsMVlAHHBtKbRwxtBEkUR0q+f5/eiSNOXYHR1Lk= +sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8= +sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/kind v0.27.0 h1:PQ3f0iAWNIj66LYkZ1ivhEg/+Zb6UPMbO+qVei/INZA= -sigs.k8s.io/kind v0.27.0/go.mod h1:RZVFmy6qcwlSWwp6xeIUv7kXCPF3i8MXsEXxW/J+gJY= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= +sigs.k8s.io/kind v0.29.0 h1:3TpCsyh908IkXXpcSnsMjWdwdWjIl7o9IMZImZCWFnI= +sigs.k8s.io/kind v0.29.0/go.mod h1:ldWQisw2NYyM6k64o/tkZng/1qQW7OlzcN5a8geJX3o= +sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/hack/tools/go.mod b/hack/tools/go.mod index bb3a58d45..e1646b9bf 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -1,19 +1,19 @@ module sigs.k8s.io/cluster-api-provider-ibmcloud/hack/tools -go 1.23.0 +go 1.24.0 -replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.10.2 +replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.11.0-alpha.0 require ( github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 github.com/golangci/golangci-lint v1.64.8 github.com/itchyny/gojq v0.12.17 github.com/joelanford/go-apidiff v0.8.3 - github.com/onsi/ginkgo/v2 v2.23.3 + github.com/onsi/ginkgo/v2 v2.23.4 go.uber.org/mock v0.5.2 golang.org/x/vuln v1.1.4 gotest.tools/gotestsum v1.12.2 - k8s.io/code-generator v0.32.3 + k8s.io/code-generator v0.33.1 k8s.io/release v0.16.9 sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250520093716-525566440a77 sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20241202165100-3e6681045387 @@ -206,7 +206,6 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.2 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect github.com/golangci/go-printf-func-name v0.1.0 // indirect @@ -217,15 +216,14 @@ require ( github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect github.com/gomarkdown/markdown v0.0.0-20240328165702-4d01890c35c0 // indirect github.com/google/certificate-transparency-go v1.1.8 // indirect - github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect + github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-containerregistry v0.20.2 // indirect github.com/google/go-github/v55 v55.0.0 // indirect github.com/google/go-github/v58 v58.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect github.com/google/licenseclassifier/v2 v2.0.0 // indirect - github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect + github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect @@ -260,7 +258,7 @@ require ( github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kisielk/errcheck v1.9.0 // indirect github.com/kkHAIKE/contextcheck v1.1.6 // indirect - github.com/klauspost/compress v1.17.11 // indirect + github.com/klauspost/compress v1.18.0 // indirect github.com/knqyf263/go-rpmdb v0.1.1 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect @@ -314,9 +312,9 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.7.1 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect - github.com/prometheus/client_golang v1.20.5 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf // indirect github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect @@ -361,7 +359,7 @@ require ( github.com/spf13/cast v1.7.1 // indirect github.com/spf13/cobra v1.9.1 // indirect github.com/spf13/pflag v1.0.6 // indirect - github.com/spf13/viper v1.20.0 // indirect + github.com/spf13/viper v1.20.1 // indirect github.com/spiffe/go-spiffe/v2 v2.2.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect @@ -409,8 +407,6 @@ require ( go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect go.opentelemetry.io/otel/metric v1.34.0 // indirect go.opentelemetry.io/otel/sdk v1.34.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect @@ -424,7 +420,7 @@ require ( golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect golang.org/x/mod v0.24.0 // indirect golang.org/x/net v0.40.0 // indirect - golang.org/x/oauth2 v0.28.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.14.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7 // indirect @@ -448,13 +444,13 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.6.1 // indirect - k8s.io/api v0.32.3 // indirect - k8s.io/apiextensions-apiserver v0.32.3 // indirect - k8s.io/apimachinery v0.32.3 // indirect - k8s.io/client-go v0.32.3 // indirect - k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect + k8s.io/api v0.33.1 // indirect + k8s.io/apiextensions-apiserver v0.33.1 // indirect + k8s.io/apimachinery v0.33.1 // indirect + k8s.io/client-go v0.33.1 // indirect + k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect modernc.org/libc v1.55.3 // indirect modernc.org/mathutil v1.6.0 // indirect @@ -471,8 +467,9 @@ require ( sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect sigs.k8s.io/mdtoc v1.3.0 // indirect sigs.k8s.io/promo-tools/v3 v3.6.0 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/release-sdk v0.11.0 // indirect sigs.k8s.io/release-utils v0.8.1 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/hack/tools/go.sum b/hack/tools/go.sum index 89806e3fe..bdc27b3e5 100644 --- a/hack/tools/go.sum +++ b/hack/tools/go.sum @@ -551,8 +551,8 @@ github.com/google/certificate-transparency-go v1.1.8 h1:LGYKkgZF7satzgTak9R4yzfJ github.com/google/certificate-transparency-go v1.1.8/go.mod h1:bV/o8r0TBKRf1X//iiiSgWrvII4d7/8OiA+3vG26gI8= github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= -github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786 h1:rcv+Ippz6RAtvaGgKxc+8FQIpxHgsF+HBzPyYL2cyVU= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786/go.mod h1:apVn/GCasLZUVpAJ6oWAuyP7Ne7CEsQbTnc0plM3m+o= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -585,8 +585,8 @@ github.com/google/licenseclassifier/v2 v2.0.0/go.mod h1:cOjbdH0kyC9R22sdQbYsFkto github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= @@ -624,8 +624,8 @@ github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8= github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= @@ -709,8 +709,8 @@ github.com/kisielk/errcheck v1.9.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/ttjfJCE= github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= -github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= -github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/knqyf263/go-rpmdb v0.1.1 h1:oh68mTCvp1XzxdU7EfafcWzzfstUZAEa3MW0IJye584= github.com/knqyf263/go-rpmdb v0.1.1/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -822,14 +822,14 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.23.3 h1:edHxnszytJ4lD9D5Jjc4tiDkPBZ3siDeJJkUZJJVkp0= -github.com/onsi/ginkgo/v2 v2.23.3/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU= -github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= +github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= +github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/open-policy-agent/opa v0.70.0 h1:B3cqCN2iQAyKxK6+GI+N40uqkin+wzIrM7YA60t9x1U= github.com/open-policy-agent/opa v0.70.0/go.mod h1:Y/nm5NY0BX0BqjBriKUiV81sCl8XOjjvqQG7dXrggtI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -870,13 +870,13 @@ github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= -github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf h1:014O62zIzQwvoD7Ekj3ePDF5bv9Xxy0w6AZk0qYbjUk= @@ -991,8 +991,8 @@ github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wx github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.20.0 h1:zrxIyR3RQIOsarIrgL8+sAvALXul9jeEPa06Y0Ph6vY= -github.com/spf13/viper v1.20.0/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= +github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= +github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/spiffe/go-spiffe/v2 v2.2.0 h1:9Vf06UsvsDbLYK/zJ4sYsIsHmMFknUD+feA7IYoWMQY= github.com/spiffe/go-spiffe/v2 v2.2.0/go.mod h1:Urzb779b3+IwDJD2ZbN8fVl3Aa8G4N/PiUe6iXC0XxU= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= @@ -1135,10 +1135,10 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSG go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I= go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= @@ -1149,8 +1149,8 @@ go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= +go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= go.step.sm/crypto v0.44.2 h1:t3p3uQ7raP2jp2ha9P6xkQF85TJZh+87xmjSLaib+jk= go.step.sm/crypto v0.44.2/go.mod h1:x1439EnFhadzhkuaGX7sz03LEMQ+jV4gRamf5LCZJQQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= @@ -1235,8 +1235,8 @@ golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= -golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1426,22 +1426,22 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= -k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= -k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= -k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY= -k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss= -k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= -k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= -k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= -k8s.io/code-generator v0.32.3 h1:31p2TVzC9+hVdSkAFruAk3JY+iSfzrJ83Qij1yZutyw= -k8s.io/code-generator v0.32.3/go.mod h1:+mbiYID5NLsBuqxjQTygKM/DAdKpAjvBzrJd64NU1G8= -k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= -k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw= +k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw= +k8s.io/apiextensions-apiserver v0.33.1 h1:N7ccbSlRN6I2QBcXevB73PixX2dQNIW0ZRuguEE91zI= +k8s.io/apiextensions-apiserver v0.33.1/go.mod h1:uNQ52z1A1Gu75QSa+pFK5bcXc4hq7lpOXbweZgi4dqA= +k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4= +k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= +k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4= +k8s.io/client-go v0.33.1/go.mod h1:JAsUrl1ArO7uRVFWfcj6kOomSlCv+JpvIsp6usAGefA= +k8s.io/code-generator v0.33.1 h1:ZLzIRdMsh3Myfnx9BaooX6iQry29UJjVfVG+BuS+UMw= +k8s.io/code-generator v0.33.1/go.mod h1:HUKT7Ubp6bOgIbbaPIs9lpd2Q02uqkMCMx9/GjDrWpY= +k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 h1:2OX19X59HxDprNCVrWi6jb7LW1PoqTlYqEq5H2oetog= +k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= k8s.io/release v0.16.9 h1:CDqFlNmckqtXEn+YPVbDoUbnmqf1Y2R9BkHBC2vgMGo= k8s.io/release v0.16.9/go.mod h1:iRTTQYssZDVke2X7bqhdbi3cPjdmRqZXpIJsp2IRDyM= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= @@ -1476,8 +1476,8 @@ mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8 mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= sigs.k8s.io/bom v0.6.0 h1:IPMPHx6XdmMeW2oEeF66DgNyP5d4RxfuXwiC1qn+n9o= sigs.k8s.io/bom v0.6.0/go.mod h1:MV0D3vdGlkaPgi5EwpwMBeQ8n8QS8Q2u1lJ5LyE7RLM= -sigs.k8s.io/cluster-api v1.10.2 h1:xfvtNu4Fy/41grL0ryH5xSKQjpJEWdO8HiV2lPCCozQ= -sigs.k8s.io/cluster-api v1.10.2/go.mod h1:/b9Un5Imprib6S7ZOcJitC2ep/5wN72b0pXpMQFfbTw= +sigs.k8s.io/cluster-api v1.11.0-alpha.0 h1:QyU9uGq2fAee+LC+/q3Q5QxCLnAUzMFYzIiIAM/sCfU= +sigs.k8s.io/cluster-api v1.11.0-alpha.0/go.mod h1:UmipfrOBTqjRNX7X4zuJCInq28/Fh6xq9RklOJ/DMR4= sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250520093716-525566440a77 h1:k1VO2XTDS8yl8e7FlJimeSxpe4cKD8u5IiNKD3J4enY= sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250520093716-525566440a77/go.mod h1:1G//nbOZnW+4mWs6WWMjEP6f+sFi/KuhtD7JWDuqnjE= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20241202165100-3e6681045387 h1:WVCytp5VYi3EbLI/tKmjQ3zgEWdQrMAARVUtmqAmf48= @@ -1500,12 +1500,15 @@ sigs.k8s.io/mdtoc v1.3.0 h1:iMJLfMax45vMl3rnwLjEhZ38TS6JqLXSpm0uDNo/zyo= sigs.k8s.io/mdtoc v1.3.0/go.mod h1:8zLWymqzP8oKMm+1m1e5GKnGZq8gbC1MreKfmRelMQA= sigs.k8s.io/promo-tools/v3 v3.6.0 h1:C2L08ezrWm1aZI8Emd3iZPZQserLPRgzuqQVxvI0PUI= sigs.k8s.io/promo-tools/v3 v3.6.0/go.mod h1:XJ3jy0hJYs+hWKt8XsLHFzGQV8PUtvllvbxjN/E5RXI= +sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/release-sdk v0.11.0 h1:a+zjOO3tHm1NiVZgNcUWq5QrKmv7b63UZXw+XGdPGfk= sigs.k8s.io/release-sdk v0.11.0/go.mod h1:sjbFpskyVjCXcFBnI3Bj1iGQHGjDYPoHVyld/pT+TvU= sigs.k8s.io/release-utils v0.8.1 h1:qSA9p3vZzO6RAq7zvzupCZjR29+n3NK9DSJPe9bSf7w= sigs.k8s.io/release-utils v0.8.1/go.mod h1:vrQ3eR1VmudgX4OUwr4pUZEkYLRms9bdbv06mr3kchQ= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= diff --git a/main.go b/main.go index 20c82bde0..63ecad1f0 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/flags" infrav1beta1 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta1" @@ -78,7 +78,7 @@ func init() { _ = infrav1beta1.AddToScheme(scheme) _ = infrav1beta2.AddToScheme(scheme) - _ = capiv1beta1.AddToScheme(scheme) + _ = clusterv1.AddToScheme(scheme) // +kubebuilder:scaffold:scheme } @@ -135,7 +135,7 @@ func initFlags(fs *pflag.FlagSet) { "The webhook certificate directory, where the server should find the TLS certificate and key.") fs.StringVar(&watchFilterValue, "watch-filter", "", - fmt.Sprintf("Label value that the controller watches to reconcile cluster-api objects. Label key is always %s. If unspecified, the controller watches for all cluster-api objects.", capiv1beta1.WatchLabel)) + fmt.Sprintf("Label value that the controller watches to reconcile cluster-api objects. Label key is always %s. If unspecified, the controller watches for all cluster-api objects.", clusterv1.WatchLabel)) fs.BoolVar(&disableHTTP2, "disable-http2", true, "http/2 should be disabled due to its vulnerabilities. More specifically, disabling http/2 will"+ " prevent from being vulnerable to the HTTP/2 Stream Cancellation and Rapid Reset CVEs.") diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 07135217d..97adde140 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" capi_e2e "sigs.k8s.io/cluster-api/test/e2e" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" @@ -171,7 +171,7 @@ type cleanupInput struct { ArtifactFolder string Namespace *corev1.Namespace CancelWatches context.CancelFunc - Cluster *capiv1beta1.Cluster + Cluster *clusterv1.Cluster IntervalsGetter func(spec, key string) []interface{} SkipCleanup bool AdditionalCleanup func() diff --git a/test/helpers/crd.go b/test/helpers/crd.go index 77abe9e61..569d2c4a1 100644 --- a/test/helpers/crd.go +++ b/test/helpers/crd.go @@ -27,7 +27,7 @@ import ( const ( clusterAPIGroup = "cluster.x-k8s.io" - clusterAPITestVersion = "v1beta1" + clusterAPITestVersion = "v1beta2" ) var ( diff --git a/test/helpers/envtest.go b/test/helpers/envtest.go index 7b99b7f47..de80d521a 100644 --- a/test/helpers/envtest.go +++ b/test/helpers/envtest.go @@ -46,7 +46,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" - capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" utilyaml "sigs.k8s.io/cluster-api/util/yaml" ) @@ -69,7 +69,7 @@ func init() { utilruntime.Must(apiextensionsv1.AddToScheme(scheme.Scheme)) utilruntime.Must(admissionv1.AddToScheme(scheme.Scheme)) - utilruntime.Must(capiv1beta1.AddToScheme(scheme.Scheme)) + utilruntime.Must(clusterv1.AddToScheme(scheme.Scheme)) // Get the root of the current file to use in CRD paths. _, filename, _, _ := goruntime.Caller(0) //nolint:dogsled From eed07f445084b2d214eb0fdceeaedc4ab3d57cc3 Mon Sep 17 00:00:00 2001 From: Karthik Bhat Date: Wed, 11 Jun 2025 19:01:46 +0530 Subject: [PATCH 2/3] Update templates to use v1beta2 version --- ...e.cluster.x-k8s.io_ibmpowervsclusters.yaml | 2 +- ...r.x-k8s.io_ibmpowervsclustertemplates.yaml | 2 +- ...ure.cluster.x-k8s.io_ibmpowervsimages.yaml | 2 +- ...e.cluster.x-k8s.io_ibmpowervsmachines.yaml | 2 +- ...r.x-k8s.io_ibmpowervsmachinetemplates.yaml | 2 +- ...cture.cluster.x-k8s.io_ibmvpcclusters.yaml | 2 +- ...uster.x-k8s.io_ibmvpcclustertemplates.yaml | 2 +- ...cture.cluster.x-k8s.io_ibmvpcmachines.yaml | 2 +- ...uster.x-k8s.io_ibmvpcmachinetemplates.yaml | 2 +- hack/tools/go.mod | 56 ++++---- hack/tools/go.sum | 128 +++++++++--------- templates/addons/crs-powervs.yaml | 2 +- templates/addons/crs.yaml | 2 +- templates/bases/powervs/cluster.yaml | 4 +- templates/bases/powervs/kcp.yaml | 18 ++- templates/bases/powervs/kubeadm-config.yaml | 8 +- templates/bases/powervs/md.yaml | 4 +- templates/bases/vpc/cluster.yaml | 4 +- templates/bases/vpc/kcp.yaml | 18 ++- templates/bases/vpc/kubeadm-config.yaml | 8 +- templates/bases/vpc/md.yaml | 2 +- ...cluster-template-powervs-clusterclass.yaml | 3 +- .../cluster-with-kcp.yaml | 1 - ...cluster-template-powervs-create-infra.yaml | 42 +++--- templates/cluster-template-powervs.yaml | 40 +++--- .../cluster-template-powervs/cluster.yaml | 2 +- templates/cluster-template-powervs/kcp.yaml | 8 +- .../kubeadm-config.yaml | 2 +- .../cluster-template-vpc-clusterclass.yaml | 2 +- templates/cluster-template.yaml | 37 +++-- templates/cluster-template/cluster.yaml | 2 +- templates/cluster-template/kcp.yaml | 8 +- 32 files changed, 228 insertions(+), 191 deletions(-) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml index 3161cf001..75bbc0601 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmpowervsclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml index 0a5b74c5c..3faafe1be 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmpowervsclustertemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsimages.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsimages.yaml index 1e2841cd2..f5a39601e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsimages.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsimages.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmpowervsimages.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachines.yaml index 530672281..844ee8b47 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachines.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmpowervsmachines.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachinetemplates.yaml index 3fb209320..fbdc36427 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmpowervsmachinetemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmpowervsmachinetemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml index 3c7126e8f..cd18f466e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmvpcclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml index 6b6af9c48..7aee807bb 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmvpcclustertemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachines.yaml index 14375be72..50e8ebdb5 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachines.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmvpcmachines.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachinetemplates.yaml index 0a9b9e393..2663fc4d5 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ibmvpcmachinetemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ibmvpcmachinetemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/hack/tools/go.mod b/hack/tools/go.mod index e1646b9bf..0922eb2ac 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -15,23 +15,23 @@ require ( gotest.tools/gotestsum v1.12.2 k8s.io/code-generator v0.33.1 k8s.io/release v0.16.9 - sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250520093716-525566440a77 + sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250527155816-5eee55a4d0dd sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20241202165100-3e6681045387 - sigs.k8s.io/controller-tools v0.17.0 + sigs.k8s.io/controller-tools v0.18.0 sigs.k8s.io/kustomize/kustomize/v5 v5.5.0 ) require ( 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect 4d63.com/gochecknoglobals v0.2.2 // indirect - cel.dev/expr v0.19.2 // indirect - cloud.google.com/go v0.118.3 // indirect - cloud.google.com/go/auth v0.15.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect - cloud.google.com/go/compute/metadata v0.6.0 // indirect - cloud.google.com/go/iam v1.4.1 // indirect - cloud.google.com/go/monitoring v1.24.0 // indirect - cloud.google.com/go/storage v1.51.0 // indirect + cel.dev/expr v0.20.0 // indirect + cloud.google.com/go v0.121.0 // indirect + cloud.google.com/go/auth v0.16.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute/metadata v0.7.0 // indirect + cloud.google.com/go/iam v1.5.2 // indirect + cloud.google.com/go/monitoring v1.24.2 // indirect + cloud.google.com/go/storage v1.54.0 // indirect cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e // indirect cuelang.org/go v0.8.1 // indirect dario.cat/mergo v1.0.2 // indirect @@ -57,7 +57,7 @@ require ( github.com/Crocmagnon/fatcontext v0.7.1 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 // indirect github.com/MakeNowJust/heredoc/v2 v2.0.1 // indirect @@ -228,7 +228,7 @@ require ( github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect - github.com/googleapis/gax-go/v2 v2.14.1 // indirect + github.com/googleapis/gax-go/v2 v2.14.2 // indirect github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -360,7 +360,7 @@ require ( github.com/spf13/cobra v1.9.1 // indirect github.com/spf13/pflag v1.0.6 // indirect github.com/spf13/viper v1.20.1 // indirect - github.com/spiffe/go-spiffe/v2 v2.2.0 // indirect + github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect github.com/stretchr/objx v0.5.2 // indirect @@ -396,21 +396,21 @@ require ( github.com/yeya24/promlinter v0.3.0 // indirect github.com/ykadowak/zerologlint v0.1.5 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - github.com/zeebo/errs v1.3.0 // indirect + github.com/zeebo/errs v1.4.0 // indirect gitlab.alpinelinux.org/alpine/go v0.8.0 // indirect gitlab.com/bosi/decorder v0.4.2 // indirect go-simpler.org/musttag v0.13.0 // indirect go-simpler.org/sloglint v0.9.0 // indirect go.mongodb.org/mongo-driver v1.14.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect - go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/metric v1.34.0 // indirect - go.opentelemetry.io/otel/sdk v1.34.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect - go.opentelemetry.io/otel/trace v1.34.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.35.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect go.step.sm/crypto v0.44.2 // indirect go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect @@ -430,12 +430,12 @@ require ( golang.org/x/tools v0.33.0 // indirect golang.org/x/tools/go/vcs v0.1.0-deprecated // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/api v0.227.0 // indirect - google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect - google.golang.org/grpc v1.71.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect + google.golang.org/api v0.234.0 // indirect + google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250512202823-5a2f75b736a9 // indirect + google.golang.org/grpc v1.72.2 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/hack/tools/go.sum b/hack/tools/go.sum index bdc27b3e5..12a83ee46 100644 --- a/hack/tools/go.sum +++ b/hack/tools/go.sum @@ -2,31 +2,31 @@ 4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= 4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= 4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= -cel.dev/expr v0.19.2 h1:V354PbqIXr9IQdwy4SYA4xa0HXaWq1BUPAGzugBY5V4= -cel.dev/expr v0.19.2/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.20.0 h1:OunBvVCfvpWlt4dN7zg3FM6TDkzOePe1+foGJ9AXeeI= +cel.dev/expr v0.20.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.118.3 h1:jsypSnrE/w4mJysioGdMBg4MiW/hHx/sArFpaBWHdME= -cloud.google.com/go v0.118.3/go.mod h1:Lhs3YLnBlwJ4KA6nuObNMZ/fCbOQBPuWKPoE0Wa/9Vc= -cloud.google.com/go/auth v0.15.0 h1:Ly0u4aA5vG/fsSsxu98qCQBemXtAtJf+95z9HK+cxps= -cloud.google.com/go/auth v0.15.0/go.mod h1:WJDGqZ1o9E9wKIL+IwStfyn/+s59zl4Bi+1KQNVXLZ8= -cloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74z6cBk9Rw6M= -cloud.google.com/go/auth/oauth2adapt v0.2.7/go.mod h1:NTbTTzfvPl1Y3V1nPpOgl2w6d/FjO7NNUQaWSox6ZMc= -cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= -cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= -cloud.google.com/go/iam v1.4.1 h1:cFC25Nv+u5BkTR/BT1tXdoF2daiVbZ1RLx2eqfQ9RMM= -cloud.google.com/go/iam v1.4.1/go.mod h1:2vUEJpUG3Q9p2UdsyksaKpDzlwOrnMzS30isdReIcLM= -cloud.google.com/go/kms v1.21.0 h1:x3EeWKuYwdlo2HLse/876ZrKjk2L5r7Uexfm8+p6mSI= -cloud.google.com/go/kms v1.21.0/go.mod h1:zoFXMhVVK7lQ3JC9xmhHMoQhnjEDZFoLAr5YMwzBLtk= +cloud.google.com/go v0.121.0 h1:pgfwva8nGw7vivjZiRfrmglGWiCJBP+0OmDpenG/Fwg= +cloud.google.com/go v0.121.0/go.mod h1:rS7Kytwheu/y9buoDmu5EIpMMCI4Mb8ND4aeN4Vwj7Q= +cloud.google.com/go/auth v0.16.1 h1:XrXauHMd30LhQYVRHLGvJiYeczweKQXZxsTbV9TiguU= +cloud.google.com/go/auth v0.16.1/go.mod h1:1howDHJ5IETh/LwYs3ZxvlkXF48aSqqJUM+5o02dNOI= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= +cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= +cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= +cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= +cloud.google.com/go/kms v1.21.2 h1:c/PRUSMNQ8zXrc1sdAUnsenWWaNXN+PzTXfXOcSFdoE= +cloud.google.com/go/kms v1.21.2/go.mod h1:8wkMtHV/9Z8mLXEXr1GK7xPSBdi6knuLXIhqjuWcI6w= cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc= cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhXT62TuXALA= -cloud.google.com/go/longrunning v0.6.5 h1:sD+t8DO8j4HKW4QfouCklg7ZC1qC4uzVZt8iz3uTW+Q= -cloud.google.com/go/longrunning v0.6.5/go.mod h1:Et04XK+0TTLKa5IPYryKf5DkpwImy6TluQ1QTLwlKmY= -cloud.google.com/go/monitoring v1.24.0 h1:csSKiCJ+WVRgNkRzzz3BPoGjFhjPY23ZTcaenToJxMM= -cloud.google.com/go/monitoring v1.24.0/go.mod h1:Bd1PRK5bmQBQNnuGwHBfUamAV1ys9049oEPHnn4pcsc= -cloud.google.com/go/storage v1.51.0 h1:ZVZ11zCiD7b3k+cH5lQs/qcNaoSz3U9I0jgwVzqDlCw= -cloud.google.com/go/storage v1.51.0/go.mod h1:YEJfu/Ki3i5oHC/7jyTgsGZwdQ8P9hqMqvpi5kRKGgc= -cloud.google.com/go/trace v1.11.3 h1:c+I4YFjxRQjvAhRmSsmjpASUKq88chOX854ied0K/pE= -cloud.google.com/go/trace v1.11.3/go.mod h1:pt7zCYiDSQjC9Y2oqCsh9jF4GStB/hmjrYLsxRR27q8= +cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= +cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= +cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM= +cloud.google.com/go/monitoring v1.24.2/go.mod h1:x7yzPWcgDRnPEv3sI+jJGBkwl5qINf+6qY4eq0I9B4U= +cloud.google.com/go/storage v1.54.0 h1:Du3XEyliAiftfyW0bwfdppm2MMLdpVAfiIg4T2nAI+0= +cloud.google.com/go/storage v1.54.0/go.mod h1:hIi9Boe8cHxTyaeqh7KMMwKg088VblFK46C2x/BWaZE= +cloud.google.com/go/trace v1.11.6 h1:2O2zjPzqPYAHrn3OKl029qlqG6W8ZdYaOWRyr8NgMT4= +cloud.google.com/go/trace v1.11.6/go.mod h1:GA855OeDEBiBMzcckLPE2kDunIpC72N+Pq8WFieFjnI= cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e h1:GwCVItFUPxwdsEYnlUcJ6PJxOjTeFFCKOh6QWg4oAzQ= cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e/go.mod h1:ApHceQLLwcOkCEXM1+DyCXTHEJhNGDpJ2kmV6axsx24= cuelang.org/go v0.8.1 h1:VFYsxIFSPY5KgSaH1jQ2GxHOrbu6Ga3kEI70yCZwnOg= @@ -95,8 +95,8 @@ github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rW github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 h1:Sz1JIXEcSfhz7fUi7xHnhpIE0thVASYjvosApmHuD2k= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1/go.mod h1:n/LSCXNuIYqVfBlVXyHfMQkZDdp1/mmxfSjADd3z1Zg= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 h1:fYE9p3esPxA/C0rQ0AHhP0drtPXDRhaWiwg1DPqO7IU= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0/go.mod h1:BnBReJLvVYx2CS/UHOgVz2BXKXD9wsQPxZug20nZhd0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.51.0 h1:OqVGm6Ei3x5+yZmSJG1Mh2NwHvpVmZ08CB5qJhT9Nuk= @@ -602,8 +602,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= -github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q= -github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= +github.com/googleapis/gax-go/v2 v2.14.2 h1:eBLnkZ9635krYIPD+ag1USrOAI0Nr0QYF3+/3GqO0k0= +github.com/googleapis/gax-go/v2 v2.14.2/go.mod h1:ON64QhlJkhVtSqp4v1uaK92VyZ2gmvDQsweuyLV+8+w= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= @@ -993,8 +993,8 @@ github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= -github.com/spiffe/go-spiffe/v2 v2.2.0 h1:9Vf06UsvsDbLYK/zJ4sYsIsHmMFknUD+feA7IYoWMQY= -github.com/spiffe/go-spiffe/v2 v2.2.0/go.mod h1:Urzb779b3+IwDJD2ZbN8fVl3Aa8G4N/PiUe6iXC0XxU= +github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= +github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.2.0 h1:i8pxvGrt1+4G0czLr/WnmyH7zbZ8Bg8etvARQ1rpyl4= @@ -1109,8 +1109,8 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97yms= github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= -github.com/zeebo/errs v1.3.0 h1:hmiaKqgYZzcVgRL1Vkc1Mn2914BbzB0IBxs+ebeutGs= -github.com/zeebo/errs v1.3.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= +github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= +github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= gitlab.alpinelinux.org/alpine/go v0.8.0 h1:faYglciTTi2FWF/KKLiBoT3AdvHwcyhJtASD8yzahqQ= gitlab.alpinelinux.org/alpine/go v0.8.0/go.mod h1:T/T1d7CqnA79HrEP/nMTbn/iMO/yanIQ3iF8A5Uz4Ks= gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= @@ -1127,28 +1127,28 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/detectors/gcp v1.34.0 h1:JRxssobiPg23otYU5SbWtQC//snGVIM3Tx6QRzlQBao= -go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQmF0PRsq8w/lMGzdbCSveBHo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 h1:rgMkmiGfix9vFJDcDi1PK8WEQP4FLQwLDfhp5ZLpFeE= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/contrib/detectors/gcp v1.35.0 h1:bGvFt68+KTiAKFlacHW6AhA56GF2rS0bdD3aJYEnmzA= +go.opentelemetry.io/contrib/detectors/gcp v1.35.0/go.mod h1:qGWP8/+ILwMRIUf9uIVLloR1uo5ZYAslM4O6OqUi1DA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0 h1:PB3Zrjs1sG1GBX51SXyTSoOTqcDglmsk7nT6tkKPb/k= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0/go.mod h1:U2R3XyVPzn0WX7wOIypPuptulsMcPDPs/oiSVOMVnHY= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= go.step.sm/crypto v0.44.2 h1:t3p3uQ7raP2jp2ha9P6xkQF85TJZh+87xmjSLaib+jk= @@ -1362,24 +1362,24 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -google.golang.org/api v0.227.0 h1:QvIHF9IuyG6d6ReE+BNd11kIB8hZvjN8Z5xY5t21zYc= -google.golang.org/api v0.227.0/go.mod h1:EIpaG6MbTgQarWF5xJvX0eOJPK9n/5D4Bynb9j2HXvQ= +google.golang.org/api v0.234.0 h1:d3sAmYq3E9gdr2mpmiWGbm9pHsA/KJmyiLkwKfHBqU4= +google.golang.org/api v0.234.0/go.mod h1:QpeJkemzkFKe5VCE/PMv7GsUfn9ZF+u+q1Q7w6ckxTg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb h1:ITgPrl429bc6+2ZraNSzMDk3I95nmQln2fuPstKwFDE= -google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:sAo5UzpjUwgFBCzupwhcLcxHVDK7vG5IqI30YnwX2eE= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 h1:iK2jbkWL86DXjEx0qiHcRE9dE4/Ahua5k6V8OWFb//c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78= +google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:49MsLSx0oWMOZqcpB3uL8ZOkAh1+TndpJ8ONoCBWiZk= +google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 h1:vPV0tzlsK6EzEDHNNH5sa7Hs9bd7iXR7B1tSiPepkV0= +google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:pKLAc5OolXC3ViWGI62vvC0n10CpwAtRcTNCFwTKBEw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250512202823-5a2f75b736a9 h1:IkAfh6J/yllPtpYFU0zZN1hUPYdT0ogkBT/9hMxHjvg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250512202823-5a2f75b736a9/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= -google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= +google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= +google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1388,8 +1388,8 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1478,12 +1478,12 @@ sigs.k8s.io/bom v0.6.0 h1:IPMPHx6XdmMeW2oEeF66DgNyP5d4RxfuXwiC1qn+n9o= sigs.k8s.io/bom v0.6.0/go.mod h1:MV0D3vdGlkaPgi5EwpwMBeQ8n8QS8Q2u1lJ5LyE7RLM= sigs.k8s.io/cluster-api v1.11.0-alpha.0 h1:QyU9uGq2fAee+LC+/q3Q5QxCLnAUzMFYzIiIAM/sCfU= sigs.k8s.io/cluster-api v1.11.0-alpha.0/go.mod h1:UmipfrOBTqjRNX7X4zuJCInq28/Fh6xq9RklOJ/DMR4= -sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250520093716-525566440a77 h1:k1VO2XTDS8yl8e7FlJimeSxpe4cKD8u5IiNKD3J4enY= -sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250520093716-525566440a77/go.mod h1:1G//nbOZnW+4mWs6WWMjEP6f+sFi/KuhtD7JWDuqnjE= +sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250527155816-5eee55a4d0dd h1:B83rwJGeRW+qhHRdfCElQ30SXU2qxieQjIdGuCuLXhY= +sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250527155816-5eee55a4d0dd/go.mod h1:OiImzy5zgVbiStj/kd4joKl+hjSU4BhImC09Blp25y0= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20241202165100-3e6681045387 h1:WVCytp5VYi3EbLI/tKmjQ3zgEWdQrMAARVUtmqAmf48= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20241202165100-3e6681045387/go.mod h1:IaDsO8xSPRxRG1/rm9CP7+jPmj0nMNAuNi/yiHnLX8k= -sigs.k8s.io/controller-tools v0.17.0 h1:KaEQZbhrdY6J3zLBHplt+0aKUp8PeIttlhtF2UDo6bI= -sigs.k8s.io/controller-tools v0.17.0/go.mod h1:SKoWY8rwGWDzHtfnhmOwljn6fViG0JF7/xmnxpklgjo= +sigs.k8s.io/controller-tools v0.18.0 h1:rGxGZCZTV2wJreeRgqVoWab/mfcumTMmSwKzoM9xrsE= +sigs.k8s.io/controller-tools v0.18.0/go.mod h1:gLKoiGBriyNh+x1rWtUQnakUYEujErjXs9pf+x/8n1U= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d h1:KLiQzLW3RZJR19+j4pw2h5iioyAyqCkDBEAFdnGa3N8= diff --git a/templates/addons/crs-powervs.yaml b/templates/addons/crs-powervs.yaml index f63682b67..9a9d42593 100644 --- a/templates/addons/crs-powervs.yaml +++ b/templates/addons/crs-powervs.yaml @@ -1,4 +1,4 @@ -apiVersion: addons.cluster.x-k8s.io/v1beta1 +apiVersion: addons.cluster.x-k8s.io/v1beta2 kind: ClusterResourceSet metadata: name: crs-cloud-conf diff --git a/templates/addons/crs.yaml b/templates/addons/crs.yaml index ed7078f37..d88cae2ba 100644 --- a/templates/addons/crs.yaml +++ b/templates/addons/crs.yaml @@ -1,4 +1,4 @@ -apiVersion: addons.cluster.x-k8s.io/v1beta1 +apiVersion: addons.cluster.x-k8s.io/v1beta2 kind: ClusterResourceSet metadata: name: crs-cloud-conf diff --git a/templates/bases/powervs/cluster.yaml b/templates/bases/powervs/cluster.yaml index 9983247b7..5d8fd32e1 100644 --- a/templates/bases/powervs/cluster.yaml +++ b/templates/bases/powervs/cluster.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: labels: @@ -18,7 +18,7 @@ spec: kind: IBMPowerVSCluster name: "${CLUSTER_NAME}" controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane name: "${CLUSTER_NAME}-control-plane" --- diff --git a/templates/bases/powervs/kcp.yaml b/templates/bases/powervs/kcp.yaml index 01bd9b42a..18def1c53 100644 --- a/templates/bases/powervs/kcp.yaml +++ b/templates/bases/powervs/kcp.yaml @@ -1,5 +1,5 @@ kind: KubeadmControlPlane -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta2 metadata: name: "${CLUSTER_NAME}-control-plane" spec: @@ -19,13 +19,16 @@ spec: controlPlaneEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443} controllerManager: extraArgs: - enable-hostpath-provisioner: "true" + - name: enable-hostpath-provisioner + value: "true" initConfiguration: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' joinConfiguration: discovery: @@ -37,10 +40,11 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' - useExperimentalRetryJoin: true preKubeadmCommands: - hostname "{{ v1.local_hostname }}" - echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts diff --git a/templates/bases/powervs/kubeadm-config.yaml b/templates/bases/powervs/kubeadm-config.yaml index 629780e19..56d7f29fc 100644 --- a/templates/bases/powervs/kubeadm-config.yaml +++ b/templates/bases/powervs/kubeadm-config.yaml @@ -1,4 +1,4 @@ -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate metadata: labels: @@ -17,8 +17,10 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' preKubeadmCommands: - hostname "{{ v1.local_hostname }}" diff --git a/templates/bases/powervs/md.yaml b/templates/bases/powervs/md.yaml index 49f4f5173..6173558cd 100644 --- a/templates/bases/powervs/md.yaml +++ b/templates/bases/powervs/md.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: MachineDeployment metadata: name: "${CLUSTER_NAME}-md-0" @@ -12,7 +12,7 @@ spec: bootstrap: configRef: name: "${CLUSTER_NAME}-md-0" - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate infrastructureRef: name: "${CLUSTER_NAME}-md-0" diff --git a/templates/bases/vpc/cluster.yaml b/templates/bases/vpc/cluster.yaml index e7267fb5f..3a2c12cf2 100644 --- a/templates/bases/vpc/cluster.yaml +++ b/templates/bases/vpc/cluster.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: labels: @@ -20,7 +20,7 @@ spec: name: "${CLUSTER_NAME}" namespace: "${NAMESPACE}" controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane name: "${CLUSTER_NAME}-control-plane" namespace: "${NAMESPACE}" diff --git a/templates/bases/vpc/kcp.yaml b/templates/bases/vpc/kcp.yaml index deafe82e5..3b783d423 100644 --- a/templates/bases/vpc/kcp.yaml +++ b/templates/bases/vpc/kcp.yaml @@ -1,5 +1,5 @@ kind: KubeadmControlPlane -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta2 metadata: name: "${CLUSTER_NAME}-control-plane" namespace: "${NAMESPACE}" @@ -16,7 +16,9 @@ spec: clusterConfiguration: kubernetesVersion: ${KUBERNETES_VERSION} controllerManager: - extraArgs: {enable-hostpath-provisioner: 'true'} + extraArgs: + - name: enable-hostpath-provisioner + value: "true" apiServer: certSANs: [localhost, 127.0.0.1] dns: {} @@ -27,15 +29,19 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% joinConfiguration: discovery: {} nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% --- kind: IBMVPCMachineTemplate apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 diff --git a/templates/bases/vpc/kubeadm-config.yaml b/templates/bases/vpc/kubeadm-config.yaml index bcde9149e..b78252132 100644 --- a/templates/bases/vpc/kubeadm-config.yaml +++ b/templates/bases/vpc/kubeadm-config.yaml @@ -1,4 +1,4 @@ -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate metadata: name: "${CLUSTER_NAME}-md-0" @@ -8,5 +8,7 @@ spec: joinConfiguration: nodeRegistration: kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% diff --git a/templates/bases/vpc/md.yaml b/templates/bases/vpc/md.yaml index 67fb7b60f..d6d22392e 100644 --- a/templates/bases/vpc/md.yaml +++ b/templates/bases/vpc/md.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: MachineDeployment metadata: name: "${CLUSTER_NAME}-md-0" diff --git a/templates/cluster-template-powervs-clusterclass.yaml b/templates/cluster-template-powervs-clusterclass.yaml index 0be07acee..2766087cf 100644 --- a/templates/cluster-template-powervs-clusterclass.yaml +++ b/templates/cluster-template-powervs-clusterclass.yaml @@ -239,7 +239,6 @@ spec: - echo "{{ v1.local_hostname }}" >/etc/hostname - for script in $(find /etc/pre-kubeadm-commands/ -name '*.sh' -type f | sort); do echo "Running script $script"; "$script"; done - useExperimentalRetryJoin: true --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate @@ -307,7 +306,7 @@ spec: sshKey: ${IBMPOWERVS_SSHKEY_NAME} systemType: ${IBMPOWERVS_CONTROL_PLANE_SYSTYPE:="s922"} --- -apiVersion: addons.cluster.x-k8s.io/v1beta1 +apiVersion: addons.cluster.x-k8s.io/v1beta2 kind: ClusterResourceSet metadata: name: crs-cloud-conf diff --git a/templates/cluster-template-powervs-clusterclass/cluster-with-kcp.yaml b/templates/cluster-template-powervs-clusterclass/cluster-with-kcp.yaml index 56b208ad7..3adfb2a42 100644 --- a/templates/cluster-template-powervs-clusterclass/cluster-with-kcp.yaml +++ b/templates/cluster-template-powervs-clusterclass/cluster-with-kcp.yaml @@ -239,4 +239,3 @@ spec: - echo "{{ v1.local_hostname }}" >/etc/hostname - for script in $(find /etc/pre-kubeadm-commands/ -name '*.sh' -type f | sort); do echo "Running script $script"; "$script"; done - useExperimentalRetryJoin: true diff --git a/templates/cluster-template-powervs-create-infra.yaml b/templates/cluster-template-powervs-create-infra.yaml index 749c56650..1256acb63 100644 --- a/templates/cluster-template-powervs-create-infra.yaml +++ b/templates/cluster-template-powervs-create-infra.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: labels: @@ -16,7 +16,7 @@ spec: cidrBlocks: - ${SERVICE_CIDR:="10.128.0.0/12"} controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane name: ${CLUSTER_NAME}-control-plane infrastructureRef: @@ -49,7 +49,7 @@ spec: loadBalancers: - name: ${CLUSTER_NAME}-loadbalancer --- -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane metadata: name: ${CLUSTER_NAME}-control-plane @@ -59,24 +59,31 @@ spec: clusterConfiguration: apiServer: extraArgs: - cloud-provider: external + - name: cloud-provider + value: external controllerManager: extraArgs: - cloud-provider: external - enable-hostpath-provisioner: "true" + - name: cloud-provider + value: external + - name: enable-hostpath-provisioner + value: "true" initConfiguration: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' joinConfiguration: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' preKubeadmCommands: - hostname "{{ v1.local_hostname }}" @@ -84,7 +91,6 @@ spec: - echo "127.0.0.1 localhost" >>/etc/hosts - echo "127.0.0.1 {{ v1.local_hostname }}" >>/etc/hosts - echo "{{ v1.local_hostname }}" >/etc/hostname - useExperimentalRetryJoin: true machineTemplate: infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 @@ -111,7 +117,7 @@ spec: serviceInstance: name: ${CLUSTER_NAME}-serviceInstance --- -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: MachineDeployment metadata: name: ${CLUSTER_NAME}-md-0 @@ -123,7 +129,7 @@ spec: spec: bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate name: ${CLUSTER_NAME}-md-0 clusterName: ${CLUSTER_NAME} @@ -151,7 +157,7 @@ spec: serviceInstance: name: ${CLUSTER_NAME}-serviceInstance --- -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate metadata: labels: @@ -166,8 +172,10 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' preKubeadmCommands: - hostname "{{ v1.local_hostname }}" @@ -192,7 +200,7 @@ spec: status: ready: false --- -apiVersion: addons.cluster.x-k8s.io/v1beta1 +apiVersion: addons.cluster.x-k8s.io/v1beta2 kind: ClusterResourceSet metadata: name: crs-cloud-conf diff --git a/templates/cluster-template-powervs.yaml b/templates/cluster-template-powervs.yaml index 9ad871454..25de7d0bc 100644 --- a/templates/cluster-template-powervs.yaml +++ b/templates/cluster-template-powervs.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: labels: @@ -15,7 +15,7 @@ spec: cidrBlocks: - ${SERVICE_CIDR:="10.128.0.0/12"} controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane name: ${CLUSTER_NAME}-control-plane infrastructureRef: @@ -37,7 +37,7 @@ spec: name: ${IBMPOWERVS_NETWORK_NAME} serviceInstanceID: ${IBMPOWERVS_SERVICE_INSTANCE_ID} --- -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane metadata: name: ${CLUSTER_NAME}-control-plane @@ -49,12 +49,13 @@ spec: - ${IBMPOWERVS_VIP} - ${IBMPOWERVS_VIP_EXTERNAL} extraArgs: - cloud-provider: external + - name: cloud-provider + value: external controlPlaneEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443} controllerManager: extraArgs: - cloud-provider: external - enable-hostpath-provisioner: "true" + - name: cloud-provider + value: external files: - content: | apiVersion: v1 @@ -176,8 +177,10 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' joinConfiguration: discovery: @@ -189,8 +192,10 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' preKubeadmCommands: - hostname "{{ v1.local_hostname }}" @@ -201,7 +206,6 @@ spec: - mkdir -p /etc/pre-kubeadm-commands - for script in $(find /etc/pre-kubeadm-commands/ -name '*.sh' -type f | sort); do echo "Running script $script"; "$script"; done - useExperimentalRetryJoin: true machineTemplate: infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 @@ -228,7 +232,7 @@ spec: sshKey: ${IBMPOWERVS_SSHKEY_NAME} systemType: ${IBMPOWERVS_CONTROL_PLANE_SYSTYPE:="s922"} --- -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: MachineDeployment metadata: name: ${CLUSTER_NAME}-md-0 @@ -239,7 +243,7 @@ spec: spec: bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate name: ${CLUSTER_NAME}-md-0 clusterName: ${CLUSTER_NAME} @@ -267,7 +271,7 @@ spec: sshKey: ${IBMPOWERVS_SSHKEY_NAME} systemType: ${IBMPOWERVS_COMPUTE_SYSTYPE:="s922"} --- -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate metadata: labels: @@ -287,8 +291,10 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% name: '{{ v1.local_hostname }}' preKubeadmCommands: - hostname "{{ v1.local_hostname }}" @@ -297,7 +303,7 @@ spec: - echo "127.0.0.1 {{ v1.local_hostname }}" >>/etc/hosts - echo "{{ v1.local_hostname }}" >/etc/hostname --- -apiVersion: addons.cluster.x-k8s.io/v1beta1 +apiVersion: addons.cluster.x-k8s.io/v1beta2 kind: ClusterResourceSet metadata: name: crs-cloud-conf diff --git a/templates/cluster-template-powervs/cluster.yaml b/templates/cluster-template-powervs/cluster.yaml index 2c4cfdd59..ce8a49342 100644 --- a/templates/cluster-template-powervs/cluster.yaml +++ b/templates/cluster-template-powervs/cluster.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: name: "${CLUSTER_NAME}" diff --git a/templates/cluster-template-powervs/kcp.yaml b/templates/cluster-template-powervs/kcp.yaml index e252e978c..048ce343d 100644 --- a/templates/cluster-template-powervs/kcp.yaml +++ b/templates/cluster-template-powervs/kcp.yaml @@ -1,5 +1,5 @@ kind: KubeadmControlPlane -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta2 metadata: name: "${CLUSTER_NAME}-control-plane" spec: @@ -7,7 +7,9 @@ spec: clusterConfiguration: apiServer: extraArgs: - cloud-provider: external + - name: cloud-provider + value: external controllerManager: extraArgs: - cloud-provider: external + - name: cloud-provider + value: external diff --git a/templates/cluster-template-powervs/kubeadm-config.yaml b/templates/cluster-template-powervs/kubeadm-config.yaml index dbe04179a..bc4665a30 100644 --- a/templates/cluster-template-powervs/kubeadm-config.yaml +++ b/templates/cluster-template-powervs/kubeadm-config.yaml @@ -1,4 +1,4 @@ -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate metadata: labels: diff --git a/templates/cluster-template-vpc-clusterclass.yaml b/templates/cluster-template-vpc-clusterclass.yaml index c8a131d8c..47320b6ae 100644 --- a/templates/cluster-template-vpc-clusterclass.yaml +++ b/templates/cluster-template-vpc-clusterclass.yaml @@ -162,7 +162,7 @@ spec: - name: ${IBMVPC_SSHKEY_NAME} zone: ${IBMVPC_ZONE} --- -apiVersion: addons.cluster.x-k8s.io/v1beta1 +apiVersion: addons.cluster.x-k8s.io/v1beta2 kind: ClusterResourceSet metadata: name: crs-cloud-conf diff --git a/templates/cluster-template.yaml b/templates/cluster-template.yaml index 2f7ea1494..a88bc042f 100644 --- a/templates/cluster-template.yaml +++ b/templates/cluster-template.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: labels: @@ -16,7 +16,7 @@ spec: cidrBlocks: - ${SERVICE_CIDR:="10.128.0.0/12"} controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane name: ${CLUSTER_NAME}-control-plane namespace: ${NAMESPACE} @@ -40,7 +40,7 @@ spec: vpc: ${IBMVPC_NAME} zone: ${IBMVPC_ZONE} --- -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane metadata: name: ${CLUSTER_NAME}-control-plane @@ -53,11 +53,12 @@ spec: - localhost - 127.0.0.1 extraArgs: - cloud-provider: external + - name: cloud-provider + value: external controllerManager: extraArgs: - cloud-provider: external - enable-hostpath-provisioner: "true" + - name: cloud-provider + value: external dns: {} etcd: {} kubernetesVersion: ${KUBERNETES_VERSION} @@ -67,15 +68,19 @@ spec: nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% joinConfiguration: discovery: {} nodeRegistration: criSocket: /var/run/containerd/containerd.sock kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% machineTemplate: infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 @@ -101,7 +106,7 @@ spec: - name: ${IBMVPC_SSHKEY_NAME} zone: ${IBMVPC_ZONE} --- -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: MachineDeployment metadata: name: ${CLUSTER_NAME}-md-0 @@ -138,7 +143,7 @@ spec: - name: ${IBMVPC_SSHKEY_NAME} zone: ${IBMVPC_ZONE} --- -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate metadata: name: ${CLUSTER_NAME}-md-0 @@ -148,10 +153,12 @@ spec: joinConfiguration: nodeRegistration: kubeletExtraArgs: - cloud-provider: external - eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% + - name: cloud-provider + value: external + - name: eviction-hard + value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% --- -apiVersion: addons.cluster.x-k8s.io/v1beta1 +apiVersion: addons.cluster.x-k8s.io/v1beta2 kind: ClusterResourceSet metadata: name: crs-cloud-conf diff --git a/templates/cluster-template/cluster.yaml b/templates/cluster-template/cluster.yaml index 05c4be781..e48113042 100644 --- a/templates/cluster-template/cluster.yaml +++ b/templates/cluster-template/cluster.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: name: "${CLUSTER_NAME}" diff --git a/templates/cluster-template/kcp.yaml b/templates/cluster-template/kcp.yaml index 99fb17ce6..67a200c9a 100644 --- a/templates/cluster-template/kcp.yaml +++ b/templates/cluster-template/kcp.yaml @@ -1,4 +1,4 @@ -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlane metadata: name: "${CLUSTER_NAME}-control-plane" @@ -8,7 +8,9 @@ spec: clusterConfiguration: controllerManager: extraArgs: - cloud-provider: external + - name: cloud-provider + value: external apiServer: extraArgs: - cloud-provider: external + - name: cloud-provider + value: external From aa4a97a7f8fad205f591609ca3105db29c1f5f5b Mon Sep 17 00:00:00 2001 From: Karthik Bhat Date: Thu, 12 Jun 2025 12:21:10 +0530 Subject: [PATCH 3/3] Version udpate checklist tasks --- Makefile | 4 ++-- cloudbuild.yaml | 2 +- hack/ensure-go.sh | 2 +- netlify.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1020232a6..1b187229f 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ RELEASE_NOTES_DIR := CHANGELOG OUTPUT_TYPE ?= type=registry # Go -GO_VERSION ?=1.24.0 +GO_VERSION ?=1.24.3 GO_CONTAINER_IMAGE ?= golang:$(GO_VERSION) # Trivy @@ -105,7 +105,7 @@ PULL_POLICY ?= Always # Set build time variables including version details LDFLAGS := $(shell ./hack/version.sh) -KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.32.0 +KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.33.0 # main controller CORE_IMAGE_NAME ?= cluster-api-ibmcloud-controller diff --git a/cloudbuild.yaml b/cloudbuild.yaml index e5549d43a..bcbf0ef44 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -4,7 +4,7 @@ options: substitution_option: ALLOW_LOOSE machineType: 'E2_HIGHCPU_8' steps: - - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20250116-2a05ea7e3d' + - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20250513-9264efb079' entrypoint: bash env: - DOCKER_CLI_EXPERIMENTAL=enabled diff --git a/hack/ensure-go.sh b/hack/ensure-go.sh index 0f193e865..8a123bdc8 100755 --- a/hack/ensure-go.sh +++ b/hack/ensure-go.sh @@ -31,7 +31,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(go version)" local minimum_go_version - minimum_go_version=go1.23.0 + minimum_go_version=go1.24.0 if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then cat <