From 95257d2ee189131ea45de99ad7827d6cc03ef8d7 Mon Sep 17 00:00:00 2001 From: smasset-orange <86793256+smasset-orange@users.noreply.github.com> Date: Tue, 26 Apr 2022 14:36:08 +0200 Subject: [PATCH 01/25] Fix RenewInterval computation in ACME provider --- pkg/provider/acme/provider.go | 2 +- pkg/provider/acme/provider_test.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/provider/acme/provider.go b/pkg/provider/acme/provider.go index bbc95d516..bdf59afd7 100644 --- a/pkg/provider/acme/provider.go +++ b/pkg/provider/acme/provider.go @@ -532,7 +532,7 @@ func (p *Provider) addCertificateForDomain(domain types.Domain, certificate, key // The second (RenewInterval) is the interval between renew attempts. func getCertificateRenewDurations(certificatesDuration int) (time.Duration, time.Duration) { switch { - case certificatesDuration >= 265*24: // >= 1 year + case certificatesDuration >= 365*24: // >= 1 year return 4 * 30 * 24 * time.Hour, 7 * 24 * time.Hour // 4 month, 1 week case certificatesDuration >= 3*30*24: // >= 90 days return 30 * 24 * time.Hour, 24 * time.Hour // 30 days, 1 day diff --git a/pkg/provider/acme/provider_test.go b/pkg/provider/acme/provider_test.go index 64bcf1085..103eff59e 100644 --- a/pkg/provider/acme/provider_test.go +++ b/pkg/provider/acme/provider_test.go @@ -608,11 +608,17 @@ func Test_getCertificateRenewDurations(t *testing.T) { expectRenewInterval: time.Minute, }, { - desc: "1 Year certificates: 2 months renew period, 1 week renew interval", + desc: "1 Year certificates: 4 months renew period, 1 week renew interval", certificatesDurations: 24 * 365, expectRenewPeriod: time.Hour * 24 * 30 * 4, expectRenewInterval: time.Hour * 24 * 7, }, + { + desc: "265 Days certificates: 30 days renew period, 1 day renew interval", + certificatesDurations: 24 * 265, + expectRenewPeriod: time.Hour * 24 * 30, + expectRenewInterval: time.Hour * 24, + }, { desc: "90 Days certificates: 30 days renew period, 1 day renew interval", certificatesDurations: 24 * 90, From 6c2eb6eef31d37b72e240ae82d662f613106501a Mon Sep 17 00:00:00 2001 From: John Preston <1236150+JohnPreston@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:24:08 +0100 Subject: [PATCH 02/25] Filter out ECS anywhere instance IDs --- pkg/provider/ecs/ecs.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/provider/ecs/ecs.go b/pkg/provider/ecs/ecs.go index 13dafd8d8..0cde14508 100644 --- a/pkg/provider/ecs/ecs.go +++ b/pkg/provider/ecs/ecs.go @@ -392,6 +392,13 @@ func (p *Provider) lookupEc2Instances(ctx context.Context, client *awsClient, cl for _, container := range resp.ContainerInstances { instanceIds[aws.StringValue(container.Ec2InstanceId)] = aws.StringValue(container.ContainerInstanceArn) + // Disallow Instance IDs of the form mi-* + // This prevents considering external instances in ECS Anywhere setups + // and getting InvalidInstanceID.Malformed error when calling the describe-instances endpoint. + if strings.HasPrefix(aws.StringValue(container.Ec2InstanceId), "mi-") { + continue + } + instanceArns = append(instanceArns, container.Ec2InstanceId) } } From 2968e5b61b6dc981dc4408a4d420032fa8a10de4 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 3 May 2022 15:54:08 +0200 Subject: [PATCH 03/25] fix: prevent failure of collected data --- pkg/collector/collector.go | 29 ++++-- pkg/collector/collector_test.go | 21 ++++ pkg/collector/hydration_test.go | 166 ++++++++++++++++++++++++++++++++ 3 files changed, 206 insertions(+), 10 deletions(-) create mode 100644 pkg/collector/collector_test.go create mode 100644 pkg/collector/hydration_test.go diff --git a/pkg/collector/collector.go b/pkg/collector/collector.go index 0fec4f061..50ce0666d 100644 --- a/pkg/collector/collector.go +++ b/pkg/collector/collector.go @@ -16,7 +16,7 @@ import ( "github.com/traefik/traefik/v2/pkg/version" ) -// collectorURL URL where the stats are send. +// collectorURL URL where the stats are sent. const collectorURL = "https://collect.traefik.io/9vxmmkcdmalbdi635d4jgc5p5rx0h7h8" // Collected data. @@ -30,16 +30,30 @@ type data struct { // Collect anonymous data. func Collect(staticConfiguration *static.Configuration) error { - anonConfig, err := redactor.Anonymize(staticConfiguration) + buf, err := createBody(staticConfiguration) if err != nil { return err } + resp, err := makeHTTPClient().Post(collectorURL, "application/json; charset=utf-8", buf) + if resp != nil { + _ = resp.Body.Close() + } + + return err +} + +func createBody(staticConfiguration *static.Configuration) (*bytes.Buffer, error) { + anonConfig, err := redactor.Anonymize(staticConfiguration) + if err != nil { + return nil, err + } + log.WithoutContext().Infof("Anonymous stats sent to %s: %s", collectorURL, anonConfig) hashConf, err := hashstructure.Hash(staticConfiguration, nil) if err != nil { - return err + return nil, err } data := &data{ @@ -53,15 +67,10 @@ func Collect(staticConfiguration *static.Configuration) error { buf := new(bytes.Buffer) err = json.NewEncoder(buf).Encode(data) if err != nil { - return err + return nil, err } - resp, err := makeHTTPClient().Post(collectorURL, "application/json; charset=utf-8", buf) - if resp != nil { - resp.Body.Close() - } - - return err + return buf, err } func makeHTTPClient() *http.Client { diff --git a/pkg/collector/collector_test.go b/pkg/collector/collector_test.go new file mode 100644 index 000000000..b091f0c4f --- /dev/null +++ b/pkg/collector/collector_test.go @@ -0,0 +1,21 @@ +package collector + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/traefik/traefik/v2/pkg/config/static" +) + +func Test_createBody(t *testing.T) { + var staticConfiguration static.Configuration + + err := hydrate(&staticConfiguration) + require.NoError(t, err) + + buffer, err := createBody(&staticConfiguration) + require.NoError(t, err) + + assert.NotEmpty(t, buffer) +} diff --git a/pkg/collector/hydration_test.go b/pkg/collector/hydration_test.go new file mode 100644 index 000000000..8814888a6 --- /dev/null +++ b/pkg/collector/hydration_test.go @@ -0,0 +1,166 @@ +package collector + +import ( + "fmt" + "reflect" + "time" + + "github.com/traefik/paerser/types" +) + +const ( + sliceItemNumber = 2 + mapItemNumber = 2 + defaultString = "foobar" + defaultNumber = 42 + defaultBool = true + defaultMapKeyPrefix = "name" +) + +func hydrate(element interface{}) error { + field := reflect.ValueOf(element) + return fill(field) +} + +func fill(field reflect.Value) error { + switch field.Kind() { + case reflect.Struct: + if err := setStruct(field); err != nil { + return err + } + case reflect.Ptr: + if err := setPointer(field); err != nil { + return err + } + case reflect.Slice: + if err := setSlice(field); err != nil { + return err + } + case reflect.Map: + if err := setMap(field); err != nil { + return err + } + case reflect.Interface: + if err := fill(field.Elem()); err != nil { + return err + } + case reflect.String: + setTyped(field, defaultString) + case reflect.Int: + setTyped(field, defaultNumber) + case reflect.Int8: + setTyped(field, int8(defaultNumber)) + case reflect.Int16: + setTyped(field, int16(defaultNumber)) + case reflect.Int32: + setTyped(field, int32(defaultNumber)) + case reflect.Int64: + switch field.Type() { + case reflect.TypeOf(types.Duration(time.Second)): + setTyped(field, int64(defaultNumber*int(time.Second))) + default: + setTyped(field, int64(defaultNumber)) + } + case reflect.Uint: + setTyped(field, uint(defaultNumber)) + case reflect.Uint8: + setTyped(field, uint8(defaultNumber)) + case reflect.Uint16: + setTyped(field, uint16(defaultNumber)) + case reflect.Uint32: + setTyped(field, uint32(defaultNumber)) + case reflect.Uint64: + setTyped(field, uint64(defaultNumber)) + case reflect.Bool: + setTyped(field, defaultBool) + case reflect.Float32: + setTyped(field, float32(defaultNumber)) + case reflect.Float64: + setTyped(field, float64(defaultNumber)) + } + + return nil +} + +func setTyped(field reflect.Value, i interface{}) { + baseValue := reflect.ValueOf(i) + if field.Kind().String() == field.Type().String() { + field.Set(baseValue) + } else { + field.Set(baseValue.Convert(field.Type())) + } +} + +func setMap(field reflect.Value) error { + field.Set(reflect.MakeMap(field.Type())) + + for i := 0; i < mapItemNumber; i++ { + baseKeyName := makeKeyName(field.Type().Elem()) + key := reflect.ValueOf(fmt.Sprintf("%s%d", baseKeyName, i)) + + // generate value + ptrType := reflect.PtrTo(field.Type().Elem()) + ptrValue := reflect.New(ptrType) + if err := fill(ptrValue); err != nil { + return err + } + value := ptrValue.Elem().Elem() + + field.SetMapIndex(key, value) + } + return nil +} + +func makeKeyName(typ reflect.Type) string { + switch typ.Kind() { + case reflect.Ptr: + return typ.Elem().Name() + case reflect.String, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Bool, reflect.Float32, reflect.Float64: + return defaultMapKeyPrefix + default: + return typ.Name() + } +} + +func setStruct(field reflect.Value) error { + for i := 0; i < field.NumField(); i++ { + fld := field.Field(i) + stFld := field.Type().Field(i) + + if !stFld.IsExported() || fld.Kind() == reflect.Func { + continue + } + + if err := fill(fld); err != nil { + return err + } + } + return nil +} + +func setSlice(field reflect.Value) error { + field.Set(reflect.MakeSlice(field.Type(), sliceItemNumber, sliceItemNumber)) + for j := 0; j < field.Len(); j++ { + if err := fill(field.Index(j)); err != nil { + return err + } + } + return nil +} + +func setPointer(field reflect.Value) error { + if field.IsNil() { + field.Set(reflect.New(field.Type().Elem())) + if err := fill(field.Elem()); err != nil { + return err + } + } else { + if err := fill(field.Elem()); err != nil { + return err + } + } + return nil +} From e4ed8296618b094b2dd65fea0ad128dd6c0b2cbd Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Tue, 3 May 2022 16:32:08 +0200 Subject: [PATCH 04/25] Prepare release v2.6.4 --- CHANGELOG.md | 21 +++++++++++++++++++++ script/gcg/traefik-bugfix.toml | 6 +++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f16af8e1..d56bfeb7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +## [v2.6.4](https://github.com/traefik/traefik/tree/v2.6.4) (2022-05-03) +[All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.4) + +**Bug fixes:** +- **[acme]** Fix RenewInterval computation in ACME provider ([#8969](https://github.com/traefik/traefik/pull/8969) by [smasset-orange](https://github.com/smasset-orange)) +- **[ecs,logs]** Remove duplicate error logs ([#8916](https://github.com/traefik/traefik/pull/8916) by [rtribotte](https://github.com/rtribotte)) +- **[ecs]** Filter out ECS anywhere instance IDs ([#8973](https://github.com/traefik/traefik/pull/8973) by [JohnPreston](https://github.com/JohnPreston)) +- **[middleware]** Re-add missing writeheader call in flush ([#8957](https://github.com/traefik/traefik/pull/8957) by [mpl](https://github.com/mpl)) +- **[middleware]** Fix bug for when custom page is large enough ([#8932](https://github.com/traefik/traefik/pull/8932) by [mpl](https://github.com/mpl)) +- **[middleware]** Fix regexp handling in redirect middleware ([#8920](https://github.com/traefik/traefik/pull/8920) by [tomMoulard](https://github.com/tomMoulard)) +- **[plugins]** Update Yaegi to v0.11.3 ([#8954](https://github.com/traefik/traefik/pull/8954) by [kevinpollet](https://github.com/kevinpollet)) + +**Documentation:** +- **[k8s/gatewayapi]** Fix certificateRefs in dynamic configuration ([#8940](https://github.com/traefik/traefik/pull/8940) by [kahirokunn](https://github.com/kahirokunn)) +- **[logs]** Move accessLog.fields example to TOML section ([#8944](https://github.com/traefik/traefik/pull/8944) by [major](https://github.com/major)) +- **[logs]** Add default mode for fields.names to access log ([#8933](https://github.com/traefik/traefik/pull/8933) by [aleksvujic](https://github.com/aleksvujic)) +- **[middleware]** Fix default for buffering middleware ([#8945](https://github.com/traefik/traefik/pull/8945) by [rtribotte](https://github.com/rtribotte)) +- **[middleware]** Preflight requests are not forwarded to services ([#8923](https://github.com/traefik/traefik/pull/8923) by [sizief](https://github.com/sizief)) +- Add title and description metadata to documentation pages ([#8941](https://github.com/traefik/traefik/pull/8941) by [ldez](https://github.com/ldez)) +- Update dynamic and static configuration references ([#8918](https://github.com/traefik/traefik/pull/8918) by [ldez](https://github.com/ldez)) + ## [v2.6.3](https://github.com/traefik/traefik/tree/v2.6.3) (2022-03-28) [All Commits](https://github.com/traefik/traefik/compare/v2.6.2...v2.6.3) diff --git a/script/gcg/traefik-bugfix.toml b/script/gcg/traefik-bugfix.toml index 7ce934ea3..f122a770c 100644 --- a/script/gcg/traefik-bugfix.toml +++ b/script/gcg/traefik-bugfix.toml @@ -4,11 +4,11 @@ RepositoryName = "traefik" OutputType = "file" FileName = "traefik_changelog.md" -# example new bugfix v2.6.3 +# example new bugfix v2.6.4 CurrentRef = "v2.6" -PreviousRef = "v2.6.2" +PreviousRef = "v2.6.3" BaseBranch = "v2.6" -FutureCurrentRefName = "v2.6.3" +FutureCurrentRefName = "v2.6.4" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10 From 4758cc0c8e5b7f00bc7b823a86f9b6f91d771fec Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Tue, 3 May 2022 17:58:08 +0200 Subject: [PATCH 05/25] Fix clean-webui target --- Makefile | 2 +- webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 35e9f9158..e3505236b 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ build-webui-image: clean-webui: rm -r webui/static mkdir -p webui/static - echo 'For more information show `webui/readme.md`' > webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md + printf 'For more information see `webui/readme.md`' > webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md ## Generate WebUI webui/static/index.html: diff --git a/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md b/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md index 03873182c..9481a99c3 100644 --- a/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md +++ b/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md @@ -1 +1 @@ -For more information show `webui/readme.md` +For more information see `webui/readme.md` \ No newline at end of file From 6559d63d3cbc4db9c9eb337c6578d99d69a14902 Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Tue, 3 May 2022 18:28:08 +0200 Subject: [PATCH 06/25] Prepare release v2.6.5 --- CHANGELOG.md | 9 +++++++-- script/gcg/traefik-bugfix.toml | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d56bfeb7b..10eddbfb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -## [v2.6.4](https://github.com/traefik/traefik/tree/v2.6.4) (2022-05-03) -[All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.4) +## [v2.6.5](https://github.com/traefik/traefik/tree/v2.6.5) (2022-05-03) +[All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.5) **Bug fixes:** - **[acme]** Fix RenewInterval computation in ACME provider ([#8969](https://github.com/traefik/traefik/pull/8969) by [smasset-orange](https://github.com/smasset-orange)) @@ -19,6 +19,11 @@ - Add title and description metadata to documentation pages ([#8941](https://github.com/traefik/traefik/pull/8941) by [ldez](https://github.com/ldez)) - Update dynamic and static configuration references ([#8918](https://github.com/traefik/traefik/pull/8918) by [ldez](https://github.com/ldez)) +## [v2.6.4](https://github.com/traefik/traefik/tree/v2.6.4) (2022-05-03) +[All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.4) + +Release canceled. + ## [v2.6.3](https://github.com/traefik/traefik/tree/v2.6.3) (2022-03-28) [All Commits](https://github.com/traefik/traefik/compare/v2.6.2...v2.6.3) diff --git a/script/gcg/traefik-bugfix.toml b/script/gcg/traefik-bugfix.toml index f122a770c..336867e05 100644 --- a/script/gcg/traefik-bugfix.toml +++ b/script/gcg/traefik-bugfix.toml @@ -4,11 +4,11 @@ RepositoryName = "traefik" OutputType = "file" FileName = "traefik_changelog.md" -# example new bugfix v2.6.4 +# example new bugfix v2.6.5 CurrentRef = "v2.6" -PreviousRef = "v2.6.3" +PreviousRef = "v2.6.4" BaseBranch = "v2.6" -FutureCurrentRefName = "v2.6.4" +FutureCurrentRefName = "v2.6.5" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10 From af855ef7b4b1b9fcfa15d04a7da9449b5197934d Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 3 May 2022 18:43:21 +0200 Subject: [PATCH 07/25] fix: generated placeholder for the webui --- webui/dev/scripts/transfer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui/dev/scripts/transfer.js b/webui/dev/scripts/transfer.js index ed812efff..eaa02bceb 100644 --- a/webui/dev/scripts/transfer.js +++ b/webui/dev/scripts/transfer.js @@ -5,7 +5,7 @@ const folder = process.argv[2] async function execute () { try { await fs.emptyDir('./static') - await fs.outputFile('./static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md', 'For more information show `webui/readme.md`') + await fs.outputFile('./static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md', 'For more information see `webui/readme.md`') console.log('Deleted static folder contents!') await fs.copy(`./dist/${folder}`, './static', { overwrite: true }) console.log('Installed new files in static folder!') From ff5cd9b5920ad3a7244f9645a2c841637168a8e8 Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Tue, 3 May 2022 18:53:05 +0200 Subject: [PATCH 08/25] Prepare Release v2.6.6 --- CHANGELOG.md | 9 +++++++-- script/gcg/traefik-bugfix.toml | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10eddbfb9..d68b5c48e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -## [v2.6.5](https://github.com/traefik/traefik/tree/v2.6.5) (2022-05-03) -[All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.5) +## [v2.6.6](https://github.com/traefik/traefik/tree/v2.6.6) (2022-05-03) +[All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.6) **Bug fixes:** - **[acme]** Fix RenewInterval computation in ACME provider ([#8969](https://github.com/traefik/traefik/pull/8969) by [smasset-orange](https://github.com/smasset-orange)) @@ -19,6 +19,11 @@ - Add title and description metadata to documentation pages ([#8941](https://github.com/traefik/traefik/pull/8941) by [ldez](https://github.com/ldez)) - Update dynamic and static configuration references ([#8918](https://github.com/traefik/traefik/pull/8918) by [ldez](https://github.com/ldez)) +## [v2.6.5](https://github.com/traefik/traefik/tree/v2.6.5) (2022-05-03) +[All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.5) + +Release canceled. + ## [v2.6.4](https://github.com/traefik/traefik/tree/v2.6.4) (2022-05-03) [All Commits](https://github.com/traefik/traefik/compare/v2.6.3...v2.6.4) diff --git a/script/gcg/traefik-bugfix.toml b/script/gcg/traefik-bugfix.toml index 336867e05..ce70637f0 100644 --- a/script/gcg/traefik-bugfix.toml +++ b/script/gcg/traefik-bugfix.toml @@ -4,11 +4,11 @@ RepositoryName = "traefik" OutputType = "file" FileName = "traefik_changelog.md" -# example new bugfix v2.6.5 +# example new bugfix v2.6.6 CurrentRef = "v2.6" -PreviousRef = "v2.6.4" +PreviousRef = "v2.6.5" BaseBranch = "v2.6" -FutureCurrentRefName = "v2.6.5" +FutureCurrentRefName = "v2.6.6" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10 From c29ed24a067aeb45d98ce4fac41531979341e667 Mon Sep 17 00:00:00 2001 From: Maxence Moutoussamy Date: Tue, 10 May 2022 08:50:09 +0200 Subject: [PATCH 09/25] Update jaeger-client-go to v2.30.0 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 28be21c73..d680695f4 100644 --- a/go.mod +++ b/go.mod @@ -62,7 +62,7 @@ require ( github.com/tinylib/msgp v1.0.2 // indirect github.com/traefik/paerser v0.1.5 github.com/traefik/yaegi v0.11.3 - github.com/uber/jaeger-client-go v2.29.1+incompatible + github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-lib v2.2.0+incompatible github.com/unrolled/render v1.0.2 github.com/unrolled/secure v1.0.9 diff --git a/go.sum b/go.sum index 4df6307e1..1d434964d 100644 --- a/go.sum +++ b/go.sum @@ -1661,8 +1661,8 @@ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqri github.com/uber-go/atomic v1.3.2 h1:Azu9lPBWRNKzYXSIwRfgRuDuS0YKsK4NFhiQv98gkxo= github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4= -github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= From a34e1c0747e9e1c5ffa51b4a3f5bb61404fe8bf9 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 10 May 2022 09:36:08 +0200 Subject: [PATCH 10/25] Upgrade to oxy v1.4.0 --- go.mod | 258 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- go.sum | 59 +++++++++---- 2 files changed, 288 insertions(+), 29 deletions(-) diff --git a/go.mod b/go.mod index d680695f4..5e43741d5 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,15 @@ module github.com/traefik/traefik/v2 -go 1.16 +go 1.17 -// github.com/docker/docker v17.12.0-ce-rc1.0.20200204220554-5f6d6f3f2203+incompatible => v19.03.6 require ( github.com/BurntSushi/toml v1.0.0 github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61 github.com/Masterminds/sprig/v3 v3.2.2 - github.com/Shopify/sarama v1.23.1 // indirect github.com/abbot/go-http-auth v0.0.0-00010101000000-000000000000 github.com/aws/aws-sdk-go v1.39.0 github.com/cenkalti/backoff/v4 v4.1.1 github.com/compose-spec/compose-go v1.0.3 - github.com/containerd/containerd v1.5.9 // indirect github.com/containous/alice v0.0.0-20181107144136-d83ebdd94cbd github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/davecgh/go-spew v1.1.1 @@ -20,7 +17,6 @@ require ( github.com/docker/compose/v2 v2.0.1 github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 - github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e // indirect github.com/eapache/channels v1.1.0 github.com/fatih/structs v1.1.0 github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2 @@ -30,7 +26,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/google/go-github/v28 v28.1.1 github.com/gorilla/mux v1.8.0 - github.com/gorilla/websocket v1.4.2 + github.com/gorilla/websocket v1.5.0 github.com/hashicorp/consul v1.10.4 github.com/hashicorp/consul/api v1.12.0 github.com/hashicorp/go-hclog v0.16.1 @@ -50,16 +46,14 @@ require ( github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 github.com/openzipkin/zipkin-go v0.2.2 github.com/patrickmn/go-cache v2.1.0+incompatible - github.com/philhofer/fwd v1.0.0 // indirect github.com/pires/go-proxyproto v0.6.1 github.com/pmezard/go-difflib v1.0.0 github.com/prometheus/client_golang v1.11.0 github.com/prometheus/client_model v0.2.0 github.com/rancher/go-rancher-metadata v0.0.0-20200311180630-7f4c936a06ac github.com/sirupsen/logrus v1.8.1 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.1 github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 - github.com/tinylib/msgp v1.0.2 // indirect github.com/traefik/paerser v0.1.5 github.com/traefik/yaegi v0.11.3 github.com/uber/jaeger-client-go v2.30.0+incompatible @@ -67,13 +61,12 @@ require ( github.com/unrolled/render v1.0.2 github.com/unrolled/secure v1.0.9 github.com/vdemeester/shakers v0.1.0 - github.com/vulcand/oxy v1.3.0 - github.com/vulcand/predicate v1.1.0 + github.com/vulcand/oxy v1.4.0 + github.com/vulcand/predicate v1.2.0 go.elastic.co/apm v1.13.1 go.elastic.co/apm/module/apmot v1.13.1 golang.org/x/mod v0.4.2 - golang.org/x/net v0.0.0-20211209124913-491a49abca63 - golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect + golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2 google.golang.org/grpc v1.38.0 @@ -89,6 +82,245 @@ require ( sigs.k8s.io/gateway-api v0.4.0 ) +require ( + cloud.google.com/go v0.81.0 // indirect + github.com/AlecAivazis/survey/v2 v2.2.3 // indirect + github.com/Azure/azure-sdk-for-go v40.3.0+incompatible // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.19 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect + github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 // indirect + github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect + github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.1.1 // indirect + github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/Microsoft/hcsshim v0.8.23 // indirect + github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 // indirect + github.com/Shopify/sarama v1.23.1 // indirect + github.com/VividCortex/gohistogram v1.0.0 // indirect + github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect + github.com/akamai/AkamaiOPEN-edgegrid-golang v1.1.1 // indirect + github.com/aliyun/alibaba-cloud-sdk-go v1.61.1183 // indirect + github.com/armon/go-metrics v0.3.10 // indirect + github.com/armon/go-radix v1.0.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect + github.com/buger/goterm v1.0.0 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cheekybits/genny v1.0.0 // indirect + github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible // indirect + github.com/circonus-labs/circonusllhist v0.1.3 // indirect + github.com/cloudflare/cloudflare-go v0.20.0 // indirect + github.com/compose-spec/godotenv v1.0.0 // indirect + github.com/containerd/cgroups v1.0.1 // indirect + github.com/containerd/console v1.0.2 // indirect + github.com/containerd/containerd v1.5.9 // indirect + github.com/containerd/continuity v0.1.0 // indirect + github.com/containerd/typeurl v1.0.2 // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/cpu/goacmedns v0.1.1 // indirect + github.com/deepmap/oapi-codegen v1.6.1 // indirect + github.com/dimchansky/utfbom v1.1.1 // indirect + github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e // indirect + github.com/dnsimple/dnsimple-go v0.70.1 // indirect + github.com/docker/buildx v0.5.2-0.20210422185057-908a856079fc // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker-credential-helpers v0.6.4-0.20210125172408-38bea2ce277a // indirect + github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect + github.com/docker/go-metrics v0.0.1 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e // indirect + github.com/eapache/queue v1.1.0 // indirect + github.com/elastic/go-licenser v0.3.1 // indirect + github.com/elastic/go-sysinfo v1.1.1 // indirect + github.com/elastic/go-windows v1.0.0 // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/exoscale/egoscale v0.67.0 // indirect + github.com/fatih/color v1.12.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/fvbommel/sortorder v1.0.1 // indirect + github.com/go-errors/errors v1.0.1 // indirect + github.com/go-logfmt/logfmt v0.5.0 // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect + github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect + github.com/go-zookeeper/zk v1.0.2 // indirect + github.com/gofrs/flock v0.8.0 // indirect + github.com/gofrs/uuid v3.3.0+incompatible // indirect + github.com/gogo/googleapis v1.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/golang/snappy v0.0.3 // indirect + github.com/google/btree v1.0.1 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/google/uuid v1.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/gophercloud/gophercloud v0.16.0 // indirect + github.com/gophercloud/utils v0.0.0-20210216074907-f6de111f2eae // indirect + github.com/gorilla/context v1.1.1 // indirect + github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/hashicorp/consul/sdk v0.8.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.1 // indirect + github.com/hashicorp/go-immutable-radix v1.3.0 // indirect + github.com/hashicorp/go-msgpack v0.5.5 // indirect + github.com/hashicorp/go-retryablehttp v0.7.0 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-sockaddr v1.0.2 // indirect + github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/memberlist v0.3.0 // indirect + github.com/hashicorp/raft v1.3.2 // indirect + github.com/hashicorp/raft-autopilot v0.1.5 // indirect + github.com/hashicorp/serf v0.9.6 // indirect + github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect + github.com/huandu/xstrings v1.3.1 // indirect + github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/infobloxopen/infoblox-go-client v1.1.1 // indirect + github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea // indirect + github.com/jarcoal/httpmock v1.0.6 // indirect + github.com/jcchavezs/porto v0.1.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect + github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b // indirect + github.com/labbsr0x/bindman-dns-webhook v1.0.2 // indirect + github.com/labbsr0x/goh v1.0.1 // indirect + github.com/linode/linodego v0.31.1 // indirect + github.com/liquidweb/go-lwApi v0.0.5 // indirect + github.com/liquidweb/liquidweb-cli v0.6.9 // indirect + github.com/liquidweb/liquidweb-go v1.6.3 // indirect + github.com/looplab/fsm v0.1.0 // indirect + github.com/mailgun/minheap v0.0.0-20170619185613-3dbe6c6bf55f // indirect + github.com/mailgun/multibuf v0.0.0-20150714184110-565402cd71fb // indirect + github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51 // indirect + github.com/marten-seemann/qpack v0.2.1 // indirect + github.com/marten-seemann/qtls-go1-16 v0.1.4 // indirect + github.com/marten-seemann/qtls-go1-17 v0.1.0 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-shellwords v1.0.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect + github.com/miekg/pkcs11 v1.0.3 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.0 // indirect + github.com/mitchellh/reflectwalk v1.0.1 // indirect + github.com/moby/buildkit v0.8.2-0.20210401015549-df49b648c8bf // indirect + github.com/moby/locker v1.0.1 // indirect + github.com/moby/sys/mount v0.2.0 // indirect + github.com/moby/sys/mountinfo v0.4.1 // indirect + github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04 // indirect + github.com/nrdcg/auroradns v1.0.1 // indirect + github.com/nrdcg/desec v0.6.0 // indirect + github.com/nrdcg/dnspod-go v0.4.0 // indirect + github.com/nrdcg/freemyip v0.2.0 // indirect + github.com/nrdcg/goinwx v0.8.1 // indirect + github.com/nrdcg/namesilo v0.2.1 // indirect + github.com/nrdcg/porkbun v0.1.1 // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/onsi/ginkgo v1.16.4 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/runc v1.0.2 // indirect + github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect + github.com/oracle/oci-go-sdk v24.3.0+incompatible // indirect + github.com/ovh/go-ovh v1.1.0 // indirect + github.com/philhofer/fwd v1.0.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pquerna/otp v1.3.0 // indirect + github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/sacloud/libsacloud v1.36.2 // indirect + github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b // indirect + github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f // indirect + github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/segmentio/fasthash v1.0.3 // indirect + github.com/shopspring/decimal v1.2.0 // indirect + github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect + github.com/softlayer/softlayer-go v1.0.3 // indirect + github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/cobra v1.2.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.3.0 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.287 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.287 // indirect + github.com/theupdateframework/notary v0.6.1 // indirect + github.com/tinylib/msgp v1.0.2 // indirect + github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 // indirect + github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect + github.com/transip/gotransip/v6 v6.6.1 // indirect + github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 // indirect + github.com/vinyldns/go-vinyldns v0.9.16 // indirect + github.com/vultr/govultr/v2 v2.7.1 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect + go.elastic.co/apm/module/apmhttp v1.13.1 // indirect + go.elastic.co/fastjson v1.1.0 // indirect + go.etcd.io/etcd/api/v3 v3.5.0 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect + go.etcd.io/etcd/client/v3 v3.5.0 // indirect + go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/ratelimit v0.0.0-20180316092928-c15da0234277 // indirect + go.uber.org/zap v1.18.1 // indirect + golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect + golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect + golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/api v0.44.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect + google.golang.org/protobuf v1.27.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/ns1/ns1-go.v2 v2.6.2 // indirect + gopkg.in/redis.v5 v5.2.9 // indirect + gopkg.in/square/go-jose.v2 v2.6.0 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect + k8s.io/klog/v2 v2.10.0 // indirect + k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) + // Containous forks replace ( github.com/abbot/go-http-auth => github.com/containous/go-http-auth v0.4.1-0.20200324110947-a37a7636d23e diff --git a/go.sum b/go.sum index 1d434964d..edadbcb83 100644 --- a/go.sum +++ b/go.sum @@ -125,6 +125,8 @@ github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61 h github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61/go.mod h1:62qWSDaEI0BLykU+zQza5CAKgW0lOy9oBSz3/DvYz4w= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -184,6 +186,7 @@ github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= github.com/ahmetb/gen-crd-api-reference-docs v0.3.0/go.mod h1:TdjdkYhlOifCQWPs1UdTma97kQQMozf5h26hTuG70u8= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/akamai/AkamaiOPEN-edgegrid-golang v1.1.1 h1:bLzehmpyCwQiqCE1Qe9Ny6fbFqs7hPlmo9vKv2orUxs= github.com/akamai/AkamaiOPEN-edgegrid-golang v1.1.1/go.mod h1:kX6YddBkXqqywAe8c9LyvgTCyFuZCTMF4cRPQhc3Fy8= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= @@ -600,6 +603,7 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -710,6 +714,7 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -843,11 +848,12 @@ github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/gravitational/trace v0.0.0-20190726142706-a535a178675f h1:68WxnfBzJRYktZ30fmIjGQ74RsXYLoeH2/NITPktTMY= -github.com/gravitational/trace v0.0.0-20190726142706-a535a178675f/go.mod h1:RvdOUHE4SHqR3oXlFFKnGzms8a5dugHygGw1bqDstYI= +github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf h1:C1GPyPJrOlJlIrcaBBiBpDsqZena2Ks8spa5xZqr1XQ= +github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf/go.mod h1:zXqxTI6jXDdKnlf8s+nT+3c8LrwUEy3yNpO4XJL90lA= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -1033,8 +1039,9 @@ github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVz github.com/jmoiron/sqlx v0.0.0-20180124204410-05cef0741ade/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/joyent/triton-go v0.0.0-20180628001255-830d2b111e62/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= github.com/joyent/triton-go v1.7.1-0.20200416154420-6801d15b779f/go.mod h1:KDSfL7qe5ZfQqvlDMkVjCztbmcpp/c8M77vhQP8ZPvk= @@ -1055,6 +1062,7 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 h1:qGQQKEcAR99REcMpsXCp3lJ03zYT1PkRd3kQGPn9GVg= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= @@ -1622,8 +1630,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 h1:XGopsea1Dw7ecQ8JscCNQXDGYAKDiWjDeXnpN/+BY9g= github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= @@ -1698,10 +1707,10 @@ github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6Ac github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/vulcand/oxy v1.3.0 h1:358BVHmJNLjhOrhbjq2EVJX5NQ3HxrP0d5OyHLRliX0= -github.com/vulcand/oxy v1.3.0/go.mod h1:hN/gw/jg+GH4A+bqvznsW26Izd4jNGV6h1z3s7drRzs= -github.com/vulcand/predicate v1.1.0 h1:Gq/uWopa4rx/tnZu2opOSBqHK63Yqlou/SzrbwdJiNg= -github.com/vulcand/predicate v1.1.0/go.mod h1:mlccC5IRBoc2cIFmCB8ZM62I3VDb6p2GXESMHa3CnZg= +github.com/vulcand/oxy v1.4.0 h1:QslVUBCCev9zf+0QNr+SJlfpidz+4NZXu1yNfv2bLsc= +github.com/vulcand/oxy v1.4.0/go.mod h1:ygVjK9yyTc1iScEZ8ZbFpjjHH2DlX8qXS7s+C5G7lJE= +github.com/vulcand/predicate v1.2.0 h1:uFsW1gcnnR7R+QTID+FVcs0sSYlIGntoGOTb3rQJt50= +github.com/vulcand/predicate v1.2.0/go.mod h1:VipoNYXny6c8N381zGUWkjuuNHiRbeAZhE7Qm9c+2GA= github.com/vultr/govultr/v2 v2.7.1 h1:uF9ERet++Gb+7Cqs3p1P6b6yebeaZqVd7t5P2uZCaJU= github.com/vultr/govultr/v2 v2.7.1/go.mod h1:BvOhVe6/ZpjwcoL6/unkdQshmbS9VGbowI4QT+3DGVU= github.com/weppos/publicsuffix-go v0.4.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= @@ -1835,9 +1844,13 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e h1:gsTQYXdTw2Gq7RBsWvlQ91b+aEQ6bXFUngBGuR8sPpI= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= +golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1846,7 +1859,9 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1940,8 +1955,9 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= -golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2088,12 +2104,14 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo= -golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 h1:8IVLkfbr2cLhv0a/vKq4UFUcJym8RmDoDboxCFWEjYE= +golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2102,8 +2120,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2116,12 +2135,14 @@ golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -2193,6 +2214,11 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -2501,6 +2527,7 @@ launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80 mvdan.cc/xurls/v2 v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA= mvdan.cc/xurls/v2 v2.1.0/go.mod h1:5GrSd9rOnKOpZaji1OZLYL/yeAAtGDlo/cFe+8K5n8E= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= From 9810120affeb3e135852a9a843884349d7b2cade Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 11 May 2022 09:12:08 +0200 Subject: [PATCH 11/25] Upgrade to oxy v1.4.1 --- go.mod | 5 ++--- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 5e43741d5..8b7e0a1dd 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,7 @@ require ( github.com/unrolled/render v1.0.2 github.com/unrolled/secure v1.0.9 github.com/vdemeester/shakers v0.1.0 - github.com/vulcand/oxy v1.4.0 + github.com/vulcand/oxy v1.4.1 github.com/vulcand/predicate v1.2.0 go.elastic.co/apm v1.13.1 go.elastic.co/apm/module/apmot v1.13.1 @@ -215,7 +215,7 @@ require ( github.com/liquidweb/liquidweb-go v1.6.3 // indirect github.com/looplab/fsm v0.1.0 // indirect github.com/mailgun/minheap v0.0.0-20170619185613-3dbe6c6bf55f // indirect - github.com/mailgun/multibuf v0.0.0-20150714184110-565402cd71fb // indirect + github.com/mailgun/multibuf v0.1.2 // indirect github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51 // indirect github.com/marten-seemann/qpack v0.2.1 // indirect github.com/marten-seemann/qtls-go1-16 v0.1.4 // indirect @@ -327,7 +327,6 @@ replace ( github.com/go-check/check => github.com/containous/check v0.0.0-20170915194414-ca0bf163426a github.com/gorilla/mux => github.com/containous/mux v0.0.0-20220113180107-8ffa4f6d063c github.com/mailgun/minheap => github.com/containous/minheap v0.0.0-20190809180810-6e71eb837595 - github.com/mailgun/multibuf => github.com/containous/multibuf v0.0.0-20220419123348-2d0b12e116c6 ) // https://github.com/docker/compose/blob/e44222664abd07ce1d1fe6796d84d93cbc7468c3/go.mod#L131 diff --git a/go.sum b/go.sum index edadbcb83..25fb2878a 100644 --- a/go.sum +++ b/go.sum @@ -429,8 +429,6 @@ github.com/containous/go-http-auth v0.4.1-0.20200324110947-a37a7636d23e h1:D+uTE github.com/containous/go-http-auth v0.4.1-0.20200324110947-a37a7636d23e/go.mod h1:s8kLgBQolDbsJOPVIGCEEv9zGAKUUf/685Gi0Qqg8z8= github.com/containous/minheap v0.0.0-20190809180810-6e71eb837595 h1:aPspFRO6b94To3gl4yTDOEtpjFwXI7V2W+z0JcNljQ4= github.com/containous/minheap v0.0.0-20190809180810-6e71eb837595/go.mod h1:+lHFbEasIiQVGzhVDVw/cn0ZaOzde2OwNncp1NhXV4c= -github.com/containous/multibuf v0.0.0-20220419123348-2d0b12e116c6 h1:KzERnBo5Jn4RRKjo8hdDPS4llWjHlJtM6kfm4mRkIew= -github.com/containous/multibuf v0.0.0-20220419123348-2d0b12e116c6/go.mod h1:zkWcASFUJEst6QwCrxLdkuw1gvaKqmflEipm+iecV5M= github.com/containous/mux v0.0.0-20220113180107-8ffa4f6d063c h1:g6JvgTtfpS6AfhRjY87NZ0g39CrNDbdm8R+1CD85Cfo= github.com/containous/mux v0.0.0-20220113180107-8ffa4f6d063c/go.mod h1:z8WW7n06n8/1xF9Jl9WmuDeZuHAhfL+bwarNjsciwwg= github.com/coredns/coredns v1.1.2/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0= @@ -1137,6 +1135,8 @@ github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailgun/multibuf v0.1.2 h1:QE9kE27lK6LFZB4aYNVtUPlWVHVCT0zpgUr2uoq/+jk= +github.com/mailgun/multibuf v0.1.2/go.mod h1:E+sUhIy69qgT6EM57kCPdUTlHnjTuxQBO/yf6af9Hes= github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51 h1:Kg/NPZLLC3aAFr1YToMs98dbCdhootQ1hZIvZU28hAQ= github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51/go.mod h1:RYmqHbhWwIz3z9eVmQ2rx82rulEMG0t+Q1bzfc9DYN4= github.com/mailgun/ttlmap v0.0.0-20170619185759-c1c17f74874f h1:ZZYhg16XocqSKPGNQAe0aeweNtFxuedbwwb4fSlg7h4= @@ -1707,8 +1707,8 @@ github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6Ac github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/vulcand/oxy v1.4.0 h1:QslVUBCCev9zf+0QNr+SJlfpidz+4NZXu1yNfv2bLsc= -github.com/vulcand/oxy v1.4.0/go.mod h1:ygVjK9yyTc1iScEZ8ZbFpjjHH2DlX8qXS7s+C5G7lJE= +github.com/vulcand/oxy v1.4.1 h1:8FUsbr5xhSJqNlSrpUBcw93WuZIEI9JUyvThB9YqqF8= +github.com/vulcand/oxy v1.4.1/go.mod h1:Yq8OBb0XWU/7nPSglwUH5LS2Pcp4yvad8SVayobZbSo= github.com/vulcand/predicate v1.2.0 h1:uFsW1gcnnR7R+QTID+FVcs0sSYlIGntoGOTb3rQJt50= github.com/vulcand/predicate v1.2.0/go.mod h1:VipoNYXny6c8N381zGUWkjuuNHiRbeAZhE7Qm9c+2GA= github.com/vultr/govultr/v2 v2.7.1 h1:uF9ERet++Gb+7Cqs3p1P6b6yebeaZqVd7t5P2uZCaJU= From 0dac0c3a5b3ef3851b67db06542c46dbb5b0d8e5 Mon Sep 17 00:00:00 2001 From: Ikko Ashimine Date: Fri, 13 May 2022 16:44:08 +0900 Subject: [PATCH 12/25] Fix typo in maintainers guidelines --- docs/content/contributing/maintainers-guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/contributing/maintainers-guidelines.md b/docs/content/contributing/maintainers-guidelines.md index a22991807..b1d2a0432 100644 --- a/docs/content/contributing/maintainers-guidelines.md +++ b/docs/content/contributing/maintainers-guidelines.md @@ -60,7 +60,7 @@ but we can suggest you start with activities such as: The ability to set up a testing environment in a few minutes, using the official documentation, is a game changer. -- You will be listed on our Maintainers Github page +- You will be listed on our Maintainers GitHub page as well as on our website in the section [maintainers](maintainers.md). - We will be promoting you on social channels (mostly on Twitter). From 3ac708ddcbaae91ff9a2de450df44d383c6d1d85 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Mon, 16 May 2022 01:00:08 -0700 Subject: [PATCH 13/25] Fix log statement for ExternalName misconfig --- docs/scripts/verify.sh | 2 +- pkg/provider/kubernetes/crd/kubernetes.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scripts/verify.sh b/docs/scripts/verify.sh index 640572ec5..830fb448e 100755 --- a/docs/scripts/verify.sh +++ b/docs/scripts/verify.sh @@ -22,7 +22,7 @@ find "${PATH_TO_SITE}" -type f -not -path "/app/site/theme/*" \ --alt_ignore="/traefikproxy-vertical-logo-color.svg/" \ --http_status_ignore="0,500,501,503" \ --file_ignore="/404.html/" \ - --url_ignore="/https://groups.google.com/a/traefik.io/forum/#!forum/security/,/localhost:/,/127.0.0.1:/,/fonts.gstatic.com/,/.minikube/,/github.com\/traefik\/traefik\/*edit*/,/github.com\/traefik\/traefik/,/doc.traefik.io/,/github\.com\/golang\/oauth2\/blob\/36a7019397c4c86cf59eeab3bc0d188bac444277\/.+/,/www.akamai.com/,/pilot.traefik.io\/profile/,/traefik.io/,/doc.traefik.io\/traefik-mesh/,/www.mkdocs.org/,/squidfunk.github.io/,/ietf.org/,/www.namesilo.com/,/www.youtube.com/,/www.linode.com/,/www.alibabacloud.com/,/www.cloudxns.net/,/www.vultr.com/,/vscale.io/,/hetzner.com/,/docs.github.com/,/njal.la/" \ + --url_ignore="/https://groups.google.com/a/traefik.io/forum/#!forum/security/,/localhost:/,/127.0.0.1:/,/fonts.gstatic.com/,/.minikube/,/github.com\/traefik\/traefik\/*edit*/,/github.com\/traefik\/traefik/,/doc.traefik.io/,/github\.com\/golang\/oauth2\/blob\/36a7019397c4c86cf59eeab3bc0d188bac444277\/.+/,/www.akamai.com/,/pilot.traefik.io\/profile/,/traefik.io/,/doc.traefik.io\/traefik-mesh/,/www.mkdocs.org/,/squidfunk.github.io/,/ietf.org/,/www.namesilo.com/,/www.youtube.com/,/www.linode.com/,/www.alibabacloud.com/,/www.cloudxns.net/,/www.vultr.com/,/vscale.io/,/hetzner.com/,/docs.github.com/,/njal.la/,/www.wedos.com/" \ '{}' 1>/dev/null ## HTML-proofer options at https://github.com/gjtorikian/html-proofer#configuration diff --git a/pkg/provider/kubernetes/crd/kubernetes.go b/pkg/provider/kubernetes/crd/kubernetes.go index d35271063..54578daef 100644 --- a/pkg/provider/kubernetes/crd/kubernetes.go +++ b/pkg/provider/kubernetes/crd/kubernetes.go @@ -399,7 +399,7 @@ func getServicePort(svc *corev1.Service, port intstr.IntOrString) (*corev1.Servi if hasValidPort { log.WithoutContext(). - Warning("The port %d from IngressRoute doesn't match with ports defined in the ExternalName service %s/%s.", port, svc.Namespace, svc.Name) + Warnf("The port %s from IngressRoute doesn't match with ports defined in the ExternalName service %s/%s.", port, svc.Namespace, svc.Name) } return &corev1.ServicePort{Port: port.IntVal}, nil From 32920ca65c5c006518aa38304cfab6739fce740c Mon Sep 17 00:00:00 2001 From: Tom Moulard Date: Tue, 17 May 2022 15:48:08 +0200 Subject: [PATCH 14/25] Update linter --- .github/workflows/validate.yaml | 2 +- .golangci.toml | 3 +++ .semaphore/semaphore.yml | 2 +- build.Dockerfile | 2 +- integration/https_test.go | 2 +- integration/timeout_test.go | 4 +++- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 15db3ed12..21aa83767 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -7,7 +7,7 @@ on: env: GO_VERSION: 1.17 - GOLANGCI_LINT_VERSION: v1.45.0 + GOLANGCI_LINT_VERSION: v1.46.2 MISSSPELL_VERSION: v0.3.4 IN_DOCKER: "" diff --git a/.golangci.toml b/.golangci.toml index ae9b717c8..35b5cca21 100644 --- a/.golangci.toml +++ b/.golangci.toml @@ -119,6 +119,7 @@ "interfacer", # Deprecated "maligned", # Deprecated "golint", # Deprecated + "execinquery", # Not relevant (SQL) "sqlclosecheck", # Not relevant (SQL) "rowserrcheck", # Not relevant (SQL) "lll", # Not relevant @@ -142,6 +143,7 @@ "paralleltest", # Not relevant "exhaustive", # Not relevant "exhaustivestruct", # Not relevant + "exhaustruct", # duplicate of exhaustivestruct "goerr113", # Too strict "wrapcheck", # Too strict "noctx", # Too strict @@ -156,6 +158,7 @@ "contextcheck", # too many false-positive "containedctx", # too many false-positive "maintidx", # kind of duplicate of gocyclo + "nonamedreturns", # not relevant ] [issues] diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 593d162b9..ce527292b 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -25,7 +25,7 @@ global_job_config: - export "PATH=${GOPATH}/bin:${PATH}" - mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin" - export GOPROXY=https://proxy.golang.org,direct - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.45.0 + - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.46.2 - curl -sSfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin" - checkout - cache restore traefik-$(checksum go.sum) diff --git a/build.Dockerfile b/build.Dockerfile index 4424e3603..8d3159c8e 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -13,7 +13,7 @@ RUN mkdir -p /usr/local/bin \ | tar -xzC /usr/local/bin --transform 's#^.+/##x' # Download golangci-lint binary to bin folder in $GOPATH -RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOPATH/bin v1.45.0 +RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOPATH/bin v1.46.2 # Download misspell binary to bin folder in $GOPATH RUN curl -sfL https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | bash -s -- -b $GOPATH/bin v0.3.4 diff --git a/integration/https_test.go b/integration/https_test.go index b10eb37f2..6ddda5e8e 100644 --- a/integration/https_test.go +++ b/integration/https_test.go @@ -1072,7 +1072,7 @@ func (s *HTTPSSuite) TestEntryPointHttpsRedirectAndPathModification(c *check.C) resp.Body.Close() location := resp.Header.Get("Location") - expected := fmt.Sprintf("https://%s:8443%s", host, test.path) + expected := "https://" + net.JoinHostPort(host, "8443") + test.path c.Assert(location, checker.Equals, expected) } diff --git a/integration/timeout_test.go b/integration/timeout_test.go index b5a68e7e9..68c5886ca 100644 --- a/integration/timeout_test.go +++ b/integration/timeout_test.go @@ -2,6 +2,7 @@ package integration import ( "fmt" + "net" "net/http" "os" "time" @@ -38,7 +39,8 @@ func (s *TimeoutSuite) TestForwardingTimeouts(c *check.C) { c.Assert(response.StatusCode, checker.Equals, http.StatusGatewayTimeout) // Check that timeout service is available - statusURL := fmt.Sprintf("http://%s:9000/statusTest?status=200", timeoutEndpointIP) + statusURL := fmt.Sprintf("http://%s/statusTest?status=200", + net.JoinHostPort(timeoutEndpointIP, "9000")) c.Assert(try.GetRequest(statusURL, 60*time.Second, try.StatusCodeIs(http.StatusOK)), checker.IsNil) // This simulates a ResponseHeaderTimeout. From 86cc6df374df953d0b71fbbeb47e95c5a0083910 Mon Sep 17 00:00:00 2001 From: Baptiste Mayelle Date: Wed, 18 May 2022 17:22:08 +0200 Subject: [PATCH 15/25] feat: use dedicated entrypoint for the tunnels Co-authored-by: Fernandez Ludovic <[ldez@users.noreply.github.com](mailto:ldez@users.noreply.github.com)> --- cmd/traefik/traefik.go | 5 +- docs/content/migration/v2.md | 7 - docs/content/plugins/index.md | 5 - .../reference/static-configuration/cli-ref.md | 3 - .../reference/static-configuration/env-ref.md | 3 - .../reference/static-configuration/file.toml | 1 - .../reference/static-configuration/file.yaml | 1 - docs/content/traefik-hub/index.md | 295 ------------------ docs/mkdocs.yml | 1 - pkg/config/static/hub.go | 53 ++++ pkg/config/static/pilot.go | 1 - pkg/config/static/static_config.go | 59 +--- pkg/config/static/static_config_test.go | 88 ++++++ pkg/provider/hub/hub.go | 19 +- 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 +++++++ 21 files changed, 386 insertions(+), 384 deletions(-) delete mode 100644 docs/content/traefik-hub/index.md create mode 100644 pkg/config/static/hub.go create mode 100644 pkg/config/static/static_config_test.go create mode 100644 webui/src/components/platform/PlatformAuthState.vue create mode 100644 webui/src/components/platform/PlatformPanel.vue diff --git a/cmd/traefik/traefik.go b/cmd/traefik/traefik.go index 875eff503..47f409a0b 100644 --- a/cmd/traefik/traefik.go +++ b/cmd/traefik/traefik.go @@ -34,6 +34,7 @@ import ( "github.com/traefik/traefik/v2/pkg/pilot" "github.com/traefik/traefik/v2/pkg/provider/acme" "github.com/traefik/traefik/v2/pkg/provider/aggregator" + "github.com/traefik/traefik/v2/pkg/provider/hub" "github.com/traefik/traefik/v2/pkg/provider/traefik" "github.com/traefik/traefik/v2/pkg/safe" "github.com/traefik/traefik/v2/pkg/server" @@ -215,8 +216,6 @@ 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 } @@ -363,7 +362,7 @@ func getDefaultsEntrypoints(staticConfiguration *static.Configuration) []string var defaultEntryPoints []string for name, cfg := range staticConfiguration.EntryPoints { // Traefik Hub entryPoint should not be part of the set of default entryPoints. - if staticConfiguration.Hub != nil && staticConfiguration.Hub.EntryPoint == name { + if hub.APIEntrypoint == name || hub.TunnelEntrypoint == name { continue } diff --git a/docs/content/migration/v2.md b/docs/content/migration/v2.md index d3f80dcde..fa5b87112 100644 --- a/docs/content/migration/v2.md +++ b/docs/content/migration/v2.md @@ -457,10 +457,3 @@ 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 the [feature deprecation page](../deprecation/features.md) and our Blog for migration instructions later this year. diff --git a/docs/content/plugins/index.md b/docs/content/plugins/index.md index 421044278..f5062b21f 100644 --- a/docs/content/plugins/index.md +++ b/docs/content/plugins/index.md @@ -5,11 +5,6 @@ description: "Learn how to connect Traefik Proxy with Pilot, a SaaS platform tha # 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/docs/content/reference/static-configuration/cli-ref.md b/docs/content/reference/static-configuration/cli-ref.md index 9345cded4..bcd6fc904 100644 --- a/docs/content/reference/static-configuration/cli-ref.md +++ b/docs/content/reference/static-configuration/cli-ref.md @@ -222,9 +222,6 @@ The maximal depth of DNS recursive resolving (Default: ```5```) `--hub`: Traefik Hub configuration. (Default: ```false```) -`--hub.entrypoint`: -Entrypoint that exposes data for Traefik Hub. It should be a dedicated one, and not used by any router. (Default: ```traefik-hub```) - `--hub.tls.ca`: The certificate authority authenticates the Traefik Hub Agent certificate. diff --git a/docs/content/reference/static-configuration/env-ref.md b/docs/content/reference/static-configuration/env-ref.md index 340917400..ccaacfe1f 100644 --- a/docs/content/reference/static-configuration/env-ref.md +++ b/docs/content/reference/static-configuration/env-ref.md @@ -222,9 +222,6 @@ The maximal depth of DNS recursive resolving (Default: ```5```) `TRAEFIK_HUB`: Traefik Hub configuration. (Default: ```false```) -`TRAEFIK_HUB_ENTRYPOINT`: -Entrypoint that exposes data for Traefik Hub. It should be a dedicated one, and not used by any router. (Default: ```traefik-hub```) - `TRAEFIK_HUB_TLS_CA`: The certificate authority authenticates the Traefik Hub Agent certificate. diff --git a/docs/content/reference/static-configuration/file.toml b/docs/content/reference/static-configuration/file.toml index cab590f6f..d81a6b7d9 100644 --- a/docs/content/reference/static-configuration/file.toml +++ b/docs/content/reference/static-configuration/file.toml @@ -426,7 +426,6 @@ dashboard = true [hub] - entrypoint = "foobar" [hub.tls] insecure = true ca = "foobar" diff --git a/docs/content/reference/static-configuration/file.yaml b/docs/content/reference/static-configuration/file.yaml index 88e602f1d..5da697177 100644 --- a/docs/content/reference/static-configuration/file.yaml +++ b/docs/content/reference/static-configuration/file.yaml @@ -447,7 +447,6 @@ pilot: token: foobar dashboard: true hub: - entrypoint: foobar tls: insecure: true ca: foobar diff --git a/docs/content/traefik-hub/index.md b/docs/content/traefik-hub/index.md deleted file mode 100644 index d6fa92dfe..000000000 --- a/docs/content/traefik-hub/index.md +++ /dev/null @@ -1,295 +0,0 @@ -# Traefik Hub (Experimental) - -## Overview - -Once the Traefik Hub Experimental feature is enabled in Traefik, -Traefik and its local agent communicate together. -This agent can: - -* get the Traefik metrics to display them in the Traefik Hub UI -* secure the Traefik routers -* provide ACME certificates to Traefik -* transfer requests from the SaaS Platform to Traefik (and then avoid the users to expose directly their infrastructure on the internet) - -!!! warning "Traefik Hub EntryPoint" - - When the Traefik Hub feature is enabled, Traefik exposes some services meant for the Traefik Hub Agent on a dedicated entryPoint (on port `9900` by default). - Given their sensitive nature, those services should not be publicly exposed. - Also this dedicated entryPoint, regardless of how it is created (default, or user-defined), should not be used by anything other than the Hub Agent. - -!!! important "Learn More About Traefik Hub" - - This section is intended only as a brief overview for Traefik users who are not familiar with Traefik Hub. - To explore all that Traefik Hub has to offer, please consult the [Traefik Hub Documentation](https://doc.traefik.io/traefik-hub). - -!!! Note "Prerequisites" - - * Traefik Hub is compatible with Traefik Proxy 2.7 or later. - * The Traefik Hub Agent must be installed to connect to the Traefik Hub platform. - * Activate this feature in the experimental section of the static configuration. - -!!! example "Minimal Static Configuration to Activate Traefik Hub" - - ```yaml tab="File (YAML)" - experimental: - hub: true - - hub: - tls: - insecure: true - - metrics: - prometheus: {} - ``` - - ```toml tab="File (TOML)" - [experimental] - hub = true - - [hub] - [hub.tls] - insecure = true - - [metrics] - [metrics.prometheus] - ``` - - ```bash tab="CLI" - --experimental.hub - --hub.tls.insecure=true - --metrics.prometheus=true - ``` - -## Configuration - -### `entryPoint` - -_Optional, Default="traefik-hub"_ - -Defines the entryPoint that exposes data for Traefik Hub Agent. - -!!! info - - * If no entryPoint is defined, a default `traefik-hub` entryPoint is created (on port `9900`). - * If defined, the value must match an existing entryPoint name. - * This dedicated Traefik Hub entryPoint should not be used by anything other than Traefik Hub. - -```yaml tab="File (YAML)" -entryPoints: - hub-ep: ":8000" - -hub: - entryPoint: "hub-ep" -``` - -```toml tab="File (TOML)" -[entryPoints.hub-ep] - address = ":8000" - -[hub] - entryPoint = "hub-ep" -``` - -```bash tab="CLI" ---entrypoints.hub-ep.address=:8000 ---hub.entrypoint=hub-ep -``` - -### `tls` - -_Required, Default=None_ - -This section allows configuring mutual TLS connection between Traefik Proxy and the Traefik Hub Agent. -The key and the certificate are the credentials for Traefik Proxy as a TLS client. -The certificate authority authenticates the Traefik Hub Agent certificate. - -!!! note "Certificate Domain" - - The certificate must be valid for the `proxy.traefik` domain. - -!!! note "Certificates Definition" - - Certificates can be defined either by their content or their path. - -!!! note "Insecure Mode" - - The `insecure` option is mutually exclusive with any other option. - -```yaml tab="File (YAML)" -hub: - tls: - ca: /path/to/ca.pem - cert: /path/to/cert.pem - key: /path/to/key.pem -``` - -```toml tab="File (TOML)" -[hub.tls] - ca= "/path/to/ca.pem" - cert= "/path/to/cert.pem" - key= "/path/to/key.pem" -``` - -```bash tab="CLI" ---hub.tls.ca=/path/to/ca.pem ---hub.tls.cert=/path/to/cert.pem ---hub.tls.key=/path/to/key.pem -``` - -### `tls.ca` - -The certificate authority authenticates the Traefik Hub Agent certificate. - -```yaml tab="File (YAML)" -hub: - tls: - ca: |- - -----BEGIN CERTIFICATE----- - MIIBcjCCARegAwIBAgIQaewCzGdRz5iNnjAiEoO5AzAKBggqhkjOPQQDAjASMRAw - DgYDVQQKEwdBY21lIENvMCAXDTIyMDMyMTE2MTY0NFoYDzIxMjIwMjI1MTYxNjQ0 - WjASMRAwDgYDVQQKEwdBY21lIENvMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE - ZaKYPj2G8Hnmju6jbHt+vODwKqNDVQMH5nxhtAgSUZS61mLWwZvvUhIYLNPwHz8a - x8C7+cuihEC6Tzvn8DeGeKNNMEswDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoG - CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwFgYDVR0RBA8wDYILZXhhbXBsZS5jb20w - CgYIKoZIzj0EAwIDSQAwRgIhAO8sucDGY+JOrNgQg1a9ZqqYvbxPFnYsSZr7F/vz - aUX2AiEAilZ+M5eX4RiMFc3nlm9qVs1LZhV3dZW/u80/mPQ/oaY= - -----END CERTIFICATE----- -``` - -```toml tab="File (TOML)" -[hub.tls] - ca = """-----BEGIN CERTIFICATE----- -MIIBcjCCARegAwIBAgIQaewCzGdRz5iNnjAiEoO5AzAKBggqhkjOPQQDAjASMRAw -DgYDVQQKEwdBY21lIENvMCAXDTIyMDMyMTE2MTY0NFoYDzIxMjIwMjI1MTYxNjQ0 -WjASMRAwDgYDVQQKEwdBY21lIENvMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE -ZaKYPj2G8Hnmju6jbHt+vODwKqNDVQMH5nxhtAgSUZS61mLWwZvvUhIYLNPwHz8a -x8C7+cuihEC6Tzvn8DeGeKNNMEswDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoG -CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwFgYDVR0RBA8wDYILZXhhbXBsZS5jb20w -CgYIKoZIzj0EAwIDSQAwRgIhAO8sucDGY+JOrNgQg1a9ZqqYvbxPFnYsSZr7F/vz -aUX2AiEAilZ+M5eX4RiMFc3nlm9qVs1LZhV3dZW/u80/mPQ/oaY= ------END CERTIFICATE-----""" -``` - -```bash tab="CLI" ---hub.tls.ca=-----BEGIN CERTIFICATE----- -MIIBcjCCARegAwIBAgIQaewCzGdRz5iNnjAiEoO5AzAKBggqhkjOPQQDAjASMRAw -DgYDVQQKEwdBY21lIENvMCAXDTIyMDMyMTE2MTY0NFoYDzIxMjIwMjI1MTYxNjQ0 -WjASMRAwDgYDVQQKEwdBY21lIENvMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE -ZaKYPj2G8Hnmju6jbHt+vODwKqNDVQMH5nxhtAgSUZS61mLWwZvvUhIYLNPwHz8a -x8C7+cuihEC6Tzvn8DeGeKNNMEswDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoG -CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwFgYDVR0RBA8wDYILZXhhbXBsZS5jb20w -CgYIKoZIzj0EAwIDSQAwRgIhAO8sucDGY+JOrNgQg1a9ZqqYvbxPFnYsSZr7F/vz -aUX2AiEAilZ+M5eX4RiMFc3nlm9qVs1LZhV3dZW/u80/mPQ/oaY= ------END CERTIFICATE----- -``` - -### `tls.cert` - -The TLS certificate for Traefik Proxy as a TLS client. - -!!! note "Certificate Domain" - - The certificate must be valid for the `proxy.traefik` domain. - -```yaml tab="File (YAML)" -hub: - tls: - cert: |- - -----BEGIN CERTIFICATE----- - MIIBcjCCARegAwIBAgIQaewCzGdRz5iNnjAiEoO5AzAKBggqhkjOPQQDAjASMRAw - DgYDVQQKEwdBY21lIENvMCAXDTIyMDMyMTE2MTY0NFoYDzIxMjIwMjI1MTYxNjQ0 - WjASMRAwDgYDVQQKEwdBY21lIENvMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE - ZaKYPj2G8Hnmju6jbHt+vODwKqNDVQMH5nxhtAgSUZS61mLWwZvvUhIYLNPwHz8a - x8C7+cuihEC6Tzvn8DeGeKNNMEswDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoG - CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwFgYDVR0RBA8wDYILZXhhbXBsZS5jb20w - CgYIKoZIzj0EAwIDSQAwRgIhAO8sucDGY+JOrNgQg1a9ZqqYvbxPFnYsSZr7F/vz - aUX2AiEAilZ+M5eX4RiMFc3nlm9qVs1LZhV3dZW/u80/mPQ/oaY= - -----END CERTIFICATE----- -``` - -```toml tab="File (TOML)" -[hub.tls] - cert = """-----BEGIN CERTIFICATE----- -MIIBcjCCARegAwIBAgIQaewCzGdRz5iNnjAiEoO5AzAKBggqhkjOPQQDAjASMRAw -DgYDVQQKEwdBY21lIENvMCAXDTIyMDMyMTE2MTY0NFoYDzIxMjIwMjI1MTYxNjQ0 -WjASMRAwDgYDVQQKEwdBY21lIENvMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE -ZaKYPj2G8Hnmju6jbHt+vODwKqNDVQMH5nxhtAgSUZS61mLWwZvvUhIYLNPwHz8a -x8C7+cuihEC6Tzvn8DeGeKNNMEswDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoG -CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwFgYDVR0RBA8wDYILZXhhbXBsZS5jb20w -CgYIKoZIzj0EAwIDSQAwRgIhAO8sucDGY+JOrNgQg1a9ZqqYvbxPFnYsSZr7F/vz -aUX2AiEAilZ+M5eX4RiMFc3nlm9qVs1LZhV3dZW/u80/mPQ/oaY= ------END CERTIFICATE-----""" -``` - -```bash tab="CLI" ---hub.tls.cert=-----BEGIN CERTIFICATE----- -MIIBcjCCARegAwIBAgIQaewCzGdRz5iNnjAiEoO5AzAKBggqhkjOPQQDAjASMRAw -DgYDVQQKEwdBY21lIENvMCAXDTIyMDMyMTE2MTY0NFoYDzIxMjIwMjI1MTYxNjQ0 -WjASMRAwDgYDVQQKEwdBY21lIENvMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE -ZaKYPj2G8Hnmju6jbHt+vODwKqNDVQMH5nxhtAgSUZS61mLWwZvvUhIYLNPwHz8a -x8C7+cuihEC6Tzvn8DeGeKNNMEswDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoG -CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwFgYDVR0RBA8wDYILZXhhbXBsZS5jb20w -CgYIKoZIzj0EAwIDSQAwRgIhAO8sucDGY+JOrNgQg1a9ZqqYvbxPFnYsSZr7F/vz -aUX2AiEAilZ+M5eX4RiMFc3nlm9qVs1LZhV3dZW/u80/mPQ/oaY= ------END CERTIFICATE----- -``` - -### `tls.key` - -The TLS key for Traefik Proxy as a TLS client. - -```yaml tab="File (YAML)" -hub: - tls: - key: |- - -----BEGIN PRIVATE KEY----- - MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgm+XJ3LVrTbbirJea - O+Crj2ADVsVHjMuiyd72VE3lgxihRANCAARlopg+PYbweeaO7qNse3684PAqo0NV - AwfmfGG0CBJRlLrWYtbBm+9SEhgs0/AfPxrHwLv5y6KEQLpPO+fwN4Z4 - -----END PRIVATE KEY----- -``` - -```toml tab="File (TOML)" -[hub.tls] - key = """-----BEGIN PRIVATE KEY----- -MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgm+XJ3LVrTbbirJea -O+Crj2ADVsVHjMuiyd72VE3lgxihRANCAARlopg+PYbweeaO7qNse3684PAqo0NV -AwfmfGG0CBJRlLrWYtbBm+9SEhgs0/AfPxrHwLv5y6KEQLpPO+fwN4Z4 ------END PRIVATE KEY-----""" -``` - -```bash tab="CLI" ---hub.tls.key=-----BEGIN PRIVATE KEY----- -MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgm+XJ3LVrTbbirJea -O+Crj2ADVsVHjMuiyd72VE3lgxihRANCAARlopg+PYbweeaO7qNse3684PAqo0NV -AwfmfGG0CBJRlLrWYtbBm+9SEhgs0/AfPxrHwLv5y6KEQLpPO+fwN4Z4 ------END PRIVATE KEY----- -``` - -### `tls.insecure` - -_Optional, Default=false_ - -Enables an insecure TLS connection that uses default credentials, -and which has no peer authentication between Traefik Proxy and the Traefik Hub Agent. -The `insecure` option is mutually exclusive with any other option. - -!!! warning "Security Consideration" - - Do not use this setup in production. - This option implies sensitive data can be exposed to potential malicious third-party programs. - -```yaml tab="File (YAML)" -hub: - tls: - insecure: true -``` - -```toml tab="File (TOML)" -[hub.tls] - insecure = true -``` - -```bash tab="CLI" ---hub.tls.insecure=true -``` diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a3a8a0497..08c78cae2 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -136,7 +136,6 @@ nav: - 'InFlightConn': 'middlewares/tcp/inflightconn.md' - 'IpWhitelist': 'middlewares/tcp/ipwhitelist.md' - 'Plugins & Traefik Pilot': 'plugins/index.md' - - 'Traefik Hub': 'traefik-hub/index.md' - 'Operations': - 'CLI': 'operations/cli.md' - 'Dashboard' : 'operations/dashboard.md' diff --git a/pkg/config/static/hub.go b/pkg/config/static/hub.go new file mode 100644 index 000000000..ee78de975 --- /dev/null +++ b/pkg/config/static/hub.go @@ -0,0 +1,53 @@ +package static + +import ( + "errors" + + "github.com/traefik/traefik/v2/pkg/log" + "github.com/traefik/traefik/v2/pkg/provider/hub" +) + +func (c *Configuration) initHubProvider() error { + // Hub provider is an experimental feature. It requires the experimental flag to be enabled before continuing. + if c.Experimental == nil || !c.Experimental.Hub { + return errors.New("the experimental flag for Hub is not set") + } + + if _, ok := c.EntryPoints[hub.TunnelEntrypoint]; !ok { + var ep EntryPoint + ep.SetDefaults() + ep.Address = ":9901" + c.EntryPoints[hub.TunnelEntrypoint] = &ep + log.WithoutContext().Infof("The entryPoint %q is created on port 9901 to allow exposition of services.", hub.TunnelEntrypoint) + } + + if c.Hub.TLS == nil { + return nil + } + + if c.Hub.TLS.Insecure && (c.Hub.TLS.CA != "" || c.Hub.TLS.Cert != "" || c.Hub.TLS.Key != "") { + return errors.New("mTLS configuration for Hub and insecure TLS for Hub are mutually exclusive") + } + + if !c.Hub.TLS.Insecure && (c.Hub.TLS.CA == "" || c.Hub.TLS.Cert == "" || c.Hub.TLS.Key == "") { + return errors.New("incomplete mTLS configuration for Hub") + } + + if c.Hub.TLS.Insecure { + log.WithoutContext().Warn("Hub is in `insecure` mode. Do not run in production with this setup.") + } + + if _, ok := c.EntryPoints[hub.APIEntrypoint]; !ok { + var ep EntryPoint + ep.SetDefaults() + ep.Address = ":9900" + c.EntryPoints[hub.APIEntrypoint] = &ep + log.WithoutContext().Infof("The entryPoint %q is created on port 9900 to allow Traefik to communicate with the Hub Agent for Traefik.", hub.APIEntrypoint) + } + + c.EntryPoints[hub.APIEntrypoint].HTTP.TLS = &TLSConfig{ + Options: "traefik-hub", + } + + return nil +} diff --git a/pkg/config/static/pilot.go b/pkg/config/static/pilot.go index f3699a729..147c8917b 100644 --- a/pkg/config/static/pilot.go +++ b/pkg/config/static/pilot.go @@ -1,7 +1,6 @@ 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 961786f94..b285996f8 100644 --- a/pkg/config/static/static_config.go +++ b/pkg/config/static/static_config.go @@ -1,7 +1,6 @@ package static import ( - "errors" "fmt" stdlog "log" "strings" @@ -78,7 +77,6 @@ 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"` Hub *hub.Provider `description:"Traefik Hub configuration." json:"hub,omitempty" toml:"hub,omitempty" yaml:"hub,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"` @@ -201,7 +199,7 @@ type Providers struct { // It also takes care of maintaining backwards compatibility. func (c *Configuration) SetEffectiveConfiguration() { // Creates the default entry point if needed - if len(c.EntryPoints) == 0 || (c.Hub != nil && len(c.EntryPoints) == 1 && c.EntryPoints[c.Hub.EntryPoint] != nil) { + if !c.hasUserDefinedEntrypoint() { ep := &EntryPoint{Address: ":80"} ep.SetDefaults() // TODO: double check this tomorrow @@ -287,6 +285,21 @@ func (c *Configuration) SetEffectiveConfiguration() { c.initACMEProvider() } +func (c *Configuration) hasUserDefinedEntrypoint() bool { + if len(c.EntryPoints) == 0 { + return false + } + + switch len(c.EntryPoints) { + case 1: + return c.EntryPoints[hub.TunnelEntrypoint] == nil + case 2: + return c.EntryPoints[hub.TunnelEntrypoint] == nil || c.EntryPoints[hub.APIEntrypoint] == nil + default: + return true + } +} + func (c *Configuration) initACMEProvider() { for _, resolver := range c.CertificatesResolvers { if resolver.ACME != nil { @@ -297,46 +310,6 @@ func (c *Configuration) initACMEProvider() { legolog.Logger = stdlog.New(log.WithoutContext().WriterLevel(logrus.DebugLevel), "legolog: ", 0) } -func (c *Configuration) initHubProvider() error { - // Hub provider is an experimental feature. Require the experimental flag to be enabled before continuing. - if c.Experimental == nil || !c.Experimental.Hub { - return errors.New("experimental flag for Hub not set") - } - - if c.Hub.TLS == nil { - return errors.New("no TLS configuration defined for Hub") - } - - if c.Hub.TLS.Insecure && (c.Hub.TLS.CA != "" || c.Hub.TLS.Cert != "" || c.Hub.TLS.Key != "") { - return errors.New("mTLS configuration for Hub and insecure TLS for Hub are mutually exclusive") - } - - if !c.Hub.TLS.Insecure && (c.Hub.TLS.CA == "" || c.Hub.TLS.Cert == "" || c.Hub.TLS.Key == "") { - return errors.New("incomplete mTLS configuration for Hub") - } - - if c.Hub.TLS.Insecure { - log.WithoutContext().Warn("Hub is in `insecure` mode. Do not run in production with this setup.") - } - - // Creates the internal Hub entry point if needed. - if c.Hub.EntryPoint == hub.DefaultEntryPointName { - if _, ok := c.EntryPoints[hub.DefaultEntryPointName]; !ok { - var ep EntryPoint - ep.SetDefaults() - ep.Address = ":9900" - c.EntryPoints[hub.DefaultEntryPointName] = &ep - log.WithoutContext().Infof("The entryPoint %q is created on port 9900 to allow Traefik to communicate with the Hub Agent for Traefik.", hub.DefaultEntryPointName) - } - } - - c.EntryPoints[c.Hub.EntryPoint].HTTP.TLS = &TLSConfig{ - Options: "traefik-hub", - } - - return nil -} - // ValidateConfiguration validate that configuration is coherent. func (c *Configuration) ValidateConfiguration() error { var acmeEmail string diff --git a/pkg/config/static/static_config_test.go b/pkg/config/static/static_config_test.go new file mode 100644 index 000000000..9680233dd --- /dev/null +++ b/pkg/config/static/static_config_test.go @@ -0,0 +1,88 @@ +package static + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/traefik/traefik/v2/pkg/provider/hub" +) + +func TestHasEntrypoint(t *testing.T) { + tests := []struct { + desc string + entryPoints map[string]*EntryPoint + assert assert.BoolAssertionFunc + }{ + { + desc: "no user defined entryPoints", + assert: assert.False, + }, + { + desc: "user defined entryPoints", + entryPoints: map[string]*EntryPoint{ + "foo": {}, + }, + assert: assert.True, + }, + { + desc: "user defined entryPoints + hub entryPoint (tunnel)", + entryPoints: map[string]*EntryPoint{ + "foo": {}, + hub.TunnelEntrypoint: {}, + }, + assert: assert.True, + }, + { + desc: "hub entryPoint (tunnel)", + entryPoints: map[string]*EntryPoint{ + hub.TunnelEntrypoint: {}, + }, + assert: assert.False, + }, + { + desc: "user defined entryPoints + hub entryPoint (api)", + entryPoints: map[string]*EntryPoint{ + "foo": {}, + hub.APIEntrypoint: {}, + }, + assert: assert.True, + }, + { + desc: "hub entryPoint (api)", + entryPoints: map[string]*EntryPoint{ + hub.APIEntrypoint: {}, + }, + assert: assert.True, + }, + { + desc: "user defined entryPoints + hub entryPoints (tunnel, api)", + entryPoints: map[string]*EntryPoint{ + "foo": {}, + hub.TunnelEntrypoint: {}, + hub.APIEntrypoint: {}, + }, + assert: assert.True, + }, + { + desc: "hub entryPoints (tunnel, api)", + entryPoints: map[string]*EntryPoint{ + hub.TunnelEntrypoint: {}, + hub.APIEntrypoint: {}, + }, + assert: assert.False, + }, + } + + for _, test := range tests { + test := test + t.Run(test.desc, func(t *testing.T) { + t.Parallel() + + cfg := &Configuration{ + EntryPoints: test.entryPoints, + } + + test.assert(t, cfg.hasUserDefinedEntrypoint()) + }) + } +} diff --git a/pkg/provider/hub/hub.go b/pkg/provider/hub/hub.go index 1643a0980..62e2ace88 100644 --- a/pkg/provider/hub/hub.go +++ b/pkg/provider/hub/hub.go @@ -17,13 +17,15 @@ import ( var _ provider.Provider = (*Provider)(nil) -// DefaultEntryPointName is the name of the default internal entry point. -const DefaultEntryPointName = "traefik-hub" +// Entrypoints created for Hub. +const ( + APIEntrypoint = "traefikhub-api" + TunnelEntrypoint = "traefikhub-tunl" +) // Provider holds configurations of the provider. type Provider struct { - EntryPoint string `description:"Entrypoint that exposes data for Traefik Hub. It should be a dedicated one, and not used by any router." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty" export:"true"` - TLS *TLS `description:"TLS configuration for mTLS communication between Traefik and Hub Agent." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"` + TLS *TLS `description:"TLS configuration for mTLS communication between Traefik and Hub Agent." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"` server *http.Server } @@ -36,11 +38,6 @@ type TLS struct { Key ttls.FileOrContent `description:"The TLS key for Traefik Proxy as a TLS client." json:"key,omitempty" toml:"key,omitempty" yaml:"key,omitempty" loggable:"false"` } -// SetDefaults sets the default values. -func (p *Provider) SetDefaults() { - p.EntryPoint = DefaultEntryPointName -} - // Init the provider. func (p *Provider) Init() error { return nil @@ -59,7 +56,7 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, _ *safe.Poo return fmt.Errorf("creating Hub Agent HTTP client: %w", err) } - p.server = &http.Server{Handler: newHandler(p.EntryPoint, port, configurationChan, p.TLS, client)} + p.server = &http.Server{Handler: newHandler(APIEntrypoint, port, configurationChan, p.TLS, client)} // TODO: this is going to be leaky (because no context to make it terminate) // if/when Provide lifecycle differs with Traefik lifecycle. @@ -70,7 +67,7 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, _ *safe.Poo } }() - exposeAPIAndMetrics(configurationChan, p.EntryPoint, port, p.TLS) + exposeAPIAndMetrics(configurationChan, APIEntrypoint, port, p.TLS) return nil } diff --git a/webui/Dockerfile b/webui/Dockerfile index edb9593bc..643f12f8e 100644 --- a/webui/Dockerfile +++ b/webui/Dockerfile @@ -2,6 +2,8 @@ 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 07eec1a8d..c7dc90513 100644 --- a/webui/quasar.conf.js +++ b/webui/quasar.conf.js @@ -118,11 +118,13 @@ 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') + APP_API: JSON.stringify(process.env.APP_API || '/api'), + PLATFORM_URL: JSON.stringify(process.env.PLATFORM_URL || 'https://pilot.traefik.io') } : { // production: APP_ENV: JSON.stringify(process.env.APP_ENV), - APP_API: JSON.stringify(process.env.APP_API || '/api') + APP_API: JSON.stringify(process.env.APP_API || '/api'), + PLATFORM_URL: JSON.stringify(process.env.PLATFORM_URL || 'https://pilot.traefik.io') }, uglifyOptions: { compress: { diff --git a/webui/src/App.vue b/webui/src/App.vue index d655741b1..bb6e93e60 100644 --- a/webui/src/App.vue +++ b/webui/src/App.vue @@ -1,17 +1,26 @@ + + diff --git a/webui/src/components/platform/PlatformPanel.vue b/webui/src/components/platform/PlatformPanel.vue new file mode 100644 index 000000000..a24f2bb1a --- /dev/null +++ b/webui/src/components/platform/PlatformPanel.vue @@ -0,0 +1,112 @@ +