2020-12-10 13:58:04 +00:00
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: IngressRoute
|
|
|
|
metadata:
|
|
|
|
name: test-crossnamespace.route
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
|
|
|
entryPoints:
|
|
|
|
- foo
|
|
|
|
|
|
|
|
routes:
|
|
|
|
- match: Host(`foo.com`) && PathPrefix(`/bar`)
|
|
|
|
kind: Rule
|
|
|
|
priority: 12
|
|
|
|
services:
|
|
|
|
- name: whoami
|
|
|
|
namespace: default
|
|
|
|
port: 80
|
|
|
|
middlewares:
|
|
|
|
- name: stripprefix
|
|
|
|
namespace: cross-ns
|
|
|
|
- match: Host(`foo.com`) && PathPrefix(`/bir`)
|
|
|
|
kind: Rule
|
|
|
|
priority: 12
|
|
|
|
services:
|
|
|
|
- name: whoami
|
|
|
|
namespace: default
|
|
|
|
port: 80
|
|
|
|
middlewares:
|
|
|
|
- name: test-errorpage
|
2021-08-05 15:42:08 +00:00
|
|
|
- match: Host(`foo.com`) && PathPrefix(`/bur`)
|
|
|
|
kind: Rule
|
|
|
|
priority: 12
|
|
|
|
services:
|
|
|
|
- name: whoami
|
|
|
|
namespace: default
|
|
|
|
port: 80
|
|
|
|
middlewares:
|
|
|
|
- name: cross-ns-stripprefix@kubernetescrd
|
2020-12-10 13:58:04 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: stripprefix
|
|
|
|
namespace: cross-ns
|
|
|
|
|
|
|
|
spec:
|
|
|
|
stripPrefix:
|
|
|
|
prefixes:
|
|
|
|
- /stripit
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: test-errorpage
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
errors:
|
|
|
|
status:
|
|
|
|
- 500-599
|
|
|
|
query: /{status}.html
|
|
|
|
service:
|
|
|
|
name: whoami-svc
|
|
|
|
namespace: cross-ns
|
|
|
|
port: 80
|