fix: Core() is deprecated use CoreV1() instead.
This commit is contained in:
parent
94487ca1b7
commit
b3cec74e79
4 changed files with 6 additions and 6 deletions
|
|
@ -73,7 +73,7 @@ func (f *Framework) EnsureDeployment(deployment *extensions.Deployment) (*extens
|
|||
|
||||
func (f *Framework) WaitForPodsReady(timeout time.Duration, expectedReplicas int, opts metav1.ListOptions) error {
|
||||
return wait.Poll(time.Second, timeout, func() (bool, error) {
|
||||
pl, err := f.KubeClientSet.Core().Pods(f.Namespace.Name).List(opts)
|
||||
pl, err := f.KubeClientSet.CoreV1().Pods(f.Namespace.Name).List(opts)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ func CreateKubeNamespace(baseName string, c kubernetes.Interface) (*v1.Namespace
|
|||
var got *v1.Namespace
|
||||
err := wait.PollImmediate(Poll, defaultTimeout, func() (bool, error) {
|
||||
var err error
|
||||
got, err = c.Core().Namespaces().Create(ns)
|
||||
got, err = c.CoreV1().Namespaces().Create(ns)
|
||||
if err != nil {
|
||||
Logf("Unexpected error while creating namespace: %v", err)
|
||||
return false, nil
|
||||
|
|
@ -121,7 +121,7 @@ func CreateKubeNamespace(baseName string, c kubernetes.Interface) (*v1.Namespace
|
|||
|
||||
// DeleteKubeNamespace deletes a namespace and all the objects inside
|
||||
func DeleteKubeNamespace(c kubernetes.Interface, namespace string) error {
|
||||
return c.Core().Namespaces().Delete(namespace, metav1.NewDeleteOptions(0))
|
||||
return c.CoreV1().Namespaces().Delete(namespace, metav1.NewDeleteOptions(0))
|
||||
}
|
||||
|
||||
func ExpectNoError(err error, explain ...interface{}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue