mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2026-01-08 16:21:50 +00:00
Merge pull request #59042 from soltysh/issue25442
Automatic merge from submit-queue (batch tested with PRs 60302, 57921, 59042, 60126, 59561). 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>. Remove pkg/client/unversioned **What this PR does / why we need it**: This is removing unused package, and moves the used bits into appropriate placeholders. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #25442 **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` /assign @deads2k /assign @sttts
This commit is contained in:
@@ -34,7 +34,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion"
|
||||
conditions "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/kubectl"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
@@ -339,7 +338,7 @@ func RunRun(f cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *c
|
||||
leaveStdinOpen := cmdutil.GetFlagBool(cmd, "leave-stdin-open")
|
||||
waitForExitCode := !leaveStdinOpen && restartPolicy == api.RestartPolicyNever
|
||||
if waitForExitCode {
|
||||
pod, err = waitForPod(clientset.Core(), attachablePod.Namespace, attachablePod.Name, conditions.PodCompleted)
|
||||
pod, err = waitForPod(clientset.Core(), attachablePod.Namespace, attachablePod.Name, kubectl.PodCompleted)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -442,8 +441,8 @@ func waitForPod(podClient coreclient.PodsGetter, ns, name string, exitCondition
|
||||
}
|
||||
|
||||
func handleAttachPod(f cmdutil.Factory, podClient coreclient.PodsGetter, ns, name string, opts *AttachOptions) error {
|
||||
pod, err := waitForPod(podClient, ns, name, conditions.PodRunningAndReady)
|
||||
if err != nil && err != conditions.ErrPodCompleted {
|
||||
pod, err := waitForPod(podClient, ns, name, kubectl.PodRunningAndReady)
|
||||
if err != nil && err != kubectl.ErrPodCompleted {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user