traefik/pkg/provider/kubernetes/crd/fixtures/with_services_lb1.yml
2024-06-21 14:56:03 +02:00

194 lines
2.7 KiB
YAML

---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
name: whoami4-abc
namespace: default
labels:
kubernetes.io/service-name: whoami4
addressType: IPv4
ports:
- name: web
port: 80
endpoints:
- addresses:
- 10.10.0.1
- 10.10.0.2
conditions:
ready: true
---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
name: whoami5-abc
namespace: default
labels:
kubernetes.io/service-name: whoami5
addressType: IPv4
ports:
- name: web
port: 8080
endpoints:
- addresses:
- 10.10.0.3
- 10.10.0.4
conditions:
ready: true
---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
name: whoami6-abc
namespace: default
labels:
kubernetes.io/service-name: whoami6
addressType: IPv4
ports:
- name: web
port: 80
endpoints:
- addresses:
- 10.10.0.5
- 10.10.0.6
conditions:
ready: true
---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
name: whoami7-abc
namespace: default
labels:
kubernetes.io/service-name: whoami7
addressType: IPv4
ports:
- name: web
port: 8080
endpoints:
- addresses:
- 10.10.0.7
- 10.10.0.8
conditions:
ready: true
---
apiVersion: v1
kind: Service
metadata:
name: whoami4
namespace: default
spec:
ports:
- name: web
port: 80
selector:
app: traefiklabs
task: whoami4
---
apiVersion: v1
kind: Service
metadata:
name: whoami5
namespace: default
spec:
ports:
- name: web
port: 8080
selector:
app: traefiklabs
task: whoami5
---
apiVersion: v1
kind: Service
metadata:
name: whoami6
namespace: default
spec:
ports:
- name: web
port: 80
selector:
app: traefiklabs
task: whoami6
---
apiVersion: v1
kind: Service
metadata:
name: whoami7
namespace: default
spec:
ports:
- name: web
port: 8080
selector:
app: traefiklabs
task: whoami7
---
apiVersion: traefik.io/v1alpha1
kind: TraefikService
metadata:
name: wrr1
namespace: default
spec:
weighted:
services:
- name: whoami4
port: 80
weight: 1
- name: whoami5
port: 8080
weight: 1
---
apiVersion: traefik.io/v1alpha1
kind: TraefikService
metadata:
name: wrr2
namespace: default
spec:
weighted:
services:
- name: whoami6
port: 80
weight: 1
- name: whoami7
port: 8080
weight: 1
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: test.route
namespace: default
spec:
entryPoints:
- web
routes:
- match: Host(`foo.com`) && PathPrefix(`/foo`)
kind: Rule
priority: 12
services:
- name: wrr1
kind: TraefikService
- name: wrr2
kind: TraefikService