92 lines
1.5 KiB
YAML
92 lines
1.5 KiB
YAML
|
apiVersion: traefik.containo.us/v1alpha1
|
||
|
kind: IngressRoute
|
||
|
metadata:
|
||
|
name: cross-ns-route
|
||
|
namespace: default
|
||
|
|
||
|
spec:
|
||
|
entryPoints:
|
||
|
- foo
|
||
|
|
||
|
routes:
|
||
|
- 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
|
||
|
|
||
|
---
|
||
|
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
|