From 2d617b3a655fcd7729423d813a4a22750f20e67e Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Fri, 18 Apr 2025 10:58:04 +0200 Subject: [PATCH] Remove default load-balancing strategy from CRD --- .../dynamic-configuration/kubernetes-crd-definition-v1.yml | 5 ----- .../dynamic-configuration/traefik.io_ingressroutes.yaml | 1 - .../dynamic-configuration/traefik.io_middlewares.yaml | 1 - .../dynamic-configuration/traefik.io_traefikservices.yaml | 3 --- integration/fixtures/k8s/01-traefik-crd.yml | 5 ----- integration/testdata/rawdata-redis.json | 1 - .../kubernetes/crd/traefikio/v1alpha1/ingressroute.go | 2 +- 7 files changed, 1 insertion(+), 17 deletions(-) diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml index e97835ef1..6bbc5c1ad 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml @@ -290,7 +290,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -1223,7 +1222,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -2986,7 +2984,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -3114,7 +3111,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -3320,7 +3316,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). diff --git a/docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml b/docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml index ed13f3d51..f2e457395 100644 --- a/docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml @@ -290,7 +290,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). diff --git a/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml b/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml index 404d1d3b6..f45b0b68f 100644 --- a/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml @@ -454,7 +454,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). diff --git a/docs/content/reference/dynamic-configuration/traefik.io_traefikservices.yaml b/docs/content/reference/dynamic-configuration/traefik.io_traefikservices.yaml index 340b36f68..6715233b3 100644 --- a/docs/content/reference/dynamic-configuration/traefik.io_traefikservices.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_traefikservices.yaml @@ -314,7 +314,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -442,7 +441,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -648,7 +646,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). diff --git a/integration/fixtures/k8s/01-traefik-crd.yml b/integration/fixtures/k8s/01-traefik-crd.yml index e97835ef1..6bbc5c1ad 100644 --- a/integration/fixtures/k8s/01-traefik-crd.yml +++ b/integration/fixtures/k8s/01-traefik-crd.yml @@ -290,7 +290,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -1223,7 +1222,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -2986,7 +2984,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -3114,7 +3111,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). @@ -3320,7 +3316,6 @@ spec: type: object type: object strategy: - default: wrr description: |- Strategy defines the load balancing strategy between the servers. Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). diff --git a/integration/testdata/rawdata-redis.json b/integration/testdata/rawdata-redis.json index 57c59bafb..381d92df5 100644 --- a/integration/testdata/rawdata-redis.json +++ b/integration/testdata/rawdata-redis.json @@ -244,7 +244,6 @@ "url": "http://10.0.1.3:8889" } ], - "strategy": "wrr", "passHostHeader": true, "responseForwarding": { "flushInterval": "100ms" diff --git a/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroute.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroute.go index 6186207e2..9bef27746 100644 --- a/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroute.go +++ b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroute.go @@ -116,8 +116,8 @@ type LoadBalancerSpec struct { // Strategy defines the load balancing strategy between the servers. // Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices). // RoundRobin value is deprecated and supported for backward compatibility. + // TODO: when the deprecated RoundRobin value will be removed, set the default value to wrr. // +kubebuilder:validation:Enum=wrr;p2c;RoundRobin - // +kubebuilder:default:=wrr Strategy dynamic.BalancerStrategy `json:"strategy,omitempty"` // PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. // By default, passHostHeader is true.