Merge branch 'v1.7' into master
This commit is contained in:
commit
dad0e75121
38 changed files with 1171 additions and 235 deletions
|
@ -1222,6 +1222,41 @@ rateset:
|
|||
iPaths(onePath(iPath("/customheaders"), iBackend("service1", intstr.FromInt(80))))),
|
||||
),
|
||||
),
|
||||
buildIngress(
|
||||
iNamespace("testing"),
|
||||
iAnnotation(annotationKubernetesProtocol, "h2c"),
|
||||
iRules(
|
||||
iRule(
|
||||
iHost("protocol"),
|
||||
iPaths(onePath(iPath("/valid"), iBackend("service1", intstr.FromInt(80))))),
|
||||
),
|
||||
),
|
||||
buildIngress(
|
||||
iNamespace("testing"),
|
||||
iAnnotation(annotationKubernetesProtocol, "foobar"),
|
||||
iRules(
|
||||
iRule(
|
||||
iHost("protocol"),
|
||||
iPaths(onePath(iPath("/notvalid"), iBackend("service1", intstr.FromInt(80))))),
|
||||
),
|
||||
),
|
||||
buildIngress(
|
||||
iNamespace("testing"),
|
||||
iAnnotation(annotationKubernetesProtocol, "http"),
|
||||
iRules(
|
||||
iRule(
|
||||
iHost("protocol"),
|
||||
iPaths(onePath(iPath("/missmatch"), iBackend("serviceHTTPS", intstr.FromInt(443))))),
|
||||
),
|
||||
),
|
||||
buildIngress(
|
||||
iNamespace("testing"),
|
||||
iRules(
|
||||
iRule(
|
||||
iHost("protocol"),
|
||||
iPaths(onePath(iPath("/noAnnotation"), iBackend("serviceHTTPS", intstr.FromInt(443))))),
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
services := []*corev1.Service{
|
||||
|
@ -1243,6 +1278,16 @@ rateset:
|
|||
clusterIP("10.0.0.2"),
|
||||
sPorts(sPort(802, ""))),
|
||||
),
|
||||
buildService(
|
||||
sName("serviceHTTPS"),
|
||||
sNamespace("testing"),
|
||||
sUID("2"),
|
||||
sSpec(
|
||||
clusterIP("10.0.0.3"),
|
||||
sType("ExternalName"),
|
||||
sExternalName("example.com"),
|
||||
sPorts(sPort(443, "https"))),
|
||||
),
|
||||
}
|
||||
|
||||
secrets := []*corev1.Secret{
|
||||
|
@ -1350,6 +1395,28 @@ rateset:
|
|||
servers(),
|
||||
lbMethod("wrr"),
|
||||
),
|
||||
backend("protocol/valid",
|
||||
servers(
|
||||
server("h2c://example.com", weight(1)),
|
||||
server("h2c://example.com", weight(1))),
|
||||
lbMethod("wrr"),
|
||||
),
|
||||
backend("protocol/notvalid",
|
||||
servers(),
|
||||
lbMethod("wrr"),
|
||||
),
|
||||
backend("protocol/missmatch",
|
||||
servers(
|
||||
server("http://example.com", weight(1)),
|
||||
server("http://example.com", weight(1))),
|
||||
lbMethod("wrr"),
|
||||
),
|
||||
backend("protocol/noAnnotation",
|
||||
servers(
|
||||
server("https://example.com", weight(1)),
|
||||
server("https://example.com", weight(1))),
|
||||
lbMethod("wrr"),
|
||||
),
|
||||
),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
|
@ -1408,7 +1475,7 @@ rateset:
|
|||
frontend("rewrite/api",
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/api", "PathPrefix:/api;ReplacePathRegex: ^/api/(.*) /$1"),
|
||||
route("/api", "PathPrefix:/api;ReplacePathRegex: ^/api(.*) $1"),
|
||||
route("rewrite", "Host:rewrite")),
|
||||
),
|
||||
frontend("error-pages/errorpages",
|
||||
|
@ -1481,6 +1548,34 @@ rateset:
|
|||
route("root", "Host:root"),
|
||||
),
|
||||
),
|
||||
frontend("protocol/valid",
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/valid", "PathPrefix:/valid"),
|
||||
route("protocol", "Host:protocol"),
|
||||
),
|
||||
),
|
||||
frontend("protocol/notvalid",
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/notvalid", "PathPrefix:/notvalid"),
|
||||
route("protocol", "Host:protocol"),
|
||||
),
|
||||
),
|
||||
frontend("protocol/missmatch",
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/missmatch", "PathPrefix:/missmatch"),
|
||||
route("protocol", "Host:protocol"),
|
||||
),
|
||||
),
|
||||
frontend("protocol/noAnnotation",
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/noAnnotation", "PathPrefix:/noAnnotation"),
|
||||
route("protocol", "Host:protocol"),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue