1
0
Fork 0

Add backwards compatibility

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2016-03-30 19:05:43 +02:00
parent 8737530a7d
commit bb072a1f8f
No known key found for this signature in database
GPG key ID: D808B4C167352E59
4 changed files with 32 additions and 9 deletions

View file

@ -311,6 +311,14 @@ func (provider *Marathon) getEntryPoints(application marathon.Application) []str
// getFrontendRule returns the frontend rule for the specified application, using
// it's label. It returns a default one (Host) if the label is not present.
func (provider *Marathon) getFrontendRule(application marathon.Application) string {
// ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠
// TODO: backwards compatibility with DEPRECATED rule.Value
if value, err := provider.getLabel(application, "traefik.frontend.value"); err == nil {
log.Warnf("Label traefik.frontend.value=%s is DEPRECATED, please refer to the rule label: https://github.com/containous/traefik/blob/master/docs/index.md#marathon", value)
rule, _ := provider.getLabel(application, "traefik.frontend.rule")
return rule + ":" + value
}
// ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠
if label, err := provider.getLabel(application, "traefik.frontend.rule"); err == nil {
return label
}