Merge v1.4.0-rc2 into master
This commit is contained in:
commit
9fba37b409
64 changed files with 829 additions and 289 deletions
|
@ -182,6 +182,7 @@ func (p *Provider) loadECSConfig(ctx context.Context, client *awsClient) (*types
|
|||
var ecsFuncMap = template.FuncMap{
|
||||
"filterFrontends": p.filterFrontends,
|
||||
"getFrontendRule": p.getFrontendRule,
|
||||
"getBasicAuth": p.getBasicAuth,
|
||||
"getLoadBalancerSticky": p.getLoadBalancerSticky,
|
||||
"getLoadBalancerMethod": p.getLoadBalancerMethod,
|
||||
}
|
||||
|
@ -469,6 +470,14 @@ func (p *Provider) getFrontendRule(i ecsInstance) string {
|
|||
return "Host:" + strings.ToLower(strings.Replace(i.Name, "_", "-", -1)) + "." + p.Domain
|
||||
}
|
||||
|
||||
func (p *Provider) getBasicAuth(i ecsInstance) []string {
|
||||
label := p.label(i, types.LabelFrontendAuthBasic)
|
||||
if label != "" {
|
||||
return strings.Split(label, ",")
|
||||
}
|
||||
return []string{}
|
||||
}
|
||||
|
||||
func (p *Provider) getLoadBalancerSticky(instances []ecsInstance) string {
|
||||
if len(instances) > 0 {
|
||||
label := p.label(instances[0], types.LabelBackendLoadbalancerSticky)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue