2020-12-10 13:58:04 +00:00
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: IngressRoute
|
|
|
|
metadata:
|
|
|
|
name: cross-ns-route
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
|
|
|
entryPoints:
|
|
|
|
- foo
|
|
|
|
|
|
|
|
routes:
|
2021-09-16 13:12:13 +00:00
|
|
|
- match: Host(`foo.com`) && PathPrefix(`/bar`)
|
|
|
|
kind: Rule
|
|
|
|
priority: 12
|
|
|
|
services:
|
|
|
|
- name: whoami-svc
|
|
|
|
namespace: cross-ns
|
|
|
|
port: 80
|
|
|
|
- name: tr-svc-wrr1
|
|
|
|
kind: TraefikService
|
|
|
|
- name: tr-svc-wrr2
|
|
|
|
namespace: cross-ns
|
|
|
|
kind: TraefikService
|
|
|
|
- name: tr-svc-mirror1
|
|
|
|
kind: TraefikService
|
|
|
|
- name: tr-svc-mirror2
|
|
|
|
namespace: cross-ns
|
|
|
|
kind: TraefikService
|
|
|
|
|
|
|
|
- match: Host(`bar.com`) && PathPrefix(`/foo`)
|
|
|
|
kind: Rule
|
|
|
|
services:
|
|
|
|
- name: whoami-svc
|
|
|
|
namespace: cross-ns
|
|
|
|
port: 80
|
|
|
|
serversTransport: test
|
2020-12-10 13:58:04 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: TraefikService
|
|
|
|
metadata:
|
|
|
|
name: tr-svc-wrr1
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
|
|
|
weighted:
|
|
|
|
services:
|
|
|
|
- name: whoami-svc
|
|
|
|
namespace: cross-ns
|
|
|
|
weight: 1
|
|
|
|
port: 80
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: TraefikService
|
|
|
|
metadata:
|
|
|
|
name: tr-svc-wrr2
|
|
|
|
namespace: cross-ns
|
|
|
|
|
|
|
|
spec:
|
|
|
|
weighted:
|
|
|
|
services:
|
|
|
|
- name: whoami-svc
|
|
|
|
weight: 1
|
|
|
|
port: 80
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: TraefikService
|
|
|
|
metadata:
|
|
|
|
name: tr-svc-mirror1
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
|
|
|
mirroring:
|
|
|
|
name: whoami
|
|
|
|
port: 80
|
|
|
|
mirrors:
|
|
|
|
- name: whoami-svc
|
|
|
|
namespace: cross-ns
|
|
|
|
percent: 20
|
|
|
|
port: 80
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: TraefikService
|
|
|
|
metadata:
|
|
|
|
name: tr-svc-mirror2
|
|
|
|
namespace: cross-ns
|
|
|
|
|
|
|
|
spec:
|
|
|
|
mirroring:
|
|
|
|
name: whoami-svc
|
|
|
|
port: 80
|
|
|
|
mirrors:
|
|
|
|
- name: whoami-svc
|
|
|
|
namespace: cross-ns
|
|
|
|
percent: 20
|
|
|
|
port: 80
|
2021-09-16 13:12:13 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: ServersTransport
|
|
|
|
metadata:
|
|
|
|
name: test
|
|
|
|
namespace: foo
|
|
|
|
|
|
|
|
spec:
|
|
|
|
serverName: "test"
|