Merge current branch v2.4 into master
This commit is contained in:
commit
cb4fb973b2
41 changed files with 1857 additions and 1424 deletions
|
@ -2,5 +2,11 @@ package static
|
|||
|
||||
// Pilot Configuration related to Traefik Pilot.
|
||||
type Pilot struct {
|
||||
Token string `description:"Traefik Pilot token." json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty"`
|
||||
Token string `description:"Traefik Pilot token." json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty"`
|
||||
Dashboard bool `description:"Enable Traefik Pilot in the dashboard." json:"dashboard,omitempty" toml:"dashboard,omitempty" yaml:"dashboard,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
func (p *Pilot) SetDefaults() {
|
||||
p.Dashboard = true
|
||||
}
|
||||
|
|
|
@ -235,6 +235,12 @@ func (c *Configuration) SetEffectiveConfiguration() {
|
|||
c.Global.SendAnonymousUsage = true
|
||||
}
|
||||
|
||||
// Create Pilot struct to apply default value on undefined configuration.
|
||||
if c.Pilot == nil {
|
||||
c.Pilot = &Pilot{}
|
||||
c.Pilot.SetDefaults()
|
||||
}
|
||||
|
||||
// Disable Gateway API provider if not enabled in experimental
|
||||
if c.Experimental == nil || !c.Experimental.KubernetesGateway {
|
||||
c.Providers.KubernetesGateway = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue