1
0
Fork 0

Respect service.nativelb=false annotation when nativeLBByDefault is enabled

This commit is contained in:
Simon Delicata 2025-07-08 11:58:04 +02:00 committed by GitHub
parent d674b393a8
commit cdacf0bca8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 669 additions and 13 deletions

View file

@ -298,11 +298,46 @@ metadata:
spec:
ports:
- name: myapp
port: 8000
- name: tcp
protocol: TCP
port: 9000
type: ClusterIP
clusterIP: 10.10.0.1
---
apiVersion: v1
kind: Service
metadata:
name: native-disabled-svc-tcp
namespace: default
spec:
ports:
- name: tcp
protocol: TCP
port: 9000
type: ClusterIP
clusterIP: 10.10.0.1
---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
name: native-disabled-tcp-abc
namespace: default
labels:
kubernetes.io/service-name: native-disabled-svc-tcp
addressType: IPv4
ports:
- name: tcp
protocol: TCP
port: 9000
endpoints:
- addresses:
- 10.10.0.30
- 10.10.0.31
conditions:
ready: true
---
apiVersion: v1
kind: Service

View file

@ -12,4 +12,4 @@ spec:
- match: HostSNI(`foo.com`)
services:
- name: native-svc-tcp
port: 8000
port: 9000

View file

@ -12,5 +12,5 @@ spec:
- match: HostSNI(`foo.com`)
services:
- name: native-svc-tcp
port: 8000
port: 9000
nativeLB: true

View file

@ -0,0 +1,12 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: tcp.route.native-disabled
namespace: default
spec:
routes:
- match: HostSNI(`foo.com`)
services:
- name: native-disabled-svc-tcp
port: 9000
nativeLB: false