Merge pull request #108797 from deads2k/release-1.25-removed-01-checker

update for APIs removed in 1.25
This commit is contained in:
Kubernetes Prow Robot
2022-05-11 19:25:13 -07:00
committed by GitHub
11 changed files with 11 additions and 32408 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -54,7 +54,10 @@ type ResourceExpirationEvaluator interface {
}
func NewResourceExpirationEvaluator(currentVersion apimachineryversion.Info) (ResourceExpirationEvaluator, error) {
ret := &resourceExpirationEvaluator{}
ret := &resourceExpirationEvaluator{
// TODO https://github.com/kubernetes/kubernetes/issues/109799 set this back to false after beta is tagged.
strictRemovedHandlingInAlpha: true,
}
if len(currentVersion.Major) > 0 {
currentMajor64, err := strconv.ParseInt(currentVersion.Major, 10, 32)
if err != nil {

View File

@@ -466,7 +466,7 @@ func newCustomResourceDefinition() *apiextensionsv1.CustomResourceDefinition {
func waitPDBStable(ctx context.Context, t *testing.T, clientSet clientset.Interface, podNum int32, ns, pdbName string) {
if err := wait.PollImmediate(2*time.Second, 60*time.Second, func() (bool, error) {
pdb, err := clientSet.PolicyV1beta1().PodDisruptionBudgets(ns).Get(ctx, pdbName, metav1.GetOptions{})
pdb, err := clientSet.PolicyV1().PodDisruptionBudgets(ns).Get(ctx, pdbName, metav1.GetOptions{})
if err != nil {
return false, err
}

View File

@@ -163,7 +163,7 @@ func TestConcurrentEvictionRequests(t *testing.T) {
close(errCh)
var errList []error
if err := clientSet.PolicyV1beta1().PodDisruptionBudgets(ns.Name).Delete(context.TODO(), pdb.Name, deleteOption); err != nil {
if err := clientSet.PolicyV1().PodDisruptionBudgets(ns.Name).Delete(context.TODO(), pdb.Name, deleteOption); err != nil {
errList = append(errList, fmt.Errorf("Failed to delete PodDisruptionBudget: %v", err))
}
for err := range errCh {
@@ -220,7 +220,7 @@ func TestTerminalPodEviction(t *testing.T) {
waitPDBStable(t, clientSet, 1, ns.Name, pdb.Name)
pdbList, err := clientSet.PolicyV1beta1().PodDisruptionBudgets(ns.Name).List(context.TODO(), metav1.ListOptions{})
pdbList, err := clientSet.PolicyV1().PodDisruptionBudgets(ns.Name).List(context.TODO(), metav1.ListOptions{})
if err != nil {
t.Fatalf("Error while listing pod disruption budget")
}
@@ -242,7 +242,7 @@ func TestTerminalPodEviction(t *testing.T) {
if err != nil {
t.Fatalf("Eviction of pod failed %v", err)
}
pdbList, err = clientSet.PolicyV1beta1().PodDisruptionBudgets(ns.Name).List(context.TODO(), metav1.ListOptions{})
pdbList, err = clientSet.PolicyV1().PodDisruptionBudgets(ns.Name).List(context.TODO(), metav1.ListOptions{})
if err != nil {
t.Fatalf("Error while listing pod disruption budget")
}
@@ -252,7 +252,7 @@ func TestTerminalPodEviction(t *testing.T) {
t.Fatalf("Expected the pdb generation to be of same value %v but got %v", newPdb.Status.ObservedGeneration, oldPdb.Status.ObservedGeneration)
}
if err := clientSet.PolicyV1beta1().PodDisruptionBudgets(ns.Name).Delete(context.TODO(), pdb.Name, deleteOption); err != nil {
if err := clientSet.PolicyV1().PodDisruptionBudgets(ns.Name).Delete(context.TODO(), pdb.Name, deleteOption); err != nil {
t.Fatalf("Failed to delete pod disruption budget")
}
}
@@ -481,7 +481,7 @@ func waitToObservePods(t *testing.T, podInformer cache.SharedIndexInformer, podN
func waitPDBStable(t *testing.T, clientSet clientset.Interface, podNum int32, ns, pdbName string) {
if err := wait.PollImmediate(2*time.Second, 60*time.Second, func() (bool, error) {
pdb, err := clientSet.PolicyV1beta1().PodDisruptionBudgets(ns).Get(context.TODO(), pdbName, metav1.GetOptions{})
pdb, err := clientSet.PolicyV1().PodDisruptionBudgets(ns).Get(context.TODO(), pdbName, metav1.GetOptions{})
if err != nil {
return false, err
}

View File

@@ -99,7 +99,7 @@ func TestAPIServerMetrics(t *testing.T) {
}
// Make a request to a deprecated API to ensure there's at least one data point
if _, err := client.PolicyV1beta1().PodSecurityPolicies().List(context.TODO(), metav1.ListOptions{}); err != nil {
if _, err := client.StorageV1beta1().CSIStorageCapacities("default").List(context.TODO(), metav1.ListOptions{}); err != nil {
t.Fatalf("unexpected error getting rbac roles: %v", err)
}