1
0
Fork 0

Allow configuring server URLs with label providers

This commit is contained in:
Taylor Yelverton 2025-01-09 10:20:06 -06:00 committed by GitHub
parent b0a72960bc
commit 95dd17e020
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 924 additions and 48 deletions

View file

@ -270,17 +270,13 @@ func (r *ResponseForwarding) SetDefaults() {
// Server holds the server configuration.
type Server struct {
URL string `json:"url,omitempty" toml:"url,omitempty" yaml:"url,omitempty" label:"-"`
Weight *int `json:"weight,omitempty" toml:"weight,omitempty" yaml:"weight,omitempty" label:"weight" export:"true"`
PreservePath bool `json:"preservePath,omitempty" toml:"preservePath,omitempty" yaml:"preservePath,omitempty" label:"-" export:"true"`
URL string `json:"url,omitempty" toml:"url,omitempty" yaml:"url,omitempty"`
Weight *int `json:"weight,omitempty" toml:"weight,omitempty" yaml:"weight,omitempty" export:"true"`
PreservePath bool `json:"preservePath,omitempty" toml:"preservePath,omitempty" yaml:"preservePath,omitempty" export:"true"`
Fenced bool `json:"fenced,omitempty" toml:"-" yaml:"-" label:"-" file:"-" kv:"-"`
Scheme string `json:"-" toml:"-" yaml:"-" file:"-"`
Port string `json:"-" toml:"-" yaml:"-" file:"-"`
}
// SetDefaults Default values for a Server.
func (s *Server) SetDefaults() {
s.Scheme = "http"
// Scheme can only be defined with label Providers.
Scheme string `json:"-" toml:"-" yaml:"-" file:"-" kv:"-"`
Port string `json:"-" toml:"-" yaml:"-" file:"-" kv:"-"`
}
// +k8s:deepcopy-gen=true