@@ -11,6 +11,7 @@ import (
11
11
admissionapi "k8s.io/pod-security-admission/api"
12
12
13
13
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14
+ applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
14
15
"k8s.io/client-go/kubernetes"
15
16
"k8s.io/kubernetes/test/e2e/framework"
16
17
"k8s.io/kubernetes/test/e2e/framework/deployment"
@@ -35,7 +36,34 @@ var _ = describe("Infrastructure tests", func() {
35
36
36
37
It ("All node pools should be able to run pods [Zalando]" , func () {
37
38
// When modifying this list, don't forget to modify cluster/manifests/e2e-resources/pool-reserve.yaml
38
- for _ , pool := range []string {"default-worker-splitaz" , "worker-combined" , "worker-limit-az" , "worker-instance-storage" } {
39
+ nodePools := []string {
40
+ "default-worker-splitaz" ,
41
+ "worker-combined" ,
42
+ "worker-limit-az" ,
43
+ "worker-instance-storage" ,
44
+ "worker-node-tests" ,
45
+ "worker-karpenter" ,
46
+ "worker-arm64" ,
47
+ }
48
+
49
+ for _ , pool := range nodePools {
50
+ deploy , err := cs .AppsV1 ().Deployments ("default" ).Get (context .Background (), fmt .Sprintf ("pool-reserve-%s" , pool ), metav1.GetOptions {})
51
+ framework .ExpectNoError (err )
52
+
53
+ err = deployment .WaitForDeploymentComplete (cs , deploy )
54
+ framework .ExpectNoError (err )
55
+
56
+ // Scale out deployment to one more replica. In combination with Pod-Anti-Affinity, this should require one more node.
57
+ _ , err = cs .AppsV1 ().Deployments ("default" ).ApplyScale (
58
+ context .Background (),
59
+ fmt .Sprintf ("pool-reserve-%s" , pool ),
60
+ applyconfigurationsautoscalingv1 .Scale ().WithSpec (applyconfigurationsautoscalingv1 .ScaleSpec ().WithReplicas (2 )),
61
+ metav1.ApplyOptions {FieldManager : "e2e.test" , Force : true },
62
+ )
63
+ framework .ExpectNoError (err )
64
+ }
65
+
66
+ for _ , pool := range nodePools {
39
67
deploy , err := cs .AppsV1 ().Deployments ("default" ).Get (context .Background (), fmt .Sprintf ("pool-reserve-%s" , pool ), metav1.GetOptions {})
40
68
framework .ExpectNoError (err )
41
69
0 commit comments