@@ -2008,16 +2008,21 @@ func TestKubeadmControlPlaneReconciler_reconcileControlPlaneAndMachinesCondition
2008
2008
Reason : controlplanev1 .KubeadmControlPlaneInitializedV1Beta2Reason ,
2009
2009
},
2010
2010
{
2011
- Type : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthyV1Beta2Condition ,
2012
- Status : metav1 .ConditionUnknown ,
2013
- Reason : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthUnknownV1Beta2Reason ,
2014
- Message : "Following Machines are reporting etcd member unknown: machine1-test" ,
2011
+ Type : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthyV1Beta2Condition ,
2012
+ Status : metav1 .ConditionUnknown ,
2013
+ Reason : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthUnknownV1Beta2Reason ,
2014
+ Message : "* Machine machine1-test:\n " +
2015
+ " * EtcdMemberHealthy: Node does not exist" ,
2015
2016
},
2016
2017
{
2017
- Type : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthyV1Beta2Condition ,
2018
- Status : metav1 .ConditionUnknown ,
2019
- Reason : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthUnknownV1Beta2Reason ,
2020
- Message : "Following Machines are reporting control plane unknown: machine1-test" ,
2018
+ Type : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthyV1Beta2Condition ,
2019
+ Status : metav1 .ConditionUnknown ,
2020
+ Reason : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthUnknownV1Beta2Reason ,
2021
+ Message : "* Machine machine1-test:\n " +
2022
+ " * APIServerPodHealthy: Node does not exist\n " +
2023
+ " * ControllerManagerPodHealthy: Node does not exist\n " +
2024
+ " * SchedulerPodHealthy: Node does not exist\n " +
2025
+ " * EtcdPodHealthy: Node does not exist" ,
2021
2026
},
2022
2027
},
2023
2028
expectMachineConditions : []metav1.Condition {
@@ -2083,16 +2088,21 @@ func TestKubeadmControlPlaneReconciler_reconcileControlPlaneAndMachinesCondition
2083
2088
Reason : controlplanev1 .KubeadmControlPlaneInitializedV1Beta2Reason ,
2084
2089
},
2085
2090
{
2086
- Type : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthyV1Beta2Condition ,
2087
- Status : metav1 .ConditionUnknown ,
2088
- Reason : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthUnknownV1Beta2Reason ,
2089
- Message : "Following Machines are reporting etcd member unknown: machine1-test" ,
2091
+ Type : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthyV1Beta2Condition ,
2092
+ Status : metav1 .ConditionUnknown ,
2093
+ Reason : controlplanev1 .KubeadmControlPlaneEtcdClusterHealthUnknownV1Beta2Reason ,
2094
+ Message : "* Machine machine1-test:\n " +
2095
+ " * EtcdMemberHealthy: Node does not exist" ,
2090
2096
},
2091
2097
{
2092
- Type : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthyV1Beta2Condition ,
2093
- Status : metav1 .ConditionUnknown ,
2094
- Reason : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthUnknownV1Beta2Reason ,
2095
- Message : "Following Machines are reporting control plane unknown: machine1-test" ,
2098
+ Type : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthyV1Beta2Condition ,
2099
+ Status : metav1 .ConditionUnknown ,
2100
+ Reason : controlplanev1 .KubeadmControlPlaneControlPlaneComponentsHealthUnknownV1Beta2Reason ,
2101
+ Message : "* Machine machine1-test:\n " +
2102
+ " * APIServerPodHealthy: Node does not exist\n " +
2103
+ " * ControllerManagerPodHealthy: Node does not exist\n " +
2104
+ " * SchedulerPodHealthy: Node does not exist\n " +
2105
+ " * EtcdPodHealthy: Node does not exist" ,
2096
2106
},
2097
2107
},
2098
2108
expectMachineConditions : []metav1.Condition {
@@ -3344,7 +3354,7 @@ func TestKubeadmControlPlaneReconciler_reconcileDelete(t *testing.T) {
3344
3354
g .Expect (err ).ToNot (HaveOccurred ())
3345
3355
g .Expect (kcp .Finalizers ).To (ContainElement (controlplanev1 .KubeadmControlPlaneFinalizer ))
3346
3356
g .Expect (controlPlane .DeletingReason ).To (Equal (controlplanev1 .KubeadmControlPlaneDeletingWaitingForWorkersDeletionV1Beta2Reason ))
3347
- g .Expect (controlPlane .DeletingMessage ).To (Equal ("KCP deletion blocked because worker Machines: worker-0, worker-1, worker-2, worker-3, worker-4, ... (5 more) still exist " ))
3357
+ g .Expect (controlPlane .DeletingMessage ).To (Equal ("KubeadmControlPlane deletion blocked because following objects still exist: \n * Machines: worker-0, worker-1, worker-2, worker-3, worker-4, ... (5 more)" ))
3348
3358
3349
3359
controlPlaneMachines := clusterv1.MachineList {}
3350
3360
labels := map [string ]string {
@@ -3405,7 +3415,7 @@ func TestKubeadmControlPlaneReconciler_reconcileDelete(t *testing.T) {
3405
3415
g .Expect (err ).ToNot (HaveOccurred ())
3406
3416
g .Expect (kcp .Finalizers ).To (ContainElement (controlplanev1 .KubeadmControlPlaneFinalizer ))
3407
3417
g .Expect (controlPlane .DeletingReason ).To (Equal (controlplanev1 .KubeadmControlPlaneDeletingWaitingForWorkersDeletionV1Beta2Reason ))
3408
- g .Expect (controlPlane .DeletingMessage ).To (Equal ("KCP deletion blocked because MachinePools: mp-0, mp-1, mp-2, mp-3, mp-4, ... (5 more) still exist " ))
3418
+ g .Expect (controlPlane .DeletingMessage ).To (Equal ("KubeadmControlPlane deletion blocked because following objects still exist: \n * MachinePools: mp-0, mp-1, mp-2, mp-3, mp-4, ... (5 more)" ))
3409
3419
3410
3420
controlPlaneMachines := clusterv1.MachineList {}
3411
3421
labels := map [string ]string {
@@ -3489,7 +3499,7 @@ func TestObjectsPendingDelete(t *testing.T) {
3489
3499
3490
3500
g := NewWithT (t )
3491
3501
3492
- g .Expect (objectsPendingDeleteNames (allMachines , machinePools , c )).To (Equal ("MachinePools: mp1; worker Machines: w1, w2, w3, w4, w5, ... (3 more)" ))
3502
+ g .Expect (objectsPendingDeleteNames (allMachines , machinePools , c )).To (Equal ([] string { "MachinePools: mp1" , " Machines: w1, w2, w3, w4, w5, ... (3 more)"} ))
3493
3503
}
3494
3504
3495
3505
// test utils.
0 commit comments