use core client with explicit version globally
This commit is contained in:
@@ -495,7 +495,7 @@ func (f *Framework) CreateServiceForSimpleApp(contPort, svcPort int, appName str
|
||||
}
|
||||
}
|
||||
Logf("Creating a service-for-%v for selecting app=%v-pod", appName, appName)
|
||||
service, err := f.ClientSet.Core().Services(f.Namespace.Name).Create(&v1.Service{
|
||||
service, err := f.ClientSet.CoreV1().Services(f.Namespace.Name).Create(&v1.Service{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "service-for-" + appName,
|
||||
Labels: map[string]string{
|
||||
@@ -521,7 +521,7 @@ func (f *Framework) CreatePodsPerNodeForSimpleApp(appName string, podSpec func(n
|
||||
// one per node, but no more than maxCount.
|
||||
if i <= maxCount {
|
||||
Logf("%v/%v : Creating container with label app=%v-pod", i, maxCount, appName)
|
||||
_, err := f.ClientSet.Core().Pods(f.Namespace.Name).Create(&v1.Pod{
|
||||
_, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(&v1.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: fmt.Sprintf(appName+"-pod-%v", i),
|
||||
Labels: labels,
|
||||
@@ -707,9 +707,9 @@ func filterLabels(selectors map[string]string, cli clientset.Interface, ns strin
|
||||
if len(selectors) > 0 {
|
||||
selector = labels.SelectorFromSet(labels.Set(selectors))
|
||||
options := metav1.ListOptions{LabelSelector: selector.String()}
|
||||
pl, err = cli.Core().Pods(ns).List(options)
|
||||
pl, err = cli.CoreV1().Pods(ns).List(options)
|
||||
} else {
|
||||
pl, err = cli.Core().Pods(ns).List(metav1.ListOptions{})
|
||||
pl, err = cli.CoreV1().Pods(ns).List(metav1.ListOptions{})
|
||||
}
|
||||
return pl, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user