@@ -809,7 +809,7 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
809
809
810
810
By ("reading the scale subresource" )
811
811
scale := & autoscalingv1.Scale {}
812
- err = cl .SubResource ("scale" ).Get (ctx , dep , scale )
812
+ err = cl .SubResource ("scale" ).Get (ctx , dep , scale , & client. SubResourceGetOptions {} )
813
813
Expect (err ).NotTo (HaveOccurred ())
814
814
Expect (scale .Spec .Replicas ).To (Equal (* dep .Spec .Replicas ))
815
815
})
@@ -823,7 +823,7 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
823
823
Expect ((err )).NotTo (HaveOccurred ())
824
824
825
825
token := & authenticationv1.TokenRequest {}
826
- err = cl .SubResource ("token" ).Create (ctx , serviceAccount , token )
826
+ err = cl .SubResource ("token" ).Create (ctx , serviceAccount , token , & client. SubResourceCreateOptions {} )
827
827
Expect (err ).NotTo (HaveOccurred ())
828
828
829
829
Expect (token .Status .Token ).NotTo (Equal ("" ))
@@ -845,7 +845,7 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
845
845
eviction := & policyv1.Eviction {
846
846
DeleteOptions : & metav1.DeleteOptions {GracePeriodSeconds : ptr .To (int64 (0 ))},
847
847
}
848
- err = cl .SubResource ("eviction" ).Create (ctx , pod , eviction )
848
+ err = cl .SubResource ("eviction" ).Create (ctx , pod , eviction , & client. SubResourceCreateOptions {} )
849
849
Expect ((err )).NotTo (HaveOccurred ())
850
850
851
851
By ("Asserting the pod is gone" )
@@ -869,7 +869,7 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
869
869
binding := & corev1.Binding {
870
870
Target : corev1.ObjectReference {Name : node .Name },
871
871
}
872
- err = cl .SubResource ("binding" ).Create (ctx , pod , binding )
872
+ err = cl .SubResource ("binding" ).Create (ctx , pod , binding , & client. SubResourceCreateOptions {} )
873
873
Expect ((err )).NotTo (HaveOccurred ())
874
874
875
875
By ("Asserting the pod is bound" )
@@ -892,7 +892,7 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
892
892
Type : certificatesv1 .CertificateApproved ,
893
893
Status : corev1 .ConditionTrue ,
894
894
})
895
- err = cl .SubResource ("approval" ).Update (ctx , csr )
895
+ err = cl .SubResource ("approval" ).Update (ctx , csr , & client. SubResourceUpdateOptions {} )
896
896
Expect (err ).NotTo (HaveOccurred ())
897
897
898
898
By ("Asserting the CSR is approved" )
@@ -917,7 +917,7 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
917
917
Type : certificatesv1 .CertificateApproved ,
918
918
Status : corev1 .ConditionTrue ,
919
919
})
920
- err = cl .SubResource ("approval" ).Patch (ctx , csr , patch )
920
+ err = cl .SubResource ("approval" ).Patch (ctx , csr , patch , & client. SubResourcePatchOptions {} )
921
921
Expect (err ).NotTo (HaveOccurred ())
922
922
923
923
By ("Asserting the CSR is approved" )
@@ -936,10 +936,10 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
936
936
dep , err := clientset .AppsV1 ().Deployments (dep .Namespace ).Create (ctx , dep , metav1.CreateOptions {})
937
937
Expect (err ).NotTo (HaveOccurred ())
938
938
939
- By ("Updating the scale subresurce " )
939
+ By ("Updating the scale subresource " )
940
940
replicaCount := * dep .Spec .Replicas
941
941
scale := & autoscalingv1.Scale {Spec : autoscalingv1.ScaleSpec {Replicas : replicaCount }}
942
- err = cl .SubResource ("scale" ).Update (ctx , dep , client .WithSubResourceBody (scale ))
942
+ err = cl .SubResource ("scale" ).Update (ctx , dep , client .WithSubResourceBody (scale ), & client. SubResourceUpdateOptions {} )
943
943
Expect (err ).NotTo (HaveOccurred ())
944
944
945
945
By ("Asserting replicas got updated" )
@@ -961,7 +961,7 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
961
961
replicaCount := * dep .Spec .Replicas
962
962
patch := client .MergeFrom (& autoscalingv1.Scale {})
963
963
scale := & autoscalingv1.Scale {Spec : autoscalingv1.ScaleSpec {Replicas : replicaCount }}
964
- err = cl .SubResource ("scale" ).Patch (ctx , dep , patch , client .WithSubResourceBody (scale ))
964
+ err = cl .SubResource ("scale" ).Patch (ctx , dep , patch , client .WithSubResourceBody (scale ), & client. SubResourcePatchOptions {} )
965
965
Expect (err ).NotTo (HaveOccurred ())
966
966
967
967
By ("Asserting replicas got updated" )
0 commit comments