mirror of
https://github.com/traefik/traefik.git
synced 2026-02-18 18:20:28 -05:00
Fix ObservabilityConfig SetDefaults
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Build and Publish Documentation / Doc Process (push) Waiting to run
Build experimental image on branch / build-webui (push) Waiting to run
Build experimental image on branch / Build experimental image on branch (push) Waiting to run
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Build and Publish Documentation / Doc Process (push) Waiting to run
Build experimental image on branch / build-webui (push) Waiting to run
Build experimental image on branch / Build experimental image on branch (push) Waiting to run
This commit is contained in:
parent
ef546944b1
commit
d337748873
2 changed files with 8 additions and 10 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
traefiktls "github.com/traefik/traefik/v3/pkg/tls"
|
||||
"github.com/traefik/traefik/v3/pkg/types"
|
||||
"google.golang.org/grpc/codes"
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -357,8 +358,7 @@ func (l *ServersLoadBalancer) Mergeable(loadBalancer *ServersLoadBalancer) bool
|
|||
|
||||
// SetDefaults Default values for a ServersLoadBalancer.
|
||||
func (l *ServersLoadBalancer) SetDefaults() {
|
||||
defaultPassHostHeader := DefaultPassHostHeader
|
||||
l.PassHostHeader = &defaultPassHostHeader
|
||||
l.PassHostHeader = ptr.To(DefaultPassHostHeader)
|
||||
|
||||
l.Strategy = BalancerStrategyWRR
|
||||
l.ResponseForwarding = &ResponseForwarding{}
|
||||
|
|
@ -415,8 +415,7 @@ type ServerHealthCheck struct {
|
|||
|
||||
// SetDefaults Default values for a HealthCheck.
|
||||
func (h *ServerHealthCheck) SetDefaults() {
|
||||
fr := true
|
||||
h.FollowRedirects = &fr
|
||||
h.FollowRedirects = ptr.To(true)
|
||||
h.Mode = "http"
|
||||
h.Interval = DefaultHealthCheckInterval
|
||||
h.Timeout = DefaultHealthCheckTimeout
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
ptypes "github.com/traefik/paerser/types"
|
||||
otypes "github.com/traefik/traefik/v3/pkg/observability/types"
|
||||
"github.com/traefik/traefik/v3/pkg/types"
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
// EntryPoint holds the entry point configuration.
|
||||
|
|
@ -76,8 +77,7 @@ type HTTPConfig struct {
|
|||
|
||||
// SetDefaults sets the default values.
|
||||
func (c *HTTPConfig) SetDefaults() {
|
||||
sanitizePath := true
|
||||
c.SanitizePath = &sanitizePath
|
||||
c.SanitizePath = ptr.To(true)
|
||||
c.MaxHeaderBytes = http.DefaultMaxHeaderBytes
|
||||
}
|
||||
|
||||
|
|
@ -200,9 +200,8 @@ type ObservabilityConfig struct {
|
|||
|
||||
// SetDefaults sets the default values.
|
||||
func (o *ObservabilityConfig) SetDefaults() {
|
||||
defaultValue := true
|
||||
o.AccessLogs = &defaultValue
|
||||
o.Metrics = &defaultValue
|
||||
o.Tracing = &defaultValue
|
||||
o.AccessLogs = ptr.To(true)
|
||||
o.Metrics = ptr.To(true)
|
||||
o.Tracing = ptr.To(true)
|
||||
o.TraceVerbosity = otypes.MinimalVerbosity
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue