From a73baded88c2ef14d02bea0343c17a67711cb753 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Wed, 13 Jul 2016 19:28:08 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20traefik.frontend.value=20support=20in?= =?UTF-8?q?=20docker=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … provider 👼. Was deprecated in 1.0, removing it for 1.1. Signed-off-by: Vincent Demeester --- provider/docker.go | 9 --------- provider/marathon.go | 8 -------- server.go | 8 -------- types/types.go | 4 ---- 4 files changed, 29 deletions(-) diff --git a/provider/docker.go b/provider/docker.go index 9b732195e..472b9f7b6 100644 --- a/provider/docker.go +++ b/provider/docker.go @@ -238,15 +238,6 @@ func (provider *Docker) getFrontendName(container dockertypes.ContainerJSON) str // GetFrontendRule returns the frontend rule for the specified container, using // it's label. It returns a default one (Host) if the label is not present. func (provider *Docker) getFrontendRule(container dockertypes.ContainerJSON) string { - // ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠ - // TODO: backwards compatibility with DEPRECATED rule.Value - if value, ok := container.Config.Labels["traefik.frontend.value"]; ok { - log.Warnf("Label traefik.frontend.value=%s is DEPRECATED (will be removed in v1.0.0), please refer to the rule label: https://github.com/containous/traefik/blob/master/docs/index.md#docker", value) - rule, _ := container.Config.Labels["traefik.frontend.rule"] - return rule + ":" + value - } - // ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠ - if label, err := getLabel(container, "traefik.frontend.rule"); err == nil { return label } diff --git a/provider/marathon.go b/provider/marathon.go index d0068e23b..628dd69ad 100644 --- a/provider/marathon.go +++ b/provider/marathon.go @@ -344,14 +344,6 @@ 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 } diff --git a/server.go b/server.go index 89bf6d4d3..238d64428 100644 --- a/server.go +++ b/server.go @@ -605,14 +605,6 @@ func (server *Server) buildDefaultHTTPRouter() *mux.Router { } func getRoute(serverRoute *serverRoute, route *types.Route) error { - // ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠ - // TODO: backwards compatibility with DEPRECATED rule.Value - if len(route.Value) > 0 { - route.Rule += ":" + route.Value - log.Warnf("Value %s is DEPRECATED (will be removed in v1.0.0), please refer to the new frontend notation: https://github.com/containous/traefik/blob/master/docs/index.md#-frontends", route.Value) - } - // ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠ - rules := Rules{route: serverRoute} newRoute, err := rules.Parse(route.Rule) if err != nil { diff --git a/types/types.go b/types/types.go index 322ce47d6..e9c9b1c71 100644 --- a/types/types.go +++ b/types/types.go @@ -40,10 +40,6 @@ type Server struct { // Route holds route configuration. type Route struct { Rule string `json:"rule,omitempty"` - // ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠ - // TODO: backwards compatibility with DEPRECATED rule.Value - Value string `json:"value,omitempty"` - // ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠ } // Frontend holds frontend configuration.