fix ingress syntax. (#7867)
This commit is contained in:
parent
e34ca93ad6
commit
ed34f6c93d
21 changed files with 204 additions and 105 deletions
|
|
@ -74,9 +74,13 @@ spec:
|
|||
- host: app.example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: example-service
|
||||
servicePort: fastcgi
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: example-service
|
||||
port:
|
||||
name: fastcgi
|
||||
```
|
||||
|
||||
## FastCGI Ingress Annotations
|
||||
|
|
|
|||
|
|
@ -27,9 +27,12 @@ spec:
|
|||
http:
|
||||
paths:
|
||||
- path: /foo/.*
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: test
|
||||
servicePort: 80
|
||||
service:
|
||||
name: test
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
The preceding ingress definition would translate to the following location block within the NGINX configuration for the `test.com` server:
|
||||
|
|
@ -61,13 +64,19 @@ spec:
|
|||
http:
|
||||
paths:
|
||||
- path: /foo/bar
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: service1
|
||||
servicePort: 80
|
||||
service:
|
||||
name: service1
|
||||
port:
|
||||
number: 80
|
||||
- path: /foo/bar/
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: service2
|
||||
servicePort: 80
|
||||
service:
|
||||
name: service2
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
```yaml
|
||||
|
|
@ -83,9 +92,12 @@ spec:
|
|||
http:
|
||||
paths:
|
||||
- path: /foo/bar/(.+)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: service3
|
||||
servicePort: 80
|
||||
service:
|
||||
name: service3
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
The ingress controller would define the following location blocks, in order of descending length, within the NGINX template for the `test.com` server:
|
||||
|
|
@ -137,13 +149,19 @@ spec:
|
|||
http:
|
||||
paths:
|
||||
- path: /foo/bar/bar
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: test
|
||||
servicePort: 80
|
||||
service:
|
||||
name: test
|
||||
port:
|
||||
number: 80
|
||||
- path: /foo/bar/[A-Z0-9]{3}
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: test
|
||||
servicePort: 80
|
||||
service:
|
||||
name: test
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
The ingress controller would define the following location blocks (in this order) within the NGINX template for the `test.com` server:
|
||||
|
|
|
|||
|
|
@ -189,10 +189,13 @@ In the Zipkin interface we can see the details:
|
|||
- host: example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: echoheaders-x
|
||||
servicePort: 80
|
||||
path: /echo
|
||||
- path: /echo
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: echoheaders-x
|
||||
port:
|
||||
number: 80
|
||||
' | kubectl apply -f -
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue