mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #56263 from supereagle/batch-client-with-version
Automatic merge from submit-queue (batch tested with PRs 56217, 56268, 56263, 56328, 56200). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Use batch client with explicit version **What this PR does / why we need it**: **Which issue(s) this PR fixes** : Fixes partially #55993 **Special notes for your reviewer**: /cc @caesarxuchao @sttts **Release note**: ```release-note NONE ```
This commit is contained in:
commit
778c60a6c0
@ -335,7 +335,7 @@ func (o *DrainOptions) getController(namespace string, controllerRef *metav1.Own
|
||||
case "DaemonSet":
|
||||
return o.client.ExtensionsV1beta1().DaemonSets(namespace).Get(controllerRef.Name, metav1.GetOptions{})
|
||||
case "Job":
|
||||
return o.client.Batch().Jobs(namespace).Get(controllerRef.Name, metav1.GetOptions{})
|
||||
return o.client.BatchV1().Jobs(namespace).Get(controllerRef.Name, metav1.GetOptions{})
|
||||
case "ReplicaSet":
|
||||
return o.client.ExtensionsV1beta1().ReplicaSets(namespace).Get(controllerRef.Name, metav1.GetOptions{})
|
||||
case "StatefulSet":
|
||||
|
@ -255,7 +255,7 @@ func verifyRemainingCronJobsJobsPods(f *framework.Framework, clientSet clientset
|
||||
By(fmt.Sprintf("expected %d cronjobs, got %d cronjobs", cjNum, len(cronJobs.Items)))
|
||||
}
|
||||
|
||||
jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(metav1.ListOptions{})
|
||||
jobs, err := f.ClientSet.BatchV1().Jobs(f.Namespace.Name).List(metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("Failed to list jobs: %v", err)
|
||||
}
|
||||
@ -974,7 +974,7 @@ var _ = SIGDescribe("Garbage collector", func() {
|
||||
|
||||
By("Wait for the CronJob to create new Job")
|
||||
err = wait.PollImmediate(500*time.Millisecond, 2*time.Minute, func() (bool, error) {
|
||||
jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(metav1.ListOptions{})
|
||||
jobs, err := f.ClientSet.BatchV1().Jobs(f.Namespace.Name).List(metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("Failed to list jobs: %v", err)
|
||||
}
|
||||
|
@ -1000,7 +1000,7 @@ func createBootstrapperJob(config *localTestConfig) {
|
||||
},
|
||||
},
|
||||
}
|
||||
job, err := config.client.Batch().Jobs(config.ns).Create(bootJob)
|
||||
job, err := config.client.BatchV1().Jobs(config.ns).Create(bootJob)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
err = framework.WaitForJobFinish(config.client, config.ns, job.Name, 1)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
Loading…
Reference in New Issue
Block a user