ref(wait): remove versioned type, use unversioned instead

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
pull/6608/head
Matthew Fisher 5 years ago
parent a4dd603f78
commit f55a64240f
No known key found for this signature in database
GPG Key ID: 92AA783CBAAE8E3B

@ -61,7 +61,7 @@ func (w *waiter) waitForResources(created ResourceList) error {
) )
switch value := AsVersioned(v).(type) { switch value := AsVersioned(v).(type) {
case *corev1.Pod: case *corev1.Pod:
pod, err := w.c.CoreV1().Pods(value.Namespace).Get(value.Name, metav1.GetOptions{}) pod, err := w.c.CoreV1().Pods(v.Namespace).Get(v.Name, metav1.GetOptions{})
if err != nil || !w.isPodReady(pod) { if err != nil || !w.isPodReady(pod) {
return false, err return false, err
} }
@ -83,7 +83,7 @@ func (w *waiter) waitForResources(created ResourceList) error {
return false, nil return false, nil
} }
case *corev1.PersistentVolumeClaim: case *corev1.PersistentVolumeClaim:
claim, err := w.c.CoreV1().PersistentVolumeClaims(value.Namespace).Get(value.Name, metav1.GetOptions{}) claim, err := w.c.CoreV1().PersistentVolumeClaims(v.Namespace).Get(v.Name, metav1.GetOptions{})
if err != nil { if err != nil {
return false, err return false, err
} }
@ -91,7 +91,7 @@ func (w *waiter) waitForResources(created ResourceList) error {
return false, nil return false, nil
} }
case *corev1.Service: case *corev1.Service:
svc, err := w.c.CoreV1().Services(value.Namespace).Get(value.Name, metav1.GetOptions{}) svc, err := w.c.CoreV1().Services(v.Namespace).Get(v.Name, metav1.GetOptions{})
if err != nil { if err != nil {
return false, err return false, err
} }

Loading…
Cancel
Save