Add support for ECS constraints
This commit is contained in:
parent
11691019a0
commit
157e76e829
4 changed files with 35 additions and 0 deletions
|
@ -87,6 +87,14 @@ func (p *Provider) filterInstance(i ecsInstance) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
constraintTags := label.GetSliceStringValue(i.TraefikLabels, label.TraefikTags)
|
||||
if ok, failingConstraint := p.MatchConstraints(constraintTags); !ok {
|
||||
if failingConstraint != nil {
|
||||
log.Debugf("Filtering ecs instance pruned by constraint %s (%s) (constraint = %q)", i.Name, i.ID, failingConstraint.String())
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue