Support Nomad canary deployment
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com> Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
ab94bbaece
commit
2a2ea759d1
10 changed files with 593 additions and 51 deletions
|
@ -4,17 +4,19 @@ import (
|
|||
"github.com/traefik/traefik/v2/pkg/config/label"
|
||||
)
|
||||
|
||||
// configuration Contains information from the labels that are globals (not related to the dynamic configuration) or specific to the provider.
|
||||
// configuration contains information from the labels that are globals (not related to the dynamic configuration) or specific to the provider.
|
||||
type configuration struct {
|
||||
Enable bool
|
||||
ConsulCatalog specificConfiguration
|
||||
}
|
||||
|
||||
type specificConfiguration struct {
|
||||
Connect bool
|
||||
Connect bool // <prefix>.consulcatalog.connect is the corresponding label.
|
||||
Canary bool // <prefix>.consulcatalog.canary is the corresponding label.
|
||||
}
|
||||
|
||||
func (p *Provider) getConfiguration(labels map[string]string) (configuration, error) {
|
||||
// getExtraConf returns a configuration with settings which are not part of the dynamic configuration (e.g. "<prefix>.enable").
|
||||
func (p *Provider) getExtraConf(labels map[string]string) (configuration, error) {
|
||||
conf := configuration{
|
||||
Enable: p.ExposedByDefault,
|
||||
ConsulCatalog: specificConfiguration{Connect: p.ConnectByDefault},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue