From 62157d9ad42a311dc4f79083f9be84f107deb226 Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Sat, 25 Apr 2020 20:23:40 -0500 Subject: [PATCH] Migrate Ingress from API extensions/v1beta1 to networking.k8s.io/v1beta1 Signed-off-by: Ruben Vargas --- pkg/controller/jaeger/ingress.go | 2 +- pkg/controller/jaeger/ingress_test.go | 2 +- pkg/ingress/query.go | 4 ++-- pkg/inventory/ingress.go | 2 +- pkg/inventory/ingress_test.go | 2 +- pkg/strategy/strategy.go | 2 +- pkg/strategy/strategy_test.go | 2 +- test/e2e/wait_util.go | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/controller/jaeger/ingress.go b/pkg/controller/jaeger/ingress.go index e60f686fd0..10cf5496a0 100644 --- a/pkg/controller/jaeger/ingress.go +++ b/pkg/controller/jaeger/ingress.go @@ -5,7 +5,7 @@ import ( log "github.com/sirupsen/logrus" "go.opentelemetry.io/otel/global" - "k8s.io/api/extensions/v1beta1" + "k8s.io/api/networking/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1" diff --git a/pkg/controller/jaeger/ingress_test.go b/pkg/controller/jaeger/ingress_test.go index fa963779b6..8feb7fdd2e 100644 --- a/pkg/controller/jaeger/ingress_test.go +++ b/pkg/controller/jaeger/ingress_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "k8s.io/api/extensions/v1beta1" + "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/ingress/query.go b/pkg/ingress/query.go index 920ccb1a0b..164a353f02 100644 --- a/pkg/ingress/query.go +++ b/pkg/ingress/query.go @@ -3,7 +3,7 @@ package ingress import ( "fmt" - extv1beta1 "k8s.io/api/extensions/v1beta1" + extv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -49,7 +49,7 @@ func (i *QueryIngress) Get() *extv1beta1.Ingress { return &extv1beta1.Ingress{ TypeMeta: metav1.TypeMeta{ Kind: "Ingress", - APIVersion: "extensions/v1beta1", + APIVersion: "networking/v1beta1", }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-query", i.jaeger.Name), diff --git a/pkg/inventory/ingress.go b/pkg/inventory/ingress.go index ab54ee4984..02992af33e 100644 --- a/pkg/inventory/ingress.go +++ b/pkg/inventory/ingress.go @@ -3,7 +3,7 @@ package inventory import ( "fmt" - "k8s.io/api/extensions/v1beta1" + "k8s.io/api/networking/v1beta1" "github.com/jaegertracing/jaeger-operator/pkg/util" ) diff --git a/pkg/inventory/ingress_test.go b/pkg/inventory/ingress_test.go index fd1d313995..186aace722 100644 --- a/pkg/inventory/ingress_test.go +++ b/pkg/inventory/ingress_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "k8s.io/api/extensions/v1beta1" + "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/strategy/strategy.go b/pkg/strategy/strategy.go index 7fe03ec84e..8b4d81361d 100644 --- a/pkg/strategy/strategy.go +++ b/pkg/strategy/strategy.go @@ -7,7 +7,7 @@ import ( batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" corev1 "k8s.io/api/core/v1" - "k8s.io/api/extensions/v1beta1" + "k8s.io/api/networking/v1beta1" rbac "k8s.io/api/rbac/v1" v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1" diff --git a/pkg/strategy/strategy_test.go b/pkg/strategy/strategy_test.go index 8e6f36ad8f..021b1bba14 100644 --- a/pkg/strategy/strategy_test.go +++ b/pkg/strategy/strategy_test.go @@ -9,7 +9,7 @@ import ( batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" v1 "k8s.io/api/core/v1" - "k8s.io/api/extensions/v1beta1" + "k8s.io/api/networking/v1beta1" rbac "k8s.io/api/rbac/v1" kafkav1beta1 "github.com/jaegertracing/jaeger-operator/pkg/apis/kafka/v1beta1" diff --git a/test/e2e/wait_util.go b/test/e2e/wait_util.go index e701c6427f..ba52a6e14a 100644 --- a/test/e2e/wait_util.go +++ b/test/e2e/wait_util.go @@ -8,7 +8,7 @@ import ( "github.com/operator-framework/operator-sdk/pkg/test/e2eutil" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" - "k8s.io/api/extensions/v1beta1" + "k8s.io/api/networking/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -77,7 +77,7 @@ func WaitForIngress(t *testing.T, kubeclient kubernetes.Interface, namespace, na start := time.Now() var ingress *v1beta1.Ingress err := wait.Poll(retryInterval, timeout, func() (done bool, err error) { - ingress, err = kubeclient.ExtensionsV1beta1().Ingresses(namespace).Get(name, metav1.GetOptions{}) + ingress, err = kubeclient.NetworkingV1beta1().Ingresses(namespace).Get(name, metav1.GetOptions{}) if err != nil { if apierrors.IsNotFound(err) { t.Logf("Waiting for availability of %s ingress\n", name)