Repository: traefik/traefik (language: go)

Issue:
Move Hub's configuration out of experimental
### Welcome!

- [X] Yes, I've searched similar issues on [GitHub](https://github.com/traefik/traefik/issues) and didn't find any.
- [X] Yes, I've searched similar issues on the [Traefik community forum](https://community.traefik.io) and didn't find any.

### What did you expect to see?

With Hub's GA announcement we can move its configuration section out of the experimental flag.




Discussion / hints:

Fix patch:
diff --git a/docs/content/migration/v2.md b/docs/content/migration/v2.md
index cc5abb7a3f..b007d7d30a 100644
--- a/docs/content/migration/v2.md
+++ b/docs/content/migration/v2.md
@@ -507,3 +507,7 @@ As the Kubernetes CRD provider still works with both API Versions (`traefik.io/v
 it means that for the same kind, namespace and name, the provider will only keep the `traefik.io/v1alpha1` resource.
 
 In addition, the Kubernetes CRDs API Version `traefik.io/v1alpha1` will not be supported in Traefik v3 itself.
+
+### Traefik Hub
+
+In `v2.10`, Traefik Hub is GA and the `experimental.hub` flag is deprecated.
diff --git a/docs/content/reference/static-configuration/file.toml b/docs/content/reference/static-configuration/file.toml
index 57970c0a76..241fb41c37 100644
--- a/docs/content/reference/static-configuration/file.toml
+++ b/docs/content/reference/static-configuration/file.toml
@@ -452,7 +452,6 @@
 [experimental]
   kubernetesGateway = true
   http3 = true
-  hub = true
   [experimental.plugins]
     [experimental.plugins.Descriptor0]
       moduleName = "foobar"
diff --git a/docs/content/reference/static-configuration/file.yaml b/docs/content/reference/static-configuration/file.yaml
index c0b4cbead0..74a3279087 100644
--- a/docs/content/reference/static-configuration/file.yaml
+++ b/docs/content/reference/static-configuration/file.yaml
@@ -476,7 +476,6 @@ hub:
 experimental:
   kubernetesGateway: true
   http3: true
-  hub: true
   plugins:
     Descriptor0:
       moduleName: foobar
diff --git a/docs/content/traefik-hub/index.md b/docs/content/traefik-hub/index.md
index a6c57cee99..5c6698e9db 100644
--- a/docs/content/traefik-hub/index.md
+++ b/docs/content/traefik-hub/index.md
@@ -2,7 +2,7 @@
 
 ## Overview
 
-Once the Traefik Hub Experimental feature is enabled in Traefik,
+Once the Traefik Hub feature is enabled in Traefik,
 Traefik and its local agent communicate together.
 
 This agent can:
@@ -27,7 +27,6 @@ This agent can:
 
     * Traefik Hub is compatible with Traefik Proxy 2.7 or later.
     * The Traefik Hub Agent must be installed to connect to the Traefik Hub platform.
-    * Activate this feature in the experimental section of the static configuration.
 
 !!! information "Configuration Discovery"
 
@@ -38,9 +37,6 @@ This agent can:
 !!! example "Minimal Static Configuration to Activate Traefik Hub for Docker"
 
     ```yaml tab="File (YAML)"
-    experimental:
-      hub: true
-
     hub:
       tls:
         insecure: true
@@ -51,9 +47,6 @@ This agent can:
     ```
 
     ```toml tab="File (TOML)"
-    [experimental]
-      hub = true
-
     [hub]
       [hub.tls]
         insecure = true
@@ -64,7 +57,6 @@ This agent can:
     ```
 
     ```bash tab="CLI"
-    --experimental.hub
     --hub.tls.insecure
     --metrics.prometheus.addrouterslabels
     ```
@@ -72,9 +64,6 @@ This agent can:
 !!! example "Minimal Static Configuration to Activate Traefik Hub for Kubernetes"
 
     ```yaml tab="File (YAML)"
-    experimental:
-      hub: true
-
     hub: {}
 
     metrics:
@@ -83,9 +72,6 @@ This agent can:
     ```
 
     ```toml tab="File (TOML)"
-    [experimental]
-      hub = true
-
     [hub]
 
     [metrics]
@@ -94,7 +80,6 @@ This agent can:
     ```
 
     ```bash tab="CLI"
-    --experimental.hub
     --hub
     --metrics.prometheus.addrouterslabels
     ```
diff --git a/pkg/config/static/experimental.go b/pkg/config/static/experimental.go
index 7f0c813acc..9dfa029a06 100644
--- a/pkg/config/static/experimental.go
+++ b/pkg/config/static/experimental.go
@@ -9,5 +9,6 @@ type Experimental struct {
 
 	KubernetesGateway bool `description:"Allow the Kubernetes gateway api provider usage." json:"kubernetesGateway,omitempty" toml:"kubernetesGateway,omitempty" yaml:"kubernetesGateway,omitempty" export:"true"`
 	HTTP3             bool `description:"Enable HTTP3." json:"http3,omitempty" toml:"http3,omitempty" yaml:"http3,omitempty" export:"true"`
-	Hub               bool `description:"Enable the Traefik Hub provider." json:"hub,omitempty" toml:"hub,omitempty" yaml:"hub,omitempty" export:"true"`
+	// Deprecated.
+	Hub bool `description:"Enable the Traefik Hub provider." json:"hub,omitempty" toml:"hub,omitempty" yaml:"hub,omitempty" export:"true"`
 }
diff --git a/pkg/config/static/hub.go b/pkg/config/static/hub.go
index ee78de9756..70d82af4ef 100644
--- a/pkg/config/static/hub.go
+++ b/pkg/config/static/hub.go
@@ -8,9 +8,8 @@ import (
 )
 
 func (c *Configuration) initHubProvider() error {
-	// Hub provider is an experimental feature. It requires the experimental flag to be enabled before continuing.
-	if c.Experimental == nil || !c.Experimental.Hub {
-		return errors.New("the experimental flag for Hub is not set")
+	if c.Experimental != nil && c.Experimental.Hub {
+		log.WithoutContext().Warn("Experimental flag for Traefik Hub is deprecated, because Traefik Hub is now GA.")
 	}
 
 	if _, ok := c.EntryPoints[hub.TunnelEntrypoint]; !ok {
diff --git a/pkg/config/static/static_config.go b/pkg/config/static/static_config.go
index 090a1e058d..3b8bd00f81 100644
--- a/pkg/config/static/static_config.go
+++ b/pkg/config/static/static_config.go
@@ -229,7 +229,7 @@ func (c *Configuration) SetEffectiveConfiguration() {
 			c.Hub = nil
 			log.WithoutContext().Errorf("Unable to activate the Hub provider: %v", err)
 		} else {
-			log.WithoutContext().Debugf("Experimental Hub provider has been activated.")
+			log.WithoutContext().Debugf("Hub provider has been activated.")
 		}
 	}
 


Test patch: