Migrate to new networking.k8s.io/v1beta1 package
This commit is contained in:
parent
8cee8d5d9b
commit
84102eec2b
113 changed files with 834 additions and 648 deletions
|
|
@ -3,8 +3,8 @@
|
|||
"isIPV6Enabled": true,
|
||||
"cfg": {
|
||||
"disable-ipv6": false,
|
||||
"bind-address-ipv4": [ "1.1.1.1" , "2.2.2.2"],
|
||||
"bind-address-ipv6": [ "[2001:db8:a0b:12f0::1]" ,"[3731:54:65fe:2::a7]" ,"[33:33:33::33::33]" ],
|
||||
"bind-address-ipv4": ["1.1.1.1", "2.2.2.2"],
|
||||
"bind-address-ipv6": ["[2001:db8:a0b:12f0::1]", "[3731:54:65fe:2::a7]", "[33:33:33::33::33]"],
|
||||
"backend": {
|
||||
"custom-http-errors": [404],
|
||||
"proxy-buffers-number": "4",
|
||||
|
|
@ -57213,4 +57213,4 @@
|
|||
"failTimeout": 0
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
@ -28,6 +28,12 @@ patchesJson6902:
|
|||
kind: Deployment
|
||||
name: nginx-ingress-controller
|
||||
version: v1
|
||||
- path: role.yaml
|
||||
target:
|
||||
group: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: nginx-ingress-role
|
||||
version: v1beta1
|
||||
images:
|
||||
- name: quay.io/kubernetes-ingress-controller/nginx-ingress-controller
|
||||
newName: ingress-controller/nginx-ingress-controller
|
||||
|
|
|
|||
3
test/e2e-image/overlay/role.yaml
Normal file
3
test/e2e-image/overlay/role.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
- op: add
|
||||
path: /rules/1/resourceNames/-1
|
||||
value: "ingress-controller-leader-testclass"
|
||||
|
|
@ -26,7 +26,7 @@ import (
|
|||
. "github.com/onsi/gomega"
|
||||
"github.com/parnurzeal/gorequest"
|
||||
|
||||
"k8s.io/api/extensions/v1beta1"
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
|
|
@ -142,29 +142,29 @@ var _ = framework.IngressNginxDescribe("Annotations - Affinity/Sticky Sessions",
|
|||
"nginx.ingress.kubernetes.io/session-cookie-name": "SERVERID",
|
||||
}
|
||||
|
||||
f.EnsureIngress(&v1beta1.Ingress{
|
||||
f.EnsureIngress(&extensions.Ingress{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: host,
|
||||
Namespace: f.Namespace,
|
||||
Annotations: annotations,
|
||||
},
|
||||
Spec: v1beta1.IngressSpec{
|
||||
Rules: []v1beta1.IngressRule{
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{
|
||||
{
|
||||
Host: host,
|
||||
IngressRuleValue: v1beta1.IngressRuleValue{
|
||||
HTTP: &v1beta1.HTTPIngressRuleValue{
|
||||
Paths: []v1beta1.HTTPIngressPath{
|
||||
IngressRuleValue: extensions.IngressRuleValue{
|
||||
HTTP: &extensions.HTTPIngressRuleValue{
|
||||
Paths: []extensions.HTTPIngressPath{
|
||||
{
|
||||
Path: "/something",
|
||||
Backend: v1beta1.IngressBackend{
|
||||
Backend: extensions.IngressBackend{
|
||||
ServiceName: "http-svc",
|
||||
ServicePort: intstr.FromInt(80),
|
||||
},
|
||||
},
|
||||
{
|
||||
Path: "/somewhereelese",
|
||||
Backend: v1beta1.IngressBackend{
|
||||
Backend: extensions.IngressBackend{
|
||||
ServiceName: "http-svc",
|
||||
ServicePort: intstr.FromInt(80),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,13 +19,15 @@ package defaultbackend
|
|||
import (
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/parnurzeal/gorequest"
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/ingress-nginx/test/e2e/framework"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var _ = framework.IngressNginxDescribe("Default backend with hosts", func() {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/parnurzeal/gorequest"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/api/extensions/v1beta1"
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
|
|
@ -85,23 +85,23 @@ var _ = framework.IngressNginxDescribe("Service backend - 503", func() {
|
|||
|
||||
})
|
||||
|
||||
func buildIngressWithNonexistentService(host, namespace, path string) *v1beta1.Ingress {
|
||||
func buildIngressWithNonexistentService(host, namespace, path string) *extensions.Ingress {
|
||||
backendService := "nonexistent-svc"
|
||||
return &v1beta1.Ingress{
|
||||
return &extensions.Ingress{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: host,
|
||||
Namespace: namespace,
|
||||
},
|
||||
Spec: v1beta1.IngressSpec{
|
||||
Rules: []v1beta1.IngressRule{
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{
|
||||
{
|
||||
Host: host,
|
||||
IngressRuleValue: v1beta1.IngressRuleValue{
|
||||
HTTP: &v1beta1.HTTPIngressRuleValue{
|
||||
Paths: []v1beta1.HTTPIngressPath{
|
||||
IngressRuleValue: extensions.IngressRuleValue{
|
||||
HTTP: &extensions.HTTPIngressRuleValue{
|
||||
Paths: []extensions.HTTPIngressPath{
|
||||
{
|
||||
Path: path,
|
||||
Backend: v1beta1.IngressBackend{
|
||||
Backend: extensions.IngressBackend{
|
||||
ServiceName: backendService,
|
||||
ServicePort: intstr.FromInt(80),
|
||||
},
|
||||
|
|
@ -115,23 +115,23 @@ func buildIngressWithNonexistentService(host, namespace, path string) *v1beta1.I
|
|||
}
|
||||
}
|
||||
|
||||
func buildIngressWithUnavailableServiceEndpoints(host, namespace, path string) (*v1beta1.Ingress, *corev1.Service) {
|
||||
func buildIngressWithUnavailableServiceEndpoints(host, namespace, path string) (*extensions.Ingress, *corev1.Service) {
|
||||
backendService := "unavailable-svc"
|
||||
return &v1beta1.Ingress{
|
||||
return &extensions.Ingress{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: host,
|
||||
Namespace: namespace,
|
||||
},
|
||||
Spec: v1beta1.IngressSpec{
|
||||
Rules: []v1beta1.IngressRule{
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{
|
||||
{
|
||||
Host: host,
|
||||
IngressRuleValue: v1beta1.IngressRuleValue{
|
||||
HTTP: &v1beta1.HTTPIngressRuleValue{
|
||||
Paths: []v1beta1.HTTPIngressPath{
|
||||
IngressRuleValue: extensions.IngressRuleValue{
|
||||
HTTP: &extensions.HTTPIngressRuleValue{
|
||||
Paths: []extensions.HTTPIngressPath{
|
||||
{
|
||||
Path: path,
|
||||
Backend: v1beta1.IngressBackend{
|
||||
Backend: extensions.IngressBackend{
|
||||
ServiceName: backendService,
|
||||
ServicePort: intstr.FromInt(80),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
"github.com/parnurzeal/gorequest"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/api/extensions/v1beta1"
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/ingress-nginx/test/e2e/framework"
|
||||
|
|
@ -104,8 +104,8 @@ var _ = framework.IngressNginxDescribe("No Auth locations", func() {
|
|||
})
|
||||
})
|
||||
|
||||
func buildBasicAuthIngressWithSecondPath(host, namespace, secretName, pathName string) *v1beta1.Ingress {
|
||||
return &v1beta1.Ingress{
|
||||
func buildBasicAuthIngressWithSecondPath(host, namespace, secretName, pathName string) *extensions.Ingress {
|
||||
return &extensions.Ingress{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: host,
|
||||
Namespace: namespace,
|
||||
|
|
@ -114,23 +114,23 @@ func buildBasicAuthIngressWithSecondPath(host, namespace, secretName, pathName s
|
|||
"nginx.ingress.kubernetes.io/auth-realm": "test auth",
|
||||
},
|
||||
},
|
||||
Spec: v1beta1.IngressSpec{
|
||||
Rules: []v1beta1.IngressRule{
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{
|
||||
{
|
||||
Host: host,
|
||||
IngressRuleValue: v1beta1.IngressRuleValue{
|
||||
HTTP: &v1beta1.HTTPIngressRuleValue{
|
||||
Paths: []v1beta1.HTTPIngressPath{
|
||||
IngressRuleValue: extensions.IngressRuleValue{
|
||||
HTTP: &extensions.HTTPIngressRuleValue{
|
||||
Paths: []extensions.HTTPIngressPath{
|
||||
{
|
||||
Path: "/",
|
||||
Backend: v1beta1.IngressBackend{
|
||||
Backend: extensions.IngressBackend{
|
||||
ServiceName: "http-svc",
|
||||
ServicePort: intstr.FromInt(80),
|
||||
},
|
||||
},
|
||||
{
|
||||
Path: pathName,
|
||||
Backend: v1beta1.IngressBackend{
|
||||
Backend: extensions.IngressBackend{
|
||||
ServiceName: "http-svc",
|
||||
ServicePort: intstr.FromInt(80),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
. "github.com/onsi/ginkgo"
|
||||
|
||||
"k8s.io/api/extensions/v1beta1"
|
||||
extensions "k8s.io/api/extensions/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(&v1beta1.Ingress{
|
||||
f.EnsureIngress(&extensions.Ingress{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: serverTokens,
|
||||
Namespace: f.Namespace,
|
||||
Annotations: map[string]string{},
|
||||
},
|
||||
Spec: v1beta1.IngressSpec{
|
||||
Rules: []v1beta1.IngressRule{
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{
|
||||
{
|
||||
Host: serverTokens,
|
||||
IngressRuleValue: v1beta1.IngressRuleValue{
|
||||
HTTP: &v1beta1.HTTPIngressRuleValue{
|
||||
Paths: []v1beta1.HTTPIngressPath{
|
||||
IngressRuleValue: extensions.IngressRuleValue{
|
||||
HTTP: &extensions.HTTPIngressRuleValue{
|
||||
Paths: []extensions.HTTPIngressPath{
|
||||
{
|
||||
Path: "/",
|
||||
Backend: v1beta1.IngressBackend{
|
||||
Backend: extensions.IngressBackend{
|
||||
ServiceName: "http-svc",
|
||||
ServicePort: intstr.FromInt(80),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue