Allow configuring server URLs with label providers
This commit is contained in:
parent
b0a72960bc
commit
95dd17e020
18 changed files with 924 additions and 48 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue