@@ -811,53 +811,6 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
811
811
})
812
812
}
813
813
814
- // verifyV1Beta2ConditionsTrueV1Beta1 checks the Cluster and Machines of a Cluster that
815
- // the given v1beta2 condition types are set to true without a message, if they exist.
816
- func verifyV1Beta2ConditionsTrueV1Beta1 (ctx context.Context , c client.Client , clusterName , clusterNamespace string , v1beta2conditionTypes []string ) {
817
- cluster := & clusterv1beta1.Cluster {}
818
- key := client.ObjectKey {
819
- Namespace : clusterNamespace ,
820
- Name : clusterName ,
821
- }
822
- Eventually (func () error {
823
- return c .Get (ctx , key , cluster )
824
- }, 3 * time .Minute , 3 * time .Second ).Should (Succeed (), "Failed to get Cluster object %s" , klog .KRef (clusterNamespace , clusterName ))
825
-
826
- if cluster .Status .V1Beta2 != nil && len (cluster .Status .V1Beta2 .Conditions ) > 0 {
827
- for _ , conditionType := range v1beta2conditionTypes {
828
- for _ , condition := range cluster .Status .V1Beta2 .Conditions {
829
- if condition .Type != conditionType {
830
- continue
831
- }
832
- Expect (condition .Status ).To (Equal (metav1 .ConditionTrue ), "The v1beta2 condition %q on the Cluster should be set to true" , conditionType )
833
- Expect (condition .Message ).To (BeEmpty (), "The v1beta2 condition %q on the Cluster should have an empty message" , conditionType )
834
- }
835
- }
836
- }
837
-
838
- machineList := & clusterv1beta1.MachineList {}
839
- Eventually (func () error {
840
- return c .List (ctx , machineList , client .InNamespace (clusterNamespace ),
841
- client.MatchingLabels {
842
- clusterv1 .ClusterNameLabel : clusterName ,
843
- })
844
- }, 3 * time .Minute , 3 * time .Second ).Should (Succeed (), "Failed to list Machines for Cluster %s" , klog .KObj (cluster ))
845
- for _ , machine := range machineList .Items {
846
- if machine .Status .V1Beta2 == nil || len (machine .Status .V1Beta2 .Conditions ) == 0 {
847
- continue
848
- }
849
- for _ , conditionType := range v1beta2conditionTypes {
850
- for _ , condition := range machine .Status .V1Beta2 .Conditions {
851
- if condition .Type != conditionType {
852
- continue
853
- }
854
- Expect (condition .Status ).To (Equal (metav1 .ConditionTrue ), "The v1beta2 condition %q on the Machine %q should be set to true" , conditionType , machine .Name )
855
- Expect (condition .Message ).To (BeEmpty (), "The v1beta2 condition %q on the Machine %q should have an empty message" , conditionType , machine .Name )
856
- }
857
- }
858
- }
859
- }
860
-
861
814
func setupClusterctl (ctx context.Context , clusterctlBinaryURL , clusterctlConfigPath string ) (string , string ) {
862
815
clusterctlBinaryPath := downloadToTmpFile (ctx , clusterctlBinaryURL )
863
816
0 commit comments