Migrate ingress definitions from extensions to networking.k8s.io

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-12-12 20:12:12 -03:00
parent be1907142b
commit 0dce5be743
49 changed files with 186 additions and 189 deletions

View file

@ -21,7 +21,7 @@ import (
. "github.com/onsi/ginkgo"
extensions "k8s.io/api/extensions/v1beta1"
networking "k8s.io/api/networking/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/ingress-nginx/test/e2e/framework"
@ -53,22 +53,22 @@ var _ = framework.IngressNginxDescribe("Server Tokens", func() {
It("should exists Server header in the response when is enabled", func() {
f.UpdateNginxConfigMapData(serverTokens, "true")
f.EnsureIngress(&extensions.Ingress{
f.EnsureIngress(&networking.Ingress{
ObjectMeta: metav1.ObjectMeta{
Name: serverTokens,
Namespace: f.Namespace,
Annotations: map[string]string{},
},
Spec: extensions.IngressSpec{
Rules: []extensions.IngressRule{
Spec: networking.IngressSpec{
Rules: []networking.IngressRule{
{
Host: serverTokens,
IngressRuleValue: extensions.IngressRuleValue{
HTTP: &extensions.HTTPIngressRuleValue{
Paths: []extensions.HTTPIngressPath{
IngressRuleValue: networking.IngressRuleValue{
HTTP: &networking.HTTPIngressRuleValue{
Paths: []networking.HTTPIngressPath{
{
Path: "/",
Backend: extensions.IngressBackend{
Backend: networking.IngressBackend{
ServiceName: framework.EchoService,
ServicePort: intstr.FromInt(80),
},