From 0d58e8d1ad4a622ecdddd5205627c40250e80126 Mon Sep 17 00:00:00 2001 From: Tom Moulard Date: Fri, 18 Mar 2022 11:06:08 +0100 Subject: [PATCH] Add Traefik Hub access and remove Pilot access --- Makefile | 4 +- cmd/traefik/traefik.go | 2 + docs/content/migration/v2.md | 7 ++ docs/content/plugins/index.md | 5 + pkg/config/static/pilot.go | 1 + pkg/config/static/static_config.go | 1 + webui/Dockerfile | 2 - webui/quasar.conf.js | 6 +- webui/src/App.vue | 11 +- webui/src/_helpers/APP.js | 3 +- webui/src/components/_commons/NavBar.vue | 13 +- .../components/platform/PlatformAuthState.vue | 82 ------------- .../src/components/platform/PlatformPanel.vue | 112 ------------------ 13 files changed, 27 insertions(+), 222 deletions(-) delete mode 100644 webui/src/components/platform/PlatformAuthState.vue delete mode 100644 webui/src/components/platform/PlatformPanel.vue diff --git a/Makefile b/Makefile index ee12b26e1..e6062e4ca 100644 --- a/Makefile +++ b/Makefile @@ -36,8 +36,6 @@ DOCKER_RUN_TRAEFIK_NOTTY := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INT IN_DOCKER ?= true -PLATFORM_URL := $(if $(PLATFORM_URL),$(PLATFORM_URL),"https://pilot.traefik.io") - default: binary ## Build Dev Docker image @@ -54,7 +52,7 @@ dist: ## Build WebUI Docker image build-webui-image: - docker build -t traefik-webui --build-arg ARG_PLATFORM_URL=$(PLATFORM_URL) -f webui/Dockerfile webui + docker build -t traefik-webui -f webui/Dockerfile webui ## Clean WebUI static generated assets clean-webui: diff --git a/cmd/traefik/traefik.go b/cmd/traefik/traefik.go index 78b2d873e..4a7f49d25 100644 --- a/cmd/traefik/traefik.go +++ b/cmd/traefik/traefik.go @@ -215,6 +215,8 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err } if staticConfiguration.Pilot != nil { + log.WithoutContext().Warn("Traefik Pilot is deprecated and will be removed soon. Please check our Blog for migration instructions later this year") + version.PilotEnabled = staticConfiguration.Pilot.Dashboard } diff --git a/docs/content/migration/v2.md b/docs/content/migration/v2.md index 95b3b636a..01ac943b6 100644 --- a/docs/content/migration/v2.md +++ b/docs/content/migration/v2.md @@ -452,3 +452,10 @@ the value for the method label becomes `EXTENSION_METHOD`, instead of the reques ### Tracing In `v2.6.1`, the Datadog tags added to a span changed from `service.name` to `traefik.service.name` and from `router.name` to `traefik.router.name`. + +## v2.7 + +### Traefik Pilot + +In `v2.7`, the `pilot.token` and `pilot.dashboard` options are deprecated. +Please check our Blog for migration instructions later this year. diff --git a/docs/content/plugins/index.md b/docs/content/plugins/index.md index ac3330dbe..d632fb458 100644 --- a/docs/content/plugins/index.md +++ b/docs/content/plugins/index.md @@ -1,5 +1,10 @@ # Plugins and Traefik Pilot +!!! warning "Traefik Pilot Deprecation" + + Traefik Pilot is deprecated and will be removed soon. + Please check our Blog for migration instructions later this year. + Traefik Pilot is a software-as-a-service (SaaS) platform that connects to Traefik to extend its capabilities. It offers a number of features to enhance observability and control of Traefik through a global control plane and dashboard, including: diff --git a/pkg/config/static/pilot.go b/pkg/config/static/pilot.go index 147c8917b..f3699a729 100644 --- a/pkg/config/static/pilot.go +++ b/pkg/config/static/pilot.go @@ -1,6 +1,7 @@ package static // Pilot Configuration related to Traefik Pilot. +// Deprecated. type Pilot struct { Token string `description:"Traefik Pilot token." json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty" loggable:"false"` Dashboard bool `description:"Enable Traefik Pilot in the dashboard." json:"dashboard,omitempty" toml:"dashboard,omitempty" yaml:"dashboard,omitempty"` diff --git a/pkg/config/static/static_config.go b/pkg/config/static/static_config.go index 0b2cfcda8..277acb6bc 100644 --- a/pkg/config/static/static_config.go +++ b/pkg/config/static/static_config.go @@ -76,6 +76,7 @@ type Configuration struct { CertificatesResolvers map[string]CertificateResolver `description:"Certificates resolvers configuration." json:"certificatesResolvers,omitempty" toml:"certificatesResolvers,omitempty" yaml:"certificatesResolvers,omitempty" export:"true"` + // Deprecated. Pilot *Pilot `description:"Traefik Pilot configuration." json:"pilot,omitempty" toml:"pilot,omitempty" yaml:"pilot,omitempty" export:"true"` Experimental *Experimental `description:"experimental features." json:"experimental,omitempty" toml:"experimental,omitempty" yaml:"experimental,omitempty" export:"true"` diff --git a/webui/Dockerfile b/webui/Dockerfile index 643f12f8e..edb9593bc 100644 --- a/webui/Dockerfile +++ b/webui/Dockerfile @@ -2,8 +2,6 @@ FROM node:14.16 # Current Active LTS release according to (https://nodejs.org/en/about/releases/) ENV WEBUI_DIR /src/webui -ARG ARG_PLATFORM_URL=https://pilot.traefik.io -ENV PLATFORM_URL=${ARG_PLATFORM_URL} RUN mkdir -p $WEBUI_DIR COPY package.json $WEBUI_DIR/ diff --git a/webui/quasar.conf.js b/webui/quasar.conf.js index c7dc90513..07eec1a8d 100644 --- a/webui/quasar.conf.js +++ b/webui/quasar.conf.js @@ -118,13 +118,11 @@ module.exports = function (ctx) { env: process.env.APP_ENV === 'development' ? { // staging: APP_ENV: JSON.stringify(process.env.APP_ENV), - APP_API: JSON.stringify(process.env.APP_API || '/api'), - PLATFORM_URL: JSON.stringify(process.env.PLATFORM_URL || 'https://pilot.traefik.io') + APP_API: JSON.stringify(process.env.APP_API || '/api') } : { // production: APP_ENV: JSON.stringify(process.env.APP_ENV), - APP_API: JSON.stringify(process.env.APP_API || '/api'), - PLATFORM_URL: JSON.stringify(process.env.PLATFORM_URL || 'https://pilot.traefik.io') + APP_API: JSON.stringify(process.env.APP_API || '/api') }, uglifyOptions: { compress: { diff --git a/webui/src/App.vue b/webui/src/App.vue index bb6e93e60..d655741b1 100644 --- a/webui/src/App.vue +++ b/webui/src/App.vue @@ -1,26 +1,17 @@ - - diff --git a/webui/src/components/platform/PlatformPanel.vue b/webui/src/components/platform/PlatformPanel.vue deleted file mode 100644 index a24f2bb1a..000000000 --- a/webui/src/components/platform/PlatformPanel.vue +++ /dev/null @@ -1,112 +0,0 @@ -