fix: Add pathType to create networking/v1 ingress (#2164)
* fix: Add pathType to create networking/v1 ingress Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -55,6 +55,7 @@ func GetIngressSpec(namespace string, trigger *fv1.HTTPTrigger) *v1.Ingress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var pathType v1.PathType = v1.PathTypeImplementationSpecific
|
||||||
ing := &v1.Ingress{
|
ing := &v1.Ingress{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Labels: GetDeployLabels(trigger),
|
Labels: GetDeployLabels(trigger),
|
||||||
@@ -83,6 +84,7 @@ func GetIngressSpec(namespace string, trigger *fv1.HTTPTrigger) *v1.Ingress {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: path,
|
Path: path,
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
ingressNS string
|
ingressNS string
|
||||||
trigger *fv1.HTTPTrigger
|
trigger *fv1.HTTPTrigger
|
||||||
}
|
}
|
||||||
|
var pathType v1.PathType = v1.PathTypeImplementationSpecific
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
args args
|
args args
|
||||||
@@ -85,6 +86,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/bar",
|
Path: "/foo/bar",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -146,6 +148,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/bar",
|
Path: "/foo/bar",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -205,6 +208,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/bar",
|
Path: "/foo/bar",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -264,6 +268,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/{bar}",
|
Path: "/foo/{bar}",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -323,6 +328,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/{bar}",
|
Path: "/foo/{bar}",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -383,6 +389,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/bar",
|
Path: "/foo/bar",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -442,6 +449,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/bar",
|
Path: "/foo/bar",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -513,6 +521,7 @@ func TestGetIngressSpec(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Path: "/foo/bar",
|
Path: "/foo/bar",
|
||||||
|
PathType: &pathType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user