You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expect(strconv.Itoa(int(mdOriginalReplicas))).To(Equal(mdNodeGroupMinSize), "MachineDeployment should have replicas as defined in %s", clusterv1.AutoscalerMinSizeAnnotation)
Expect(strconv.Itoa(int(mpOriginalReplicas))).To(Equal(mpNodeGroupMinSize), "MachinePool should have replicas as defined in %s", clusterv1.AutoscalerMinSizeAnnotation)
162
+
Expect(int(mpOriginalReplicas)).To(Equal(1), "MachinePool should default to 1 replica via the MachinePool webhook")
155
163
156
164
By("Installing the autoscaler on the workload cluster")
Expect(input.ClusterProxy.GetClient().Get(ctx, client.ObjectKey{Name: deploymentName, Namespace: metav1.NamespaceDefault}, deployment)).To(Succeed(), "failed to get the scale up pod")
234
+
Expect(input.ClusterProxy.GetClient().Get(ctx, client.ObjectKey{Name: deploymentName, Namespace: metav1.NamespaceDefault}, deployment)).To(Succeed(), "failed to get the scale up deployment")
239
235
240
236
By("Deleting the scale up deployment")
241
-
Expect(input.ClusterProxy.GetClient().Delete(ctx, deployment)).To(Succeed(), "failed to delete the scale up pod")
237
+
Expect(input.ClusterProxy.GetClient().Delete(ctx, deployment)).To(Succeed(), "failed to delete the scale up deployment")
242
238
243
239
By("Waiting for the scale up deployment to be deleted")
244
-
deploymentList:=&appsv1.DeploymentList{}
245
-
Eventually(func() error {
246
-
Expect(input.ClusterProxy.GetClient().List(ctx, deploymentList, client.InNamespace(metav1.NamespaceDefault))).To(Succeed(), "failed to list deployments")
247
-
iflen(deploymentList.Items) !=0 {
248
-
returnerrors.Errorf("expected no deployments for %s, found %d", deploymentName, len(deploymentList.Items))
Expect(ctx).NotTo(BeNil(), "ctx is required for DisableAutoscalerForMachineDeploymentTopologyAndWait")
301
293
Expect(input.ClusterProxy).ToNot(BeNil(), "Invalid argument. input.ClusterProxy can't be nil when calling DisableAutoscalerForMachineDeploymentTopologyAndWait")
302
294
@@ -343,15 +335,15 @@ func DisableAutoscalerForMachineDeploymentTopologyAndWait(ctx context.Context, i
343
335
}, input.WaitForAnnotationsToBeDropped...).Should(Succeed(), "Auto scaler annotations are not dropped or replicas changed for the MachineDeployments")
Expect(ctx).NotTo(BeNil(), "ctx is required for EnableAutoscalerForMachineDeploymentTopologyAndWait")
356
348
Expect(input.ClusterProxy).ToNot(BeNil(), "Invalid argument. input.ClusterProxy can't be nil when calling EnableAutoscalerForMachineDeploymentTopologyAndWait")
357
349
@@ -391,10 +383,16 @@ func EnableAutoscalerForMachineDeploymentTopologyAndWait(ctx context.Context, in
391
383
}, input.WaitForAnnotationsToBeAdded...).Should(Succeed(), "Auto scaler annotations are missing from the MachineDeployments")
Expect(ctx).NotTo(BeNil(), "ctx is required for DisableAutoscalerForMachinePoolTopologyAndWait")
399
397
Expect(input.ClusterProxy).ToNot(BeNil(), "Invalid argument. input.ClusterProxy can't be nil when calling DisableAutoscalerForMachinePoolTopologyAndWait")
400
398
@@ -441,7 +439,15 @@ func DisableAutoscalerForMachinePoolTopologyAndWait(ctx context.Context, input D
441
439
}, input.WaitForAnnotationsToBeDropped...).Should(Succeed(), "Auto scaler annotations are not dropped or replicas changed for the MachinePools")
Expect(ctx).NotTo(BeNil(), "ctx is required for EnableAutoscalerForMachinePoolTopologyAndWait")
446
452
Expect(input.ClusterProxy).ToNot(BeNil(), "Invalid argument. input.ClusterProxy can't be nil when calling EnableAutoscalerForMachinePoolTopologyAndWait")
447
453
@@ -483,7 +489,7 @@ func EnableAutoscalerForMachinePoolTopologyAndWait(ctx context.Context, input En
483
489
484
490
// getAuthenticationTokenForAutoscaler returns a bearer authenticationToken with minimal RBAC permissions that will be used
485
491
// by the autoscaler running on the workload cluster to access the management cluster.
0 commit comments