@@ -20,8 +20,8 @@ import (
20
20
"fmt"
21
21
"strconv"
22
22
23
+ appsv1 "k8s.io/api/apps/v1"
23
24
"k8s.io/api/core/v1"
24
- "k8s.io/api/extensions/v1beta1"
25
25
"k8s.io/apimachinery/pkg/api/resource"
26
26
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
27
27
clientset "k8s.io/client-go/kubernetes"
@@ -129,7 +129,7 @@ var _ = Describe("Cluster size autoscaler [Serial][Slow]", func() {
129
129
utils .Logf ("Create deployment" )
130
130
replicas := int32 (podCount )
131
131
deployment := createDeploymentManifest (basename + "-deployment" , replicas , map [string ]string {"app" : basename })
132
- _ , err := cs .Extensions ().Deployments (ns .Name ).Create (deployment )
132
+ _ , err := cs .AppsV1 ().Deployments (ns .Name ).Create (deployment )
133
133
Expect (err ).NotTo (HaveOccurred ())
134
134
135
135
By ("Scale up" )
@@ -141,7 +141,7 @@ var _ = Describe("Cluster size autoscaler [Serial][Slow]", func() {
141
141
utils .Logf ("Delete Pods by replic=0" )
142
142
replicas = 0
143
143
deployment .Spec .Replicas = & replicas
144
- _ , err = cs .Extensions ().Deployments (ns .Name ).Update (deployment )
144
+ _ , err = cs .AppsV1 ().Deployments (ns .Name ).Update (deployment )
145
145
Expect (err ).NotTo (HaveOccurred ())
146
146
targetNodeCount = initNodeCount
147
147
err = utils .WaitAutoScaleNodes (cs , targetNodeCount )
@@ -178,13 +178,13 @@ func createScalerPodManifest(name string) (result *v1.Pod) {
178
178
return
179
179
}
180
180
181
- func createDeploymentManifest (name string , replicas int32 , label map [string ]string ) (result * v1beta1 .Deployment ) {
181
+ func createDeploymentManifest (name string , replicas int32 , label map [string ]string ) (result * appsv1 .Deployment ) {
182
182
spec := createPodSpec ()
183
- result = & v1beta1 .Deployment {
183
+ result = & appsv1 .Deployment {
184
184
ObjectMeta : metav1.ObjectMeta {
185
185
Name : name ,
186
186
},
187
- Spec : v1beta1 .DeploymentSpec {
187
+ Spec : appsv1 .DeploymentSpec {
188
188
Replicas : & replicas ,
189
189
Selector : & metav1.LabelSelector {
190
190
MatchLabels : label ,
0 commit comments