ROUTER: IMPORTANT extensions client disappeared
@@ -10,8 +10,8 @@ import (
g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"
+ appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
- extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
@@ -74,7 +74,7 @@ var _ = g.Describe("[Conformance][Area:Networking][Feature:Router]", func() {
g.Describe("The HAProxy router", func() {
g.It("converges when multiple routers are writing status", func() {
g.By("deploying a scaled out namespace scoped router")
- rs, err := oc.KubeClient().ExtensionsV1beta1().ReplicaSets(ns).Create(
+ rs, err := oc.KubeClient().AppsV1().ReplicaSets(ns).Create(
scaledRouter(
routerImage,
[]string{
@@ -156,7 +156,7 @@ var _ = g.Describe("[Conformance][Area:Networking][Feature:Router]", func() {
g.It("converges when multiple routers are writing conflicting status", func() {
g.By("deploying a scaled out namespace scoped router")
- rs, err := oc.KubeClient().ExtensionsV1beta1().ReplicaSets(ns).Create(
+ rs, err := oc.KubeClient().AppsV1().ReplicaSets(ns).Create(
scaledRouter(
routerImage,
[]string{
@@ -298,14 +298,14 @@ func findIngress(route *routev1.Route, name string) *routev1.RouteIngress {
return nil
}
-func scaledRouter(image string, args []string) *extensionsv1beta1.ReplicaSet {
+func scaledRouter(image string, args []string) *appsv1.ReplicaSet {
one := int64(1)
scale := int32(3)
- return &extensionsv1beta1.ReplicaSet{
+ return &appsv1.ReplicaSet{
ObjectMeta: metav1.ObjectMeta{
Name: "router",
},
- Spec: extensionsv1beta1.ReplicaSetSpec{
+ Spec: appsv1.ReplicaSetSpec{
Replicas: &scale,
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"app": "router"},
@@ -345,7 +345,7 @@ func outputIngress(routes ...routev1.Route) {
e2e.Logf("Routes:\n%s", b.String())
}
-func verifyCommandEquivalent(c clientset.Interface, rs *extensionsv1beta1.ReplicaSet, cmd string) {
+func verifyCommandEquivalent(c clientset.Interface, rs *appsv1.ReplicaSet, cmd string) {
selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector)
o.Expect(err).NotTo(o.HaveOccurred())
podList, err := c.CoreV1().Pods(rs.Namespace).List(metav1.ListOptions{LabelSelector: selector.String()})
