Add AWS ECS provider

* add ecs provider

* add ecs docs

* fix test after rebase

* add provider icon

* add missing addProvider call

* Fix for review

* Fix documentation

* Fix for review

* Fix documentation

* fix ctx usage

* autoDiscoverClusters setDefaults false

* Fix for review

* review: doc.

* Fix for review: add ctx in backoff retry

* review: linter.

Co-authored-by: Michael <michael.matur@gmail.com>
Co-authored-by: romain <romain@containo.us>
Co-authored-by: Fernandez Ludovic <ludovic@containo.us>
This commit is contained in:
Alessandro Chitolina 2020-07-15 16:28:04 +02:00 committed by GitHub
parent 6e4f5821dc
commit 285ded6e49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 4348 additions and 0 deletions

23
pkg/provider/ecs/label.go Normal file
View file

@ -0,0 +1,23 @@
package ecs
import (
"github.com/containous/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.
type configuration struct {
Enable bool
}
func (p *Provider) getConfiguration(instance ecsInstance) (configuration, error) {
conf := configuration{
Enable: p.ExposedByDefault,
}
err := label.Decode(instance.Labels, &conf, "traefik.ecs.", "traefik.enable")
if err != nil {
return configuration{}, err
}
return conf, nil
}