From 8527369797d30435d607d1fcf479ea08c23ac80e Mon Sep 17 00:00:00 2001 From: Takuto Nagami <84759675+logica0419@users.noreply.github.com> Date: Tue, 29 Oct 2024 20:12:04 +0900 Subject: [PATCH 01/22] Add Compress middleware to migration guide --- docs/content/migration/v3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/migration/v3.md b/docs/content/migration/v3.md index d4cf9fc3e..de2e660b4 100644 --- a/docs/content/migration/v3.md +++ b/docs/content/migration/v3.md @@ -80,7 +80,7 @@ Please use the `disableClusterScopeResources` option instead to avoid cluster sc ### Kubernetes CRD Provider -Starting with v3.2, the CRDs has been updated on [TraefikService](../routing/services#mirroring-service) (PR [#11032](https://github.com/traefik/traefik/pull/11032)) and on [RateLimit](../middlewares/http/ratelimit) & [InFlightReq](../middlewares/http/inflightreq) middlewares (PR [#9747](https://github.com/traefik/traefik/pull/9747)). +Starting with v3.2, the CRDs has been updated on [TraefikService](../routing/services#mirroring-service) (PR [#11032](https://github.com/traefik/traefik/pull/11032)), on [RateLimit](../middlewares/http/ratelimit) & [InFlightReq](../middlewares/http/inflightreq) middlewares (PR [#9747](https://github.com/traefik/traefik/pull/9747)) and on [Compress](../middlewares/http/compress) middleware (PR [#10943](https://github.com/traefik/traefik/pull/10943)). This update adds only new optional fields. CRDs can be updated with this command: From 6f18344c56a6ebe43c5084af2002eec331dd80cf Mon Sep 17 00:00:00 2001 From: Anchal Sharma Date: Wed, 30 Oct 2024 15:24:04 +0530 Subject: [PATCH 02/22] Add a warning about environment variables casing for static configuration --- .../reference/static-configuration/env.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/content/reference/static-configuration/env.md b/docs/content/reference/static-configuration/env.md index e894850b2..d1758fa18 100644 --- a/docs/content/reference/static-configuration/env.md +++ b/docs/content/reference/static-configuration/env.md @@ -5,4 +5,23 @@ description: "Reference the environment variables for static configuration in Tr # Static Configuration: Environment variables +!!! warning "Environment Variable Casing" + + Traefik normalizes the environment variable key-value pairs by lowercasing them. + This means that when you interpolate a string in an environment variable's name, + that string will be treated as lowercase, regardless of its original casing. + + For example, assuming you have set environment variables as follows: + + ```bash + export TRAEFIK_ENTRYPOINTS_WEB=true + export TRAEFIK_ENTRYPOINTS_WEB_ADDRESS=:80 + + export TRAEFIK_CERTIFICATESRESOLVERS_myResolver=true + export TRAEFIK_CERTIFICATESRESOLVERS_myResolver_ACME_CASERVER=.... + ``` + + Although the Entrypoint is named `WEB` and the Certificate Resolver is named `myResolver`, + they have to be referenced respectively as `web`, and `myresolver` in the configuration. + --8<-- "content/reference/static-configuration/env-ref.md" From 47466a456ee8d62a741b9f919447605341ceca6c Mon Sep 17 00:00:00 2001 From: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:54:04 +0100 Subject: [PATCH 03/22] Document how to use Certificates of cert-manager --- docs/content/user-guides/cert-manager.md | 183 +++++++++++++++++++++++ docs/mkdocs.yml | 1 + 2 files changed, 184 insertions(+) create mode 100644 docs/content/user-guides/cert-manager.md diff --git a/docs/content/user-guides/cert-manager.md b/docs/content/user-guides/cert-manager.md new file mode 100644 index 000000000..f776ea0fa --- /dev/null +++ b/docs/content/user-guides/cert-manager.md @@ -0,0 +1,183 @@ +--- +title: "Integration with cert-manager" +description: "Learn how to use cert-manager certificates with Traefik Proxy for your routers. Read the technical documentation." +--- + +# cert-manager + +Provision TLS Certificate for Traefik Proxy with cert-manager on Kubernetes +{: .subtitle } + +## Pre-requisites + +To obtain certificates from cert-manager that can be used in Traefik Proxy, you will need to: + +1. Have cert-manager properly configured +2. Have Traefik Proxy configured + +The certificates can then be used in an Ingress / IngressRoute / HTTPRoute. + +## Example with ACME and HTTP challenge + +!!! example "ACME issuer for HTTP challenge" + + ```yaml tab="Issuer" + apiVersion: cert-manager.io/v1 + kind: Issuer + metadata: + name: acme + + spec: + acme: + # Production server is on https://acme-v02.api.letsencrypt.org/directory + # Use staging by default. + server: https://acme-staging-v02.api.letsencrypt.org/directory + privateKeySecretRef: + name: acme + solvers: + - http01: + ingress: + ingressClassName: traefik + ``` + + ```yaml tab="Certificate" + apiVersion: cert-manager.io/v1 + kind: Certificate + metadata: + name: whoami + namespace: traefik + spec: + secretName: domain-tls # <=== Name of secret where the generated certificate will be stored. + dnsNames: + - "domain.example.com" + issuerRef: + name: acme + kind: Issuer + ``` + +Let's see now how to use it with the various Kubernetes providers of Traefik Proxy. +The enabled providers can be seen on the [dashboard](../../operations/dashboard/) of Traefik Proxy and also in the INFO logs when Traefik Proxy starts. + +### With an Ingress + +To use this certificate with an Ingress, the [Kubernetes Ingress](../../providers/kubernetes-ingress/) provider has to be enabled. + +!!! info Traefik Helm Chart + + This provider is enabled by default in the Traefik Helm Chart. + +!!! example "Route with this Certificate" + + ```yaml tab="Ingress" + apiVersion: networking.k8s.io/v1 + kind: Ingress + metadata: + name: domain + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure + + spec: + rules: + - host: domain.example.com + http: + paths: + - path: / + pathType: Exact + backend: + service: + name: domain-service + port: + number: 80 + tls: + - secretName: domain-tls # <=== Use the name defined in Certificate resource. + ``` + +### With an IngressRoute + +To use this certificate with an IngressRoute, the [Kubernetes CRD](../../providers/kubernetes-crd) provider has to be enabled. + +!!! info Traefik Helm Chart + + This provider is enabled by default in the Traefik Helm Chart. + +!!! example "Route with this Certificate" + + ```yaml tab="IngressRoute" + apiVersion: traefik.io/v1alpha1 + kind: IngressRoute + metadata: + name: domain + + spec: + entryPoints: + - websecure + + routes: + - match: Host(`domain.example.com`) + kind: Rule + services: + - name: domain-service + port: 80 + tls: + secretName: domain-tls # <=== Use the name defined in Certificate resource. + ``` + +### With an HTTPRoute + +To use this certificate with an HTTPRoute, the [Kubernetes Gateway](../../routing/providers/kubernetes-gateway) provider has to be enabled. + +!!! info Traefik Helm Chart + + This provider is disabled by default in the Traefik Helm Chart. + +!!! example "Route with this Certificate" + + ```yaml tab="HTTPRoute" + --- + apiVersion: gateway.networking.k8s.io/v1 + kind: Gateway + metadata: + name: domain-gateway + spec: + gatewayClassName: traefik + listeners: + - name: websecure + port: 8443 + protocol: HTTPS + hostname: domain.example.com + tls: + certificateRefs: + - name: domain-tls # <==== Use the name defined in Certificate resource. + --- + apiVersion: gateway.networking.k8s.io/v1 + kind: HTTPRoute + metadata: + name: domain + spec: + parentRefs: + - name: domain-gateway + hostnames: + - domain.example.com + rules: + - matches: + - path: + type: Exact + value: / + + backendRefs: + - name: domain-service + port: 80 + weight: 1 + ``` + +## Troubleshooting + +There are multiple event sources available to investigate when using cert-manager: + +1. Kubernetes events in `Certificate` and `CertificateRequest` resources +2. cert-manager logs +3. Dashboard and/or (debug) logs from Traefik Proxy + +cert-manager documentation provides a [detailed guide](https://cert-manager.io/docs/troubleshooting/) on how to troubleshoot a certificate request. + +{!traefik-for-business-applications.md!} diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 3e86558cf..2d05e8f05 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -165,6 +165,7 @@ nav: - 'User Guides': - 'FastProxy': 'user-guides/fastproxy.md' - 'Kubernetes and Let''s Encrypt': 'user-guides/crd-acme/index.md' + - 'Kubernetes and cert-manager': 'user-guides/cert-manager.md' - 'gRPC Examples': 'user-guides/grpc.md' - 'Docker': - 'Basic Example': 'user-guides/docker-compose/basic-example/index.md' From 7f4ff359a26a7ed855ced46611c1d9645ff2b25b Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 4 Nov 2024 15:00:05 +0000 Subject: [PATCH 04/22] Add tips about the use of docker in dynamic configuration for swarm provider --- docs/content/providers/swarm.md | 5 ++++- docs/content/routing/providers/swarm.md | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/content/providers/swarm.md b/docs/content/providers/swarm.md index 9220580a7..4808c7e29 100644 --- a/docs/content/providers/swarm.md +++ b/docs/content/providers/swarm.md @@ -455,7 +455,10 @@ _Optional, Default=""_ Defines a default docker network to use for connections to all containers. -This option can be overridden on a per-container basis with the `traefik.docker.network` label. +This option can be overridden on a per-container basis with the `traefik.docker.network` [routing label](../routing/providers/swarm.md#traefikdockernetwork). + +!!! warning + The Docker Swarm provider still uses the same per-container mechanism as the Docker provider, so therefore the label still uses the `docker` keyword intentionally. ```yaml tab="File (YAML)" providers: diff --git a/docs/content/routing/providers/swarm.md b/docs/content/routing/providers/swarm.md index f6dcfb1ef..84b984633 100644 --- a/docs/content/routing/providers/swarm.md +++ b/docs/content/routing/providers/swarm.md @@ -659,6 +659,9 @@ Overrides the default docker network to use for connections to the container. If a container is linked to several networks, be sure to set the proper network name (you can check this with `docker inspect `), otherwise it will randomly pick one (depending on how docker is returning them). +!!! warning + The Docker Swarm provider still uses the same per-container mechanism as the Docker provider, so therefore the label still uses the `docker` keyword intentionally. + !!! warning When deploying a stack from a compose file `stack`, the networks defined are prefixed with `stack`. @@ -672,3 +675,6 @@ Enables Swarm's inbuilt load balancer (only relevant in Swarm Mode). If you enable this option, Traefik will use the virtual IP provided by docker swarm instead of the containers IPs. Which means that Traefik will not perform any kind of load balancing and will delegate this task to swarm. + +!!! warning + The Docker Swarm provider still uses the same per-container mechanism as the Docker provider, so therefore the label still uses the `docker` keyword intentionally. From f70949e3fa1e10e39bd06ba80ccb99f2eb6c2b00 Mon Sep 17 00:00:00 2001 From: Julien Salleyron Date: Wed, 6 Nov 2024 09:56:04 +0100 Subject: [PATCH 05/22] Fix case problem for websocket upgrade --- pkg/proxy/fast/proxy.go | 3 ++- pkg/proxy/fast/proxy_websocket_test.go | 37 ++++++++++++++++++++++++++ pkg/proxy/fast/upgrade.go | 3 +-- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/pkg/proxy/fast/proxy.go b/pkg/proxy/fast/proxy.go index a400ce646..717b1ff06 100644 --- a/pkg/proxy/fast/proxy.go +++ b/pkg/proxy/fast/proxy.go @@ -171,7 +171,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) { if reqUpType != "" { outReq.Header.Set("Connection", "Upgrade") outReq.Header.Set("Upgrade", reqUpType) - if reqUpType == "websocket" { + if strings.EqualFold(reqUpType, "websocket") { cleanWebSocketHeaders(&outReq.Header) } } @@ -353,6 +353,7 @@ type fasthttpHeader interface { SetBytesV(key string, value []byte) DelBytes(key []byte) Del(key string) + ConnectionUpgrade() bool } // removeConnectionHeaders removes hop-by-hop headers listed in the "Connection" header of h. diff --git a/pkg/proxy/fast/proxy_websocket_test.go b/pkg/proxy/fast/proxy_websocket_test.go index b057f8b58..ef22895cc 100644 --- a/pkg/proxy/fast/proxy_websocket_test.go +++ b/pkg/proxy/fast/proxy_websocket_test.go @@ -2,7 +2,9 @@ package fast import ( "bufio" + "crypto/sha1" "crypto/tls" + "encoding/base64" "errors" "fmt" "net" @@ -19,6 +21,34 @@ import ( "golang.org/x/net/websocket" ) +func TestWebSocketUpgradeCase(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + challengeKey := r.Header.Get("Sec-Websocket-Key") + + hijacker, ok := w.(http.Hijacker) + require.True(t, ok) + + c, _, err := hijacker.Hijack() + require.NoError(t, err) + + // Force answer with "Connection: upgrade" in lowercase. + _, err = c.Write([]byte("HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: upgrade\r\nSec-WebSocket-Accept: " + computeAcceptKey(challengeKey) + "\r\n\n")) + require.NoError(t, err) + })) + defer srv.Close() + + proxy := createProxyWithForwarder(t, srv.URL, createConnectionPool(srv.URL, nil)) + + proxyAddr := proxy.Listener.Addr().String() + _, conn, err := newWebsocketRequest( + withServer(proxyAddr), + withPath("/ws"), + ).open() + require.NoError(t, err) + + conn.Close() +} + func TestWebSocketTCPClose(t *testing.T) { errChan := make(chan error, 1) upgrader := gorillawebsocket.Upgrader{} @@ -691,3 +721,10 @@ func createProxyWithForwarder(t *testing.T, uri string, pool *connPool) *httptes return srv } + +func computeAcceptKey(challengeKey string) string { + h := sha1.New() // #nosec G401 -- (CWE-326) https://datatracker.ietf.org/doc/html/rfc6455#page-54 + h.Write([]byte(challengeKey)) + h.Write([]byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")) + return base64.StdEncoding.EncodeToString(h.Sum(nil)) +} diff --git a/pkg/proxy/fast/upgrade.go b/pkg/proxy/fast/upgrade.go index 7bec09e49..2570d4c72 100644 --- a/pkg/proxy/fast/upgrade.go +++ b/pkg/proxy/fast/upgrade.go @@ -1,7 +1,6 @@ package fast import ( - "bytes" "context" "fmt" "io" @@ -100,7 +99,7 @@ func upgradeType(h http.Header) string { } func upgradeTypeFastHTTP(h fasthttpHeader) string { - if !bytes.Contains(h.Peek("Connection"), []byte("Upgrade")) { + if !h.ConnectionUpgrade() { return "" } From 2096fd70815050374f4320655b7c89ff68e246d8 Mon Sep 17 00:00:00 2001 From: Romain Date: Fri, 8 Nov 2024 12:12:35 +0100 Subject: [PATCH 06/22] Drop untrusted X-Forwarded-Prefix header Co-authored-by: Kevin Pollet --- pkg/api/dashboard/dashboard.go | 23 ++-------- pkg/api/dashboard/dashboard_test.go | 45 ------------------- .../forwardedheaders/forwarded_header.go | 2 + .../forwardedheaders/forwarded_header_test.go | 26 +++++++++++ 4 files changed, 31 insertions(+), 65 deletions(-) diff --git a/pkg/api/dashboard/dashboard.go b/pkg/api/dashboard/dashboard.go index 667092dbd..61f5ae4fc 100644 --- a/pkg/api/dashboard/dashboard.go +++ b/pkg/api/dashboard/dashboard.go @@ -3,7 +3,7 @@ package dashboard import ( "io/fs" "net/http" - "net/url" + "strings" "github.com/gorilla/mux" "github.com/traefik/traefik/v2/webui" @@ -25,7 +25,8 @@ func Append(router *mux.Router, customAssets fs.FS) { router.Methods(http.MethodGet). Path("/"). HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { - http.Redirect(resp, req, safePrefix(req)+"/dashboard/", http.StatusFound) + prefix := strings.TrimSuffix(req.Header.Get("X-Forwarded-Prefix"), "/") + http.Redirect(resp, req, prefix+"/dashboard/", http.StatusFound) }) router.Methods(http.MethodGet). @@ -48,21 +49,3 @@ func (g Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Security-Policy", "frame-src 'self' https://traefik.io https://*.traefik.io;") http.FileServerFS(assets).ServeHTTP(w, r) } - -func safePrefix(req *http.Request) string { - prefix := req.Header.Get("X-Forwarded-Prefix") - if prefix == "" { - return "" - } - - parse, err := url.Parse(prefix) - if err != nil { - return "" - } - - if parse.Host != "" { - return "" - } - - return parse.Path -} diff --git a/pkg/api/dashboard/dashboard_test.go b/pkg/api/dashboard/dashboard_test.go index 28c734d94..b07bff4f6 100644 --- a/pkg/api/dashboard/dashboard_test.go +++ b/pkg/api/dashboard/dashboard_test.go @@ -10,53 +10,8 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) -func Test_safePrefix(t *testing.T) { - testCases := []struct { - desc string - value string - expected string - }{ - { - desc: "host", - value: "https://example.com", - expected: "", - }, - { - desc: "host with path", - value: "https://example.com/foo/bar?test", - expected: "", - }, - { - desc: "path", - value: "/foo/bar", - expected: "/foo/bar", - }, - { - desc: "path without leading slash", - value: "foo/bar", - expected: "foo/bar", - }, - } - - for _, test := range testCases { - t.Run(test.desc, func(t *testing.T) { - t.Parallel() - - req, err := http.NewRequest(http.MethodGet, "http://localhost", nil) - require.NoError(t, err) - - req.Header.Set("X-Forwarded-Prefix", test.value) - - prefix := safePrefix(req) - - assert.Equal(t, test.expected, prefix) - }) - } -} - func Test_ContentSecurityPolicy(t *testing.T) { testCases := []struct { desc string diff --git a/pkg/middlewares/forwardedheaders/forwarded_header.go b/pkg/middlewares/forwardedheaders/forwarded_header.go index 6f715ccfb..4b037a089 100644 --- a/pkg/middlewares/forwardedheaders/forwarded_header.go +++ b/pkg/middlewares/forwardedheaders/forwarded_header.go @@ -20,6 +20,7 @@ const ( xForwardedServer = "X-Forwarded-Server" xForwardedURI = "X-Forwarded-Uri" xForwardedMethod = "X-Forwarded-Method" + xForwardedPrefix = "X-Forwarded-Prefix" xForwardedTLSClientCert = "X-Forwarded-Tls-Client-Cert" xForwardedTLSClientCertInfo = "X-Forwarded-Tls-Client-Cert-Info" xRealIP = "X-Real-Ip" @@ -35,6 +36,7 @@ var xHeaders = []string{ xForwardedServer, xForwardedURI, xForwardedMethod, + xForwardedPrefix, xForwardedTLSClientCert, xForwardedTLSClientCertInfo, xRealIP, diff --git a/pkg/middlewares/forwardedheaders/forwarded_header_test.go b/pkg/middlewares/forwardedheaders/forwarded_header_test.go index 414fd5007..8289e8c69 100644 --- a/pkg/middlewares/forwardedheaders/forwarded_header_test.go +++ b/pkg/middlewares/forwardedheaders/forwarded_header_test.go @@ -48,6 +48,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: {"GET"}, xForwardedTLSClientCert: {"Cert"}, xForwardedTLSClientCertInfo: {"CertInfo"}, + xForwardedPrefix: {"/prefix"}, }, expectedHeaders: map[string]string{ xForwardedFor: "10.0.1.0, 10.0.1.12", @@ -55,6 +56,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: "GET", xForwardedTLSClientCert: "Cert", xForwardedTLSClientCertInfo: "CertInfo", + xForwardedPrefix: "/prefix", }, }, { @@ -68,6 +70,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: {"GET"}, xForwardedTLSClientCert: {"Cert"}, xForwardedTLSClientCertInfo: {"CertInfo"}, + xForwardedPrefix: {"/prefix"}, }, expectedHeaders: map[string]string{ xForwardedFor: "", @@ -75,6 +78,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: "", xForwardedTLSClientCert: "", xForwardedTLSClientCertInfo: "", + xForwardedPrefix: "", }, }, { @@ -88,6 +92,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: {"GET"}, xForwardedTLSClientCert: {"Cert"}, xForwardedTLSClientCertInfo: {"CertInfo"}, + xForwardedPrefix: {"/prefix"}, }, expectedHeaders: map[string]string{ xForwardedFor: "10.0.1.0, 10.0.1.12", @@ -95,6 +100,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: "GET", xForwardedTLSClientCert: "Cert", xForwardedTLSClientCertInfo: "CertInfo", + xForwardedPrefix: "/prefix", }, }, { @@ -108,6 +114,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: {"GET"}, xForwardedTLSClientCert: {"Cert"}, xForwardedTLSClientCertInfo: {"CertInfo"}, + xForwardedPrefix: {"/prefix"}, }, expectedHeaders: map[string]string{ xForwardedFor: "", @@ -115,6 +122,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: "", xForwardedTLSClientCert: "", xForwardedTLSClientCertInfo: "", + xForwardedPrefix: "", }, }, { @@ -128,6 +136,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: {"GET"}, xForwardedTLSClientCert: {"Cert"}, xForwardedTLSClientCertInfo: {"CertInfo"}, + xForwardedPrefix: {"/prefix"}, }, expectedHeaders: map[string]string{ xForwardedFor: "10.0.1.0, 10.0.1.12", @@ -135,6 +144,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: "GET", xForwardedTLSClientCert: "Cert", xForwardedTLSClientCertInfo: "CertInfo", + xForwardedPrefix: "/prefix", }, }, { @@ -148,6 +158,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: {"GET"}, xForwardedTLSClientCert: {"Cert"}, xForwardedTLSClientCertInfo: {"CertInfo"}, + xForwardedPrefix: {"/prefix"}, }, expectedHeaders: map[string]string{ xForwardedFor: "", @@ -155,6 +166,7 @@ func TestServeHTTP(t *testing.T) { xForwardedMethod: "", xForwardedTLSClientCert: "", xForwardedTLSClientCertInfo: "", + xForwardedPrefix: "", }, }, { @@ -283,6 +295,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort, xForwardedTLSClientCert, xForwardedTLSClientCertInfo, + xForwardedPrefix, xRealIP, }, xForwardedProto: {"foo"}, @@ -293,6 +306,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: {"foo"}, xForwardedTLSClientCert: {"foo"}, xForwardedTLSClientCertInfo: {"foo"}, + xForwardedPrefix: {"foo"}, xRealIP: {"foo"}, }, expectedHeaders: map[string]string{ @@ -304,6 +318,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: "80", xForwardedTLSClientCert: "", xForwardedTLSClientCertInfo: "", + xForwardedPrefix: "", xRealIP: "", connection: "", }, @@ -321,6 +336,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort, xForwardedTLSClientCert, xForwardedTLSClientCertInfo, + xForwardedPrefix, xRealIP, }, xForwardedProto: {"foo"}, @@ -331,6 +347,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: {"foo"}, xForwardedTLSClientCert: {"foo"}, xForwardedTLSClientCertInfo: {"foo"}, + xForwardedPrefix: {"foo"}, xRealIP: {"foo"}, }, expectedHeaders: map[string]string{ @@ -342,6 +359,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: "foo", xForwardedTLSClientCert: "foo", xForwardedTLSClientCertInfo: "foo", + xForwardedPrefix: "foo", xRealIP: "foo", connection: "", }, @@ -358,6 +376,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort, xForwardedTLSClientCert, xForwardedTLSClientCertInfo, + xForwardedPrefix, xRealIP, }, incomingHeaders: map[string][]string{ @@ -370,6 +389,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort, xForwardedTLSClientCert, xForwardedTLSClientCertInfo, + xForwardedPrefix, xRealIP, }, xForwardedProto: {"foo"}, @@ -380,6 +400,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: {"foo"}, xForwardedTLSClientCert: {"foo"}, xForwardedTLSClientCertInfo: {"foo"}, + xForwardedPrefix: {"foo"}, xRealIP: {"foo"}, }, expectedHeaders: map[string]string{ @@ -391,6 +412,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: "80", xForwardedTLSClientCert: "", xForwardedTLSClientCertInfo: "", + xForwardedPrefix: "", xRealIP: "", connection: "", }, @@ -407,6 +429,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort, xForwardedTLSClientCert, xForwardedTLSClientCertInfo, + xForwardedPrefix, xRealIP, }, incomingHeaders: map[string][]string{ @@ -419,6 +442,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort, xForwardedTLSClientCert, xForwardedTLSClientCertInfo, + xForwardedPrefix, xRealIP, }, xForwardedProto: {"foo"}, @@ -429,6 +453,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: {"foo"}, xForwardedTLSClientCert: {"foo"}, xForwardedTLSClientCertInfo: {"foo"}, + xForwardedPrefix: {"foo"}, xRealIP: {"foo"}, }, expectedHeaders: map[string]string{ @@ -440,6 +465,7 @@ func TestServeHTTP(t *testing.T) { xForwardedPort: "foo", xForwardedTLSClientCert: "foo", xForwardedTLSClientCertInfo: "foo", + xForwardedPrefix: "foo", xRealIP: "foo", connection: "", }, From a79cdd1dfae08596fdaadf48d3b1c0f3b225284a Mon Sep 17 00:00:00 2001 From: Romain Date: Fri, 8 Nov 2024 14:28:08 +0100 Subject: [PATCH 07/22] Change level of peeking first byte error log to DEBUG Co-authored-by: Kevin Pollet --- pkg/server/router/tcp/router.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/server/router/tcp/router.go b/pkg/server/router/tcp/router.go index 4790cd751..f8d657265 100644 --- a/pkg/server/router/tcp/router.go +++ b/pkg/server/router/tcp/router.go @@ -350,7 +350,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { if err != nil { var opErr *net.OpError if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || !opErr.Timeout()) { - log.WithoutContext().Errorf("Error while Peeking first byte: %s", err) + log.WithoutContext().Debugf("Error while peeking first byte: %s", err) } return nil, err } @@ -376,7 +376,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { const recordHeaderLen = 5 hdr, err = br.Peek(recordHeaderLen) if err != nil { - log.Errorf("Error while Peeking hello: %s", err) + log.WithoutContext().Errorf("Error while peeking client hello headers: %s", err) return &clientHello{ peeked: getPeeked(br), }, nil @@ -390,7 +390,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { helloBytes, err := br.Peek(recordHeaderLen + recLen) if err != nil { - log.Errorf("Error while Hello: %s", err) + log.WithoutContext().Errorf("Error while peeking client hello bytes: %s", err) return &clientHello{ isTLS: true, peeked: getPeeked(br), @@ -419,7 +419,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { func getPeeked(br *bufio.Reader) string { peeked, err := br.Peek(br.Buffered()) if err != nil { - log.Errorf("Could not get anything: %s", err) + log.WithoutContext().Errorf("Error while peeking bytes: %s", err) return "" } return string(peeked) From 00a5f4c401b24001a240247af10f73f41777c3da Mon Sep 17 00:00:00 2001 From: Dominik Schwaiger Date: Tue, 12 Nov 2024 10:14:04 +0100 Subject: [PATCH 08/22] Fix a small typo in entrypoints documentation --- docs/content/routing/entrypoints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/routing/entrypoints.md b/docs/content/routing/entrypoints.md index b87e09b92..8c528d2f1 100644 --- a/docs/content/routing/entrypoints.md +++ b/docs/content/routing/entrypoints.md @@ -472,7 +472,7 @@ Setting them has no effect for UDP entryPoints. If zero, no timeout exists. Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw values (digits). If no units are provided, the value is parsed assuming seconds. - We strongly suggest to adapt this value accordingly to the your needs. + We strongly suggest adapting this value accordingly to your needs. ```yaml tab="File (YAML)" ## Static configuration From 9c5012952046c6e70fec108cc1e1a7ebbe93ef16 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 12 Nov 2024 10:32:09 +0100 Subject: [PATCH 09/22] Update go-acme/lego to v4.20.2 --- docs/content/https/acme.md | 11 +- go.mod | 104 ++++++------ go.sum | 327 ++++++++++++++++++++++++------------- 3 files changed, 276 insertions(+), 166 deletions(-) diff --git a/docs/content/https/acme.md b/docs/content/https/acme.md index 927cbd695..5b4dadfed 100644 --- a/docs/content/https/acme.md +++ b/docs/content/https/acme.md @@ -322,11 +322,11 @@ For complete details, refer to your provider's _Additional configuration_ link. | [ArvanCloud](https://www.arvancloud.ir/en) | `arvancloud` | `ARVANCLOUD_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/arvancloud) | | [Auroradns](https://www.pcextreme.com/dns-health-checks) | `auroradns` | `AURORA_USER_ID`, `AURORA_KEY`, `AURORA_ENDPOINT` | [Additional configuration](https://go-acme.github.io/lego/dns/auroradns) | | [Autodns](https://www.internetx.com/domains/autodns/) | `autodns` | `AUTODNS_API_USER`, `AUTODNS_API_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/autodns) | -| [Azure](https://azure.microsoft.com/services/dns/) (DEPRECATED) | `azure` | `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID`, `AZURE_TENANT_ID`, `AZURE_RESOURCE_GROUP`, `[AZURE_METADATA_ENDPOINT]` | [Additional configuration](https://go-acme.github.io/lego/dns/azure) | +| [Azure](https://azure.microsoft.com/services/dns/) (DEPRECATED) | `azure` | `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID`, `AZURE_TENANT_ID`, `AZURE_RESOURCE_GROUP`, `[AZURE_METADATA_ENDPOINT]` | [Additional configuration](https://go-acme.github.io/lego/dns/azure) | | [AzureDNS](https://azure.microsoft.com/services/dns/) | `azuredns` | `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_TENANT_ID`, `AZURE_SUBSCRIPTION_ID`, `AZURE_RESOURCE_GROUP`, `[AZURE_ENVIRONMENT]`, `[AZURE_PRIVATE_ZONE]`, `[AZURE_ZONE_NAME]` | [Additional configuration](https://go-acme.github.io/lego/dns/azuredns) | | [Bindman](https://github.com/labbsr0x/bindman-dns-webhook) | `bindman` | `BINDMAN_MANAGER_ADDRESS` | [Additional configuration](https://go-acme.github.io/lego/dns/bindman) | | [Blue Cat](https://www.bluecatnetworks.com/) | `bluecat` | `BLUECAT_SERVER_URL`, `BLUECAT_USER_NAME`, `BLUECAT_PASSWORD`, `BLUECAT_CONFIG_NAME`, `BLUECAT_DNS_VIEW` | [Additional configuration](https://go-acme.github.io/lego/dns/bluecat) | -| [Brandit](https://www.brandit.com) | `brandit` | `BRANDIT_API_USERNAME`, `BRANDIT_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/brandit) | +| [Brandit](https://www.brandit.com) (DEPRECATED) | `brandit` | `BRANDIT_API_USERNAME`, `BRANDIT_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/brandit) | | [Bunny](https://bunny.net) | `bunny` | `BUNNY_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/bunny) | | [Checkdomain](https://www.checkdomain.de/) | `checkdomain` | `CHECKDOMAIN_TOKEN`, | [Additional configuration](https://go-acme.github.io/lego/dns/checkdomain/) | | [Civo](https://www.civo.com/) | `civo` | `CIVO_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/civo) | @@ -334,9 +334,10 @@ For complete details, refer to your provider's _Additional configuration_ link. | [CloudDNS](https://vshosting.eu/) | `clouddns` | `CLOUDDNS_CLIENT_ID`, `CLOUDDNS_EMAIL`, `CLOUDDNS_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/clouddns) | | [Cloudflare](https://www.cloudflare.com) | `cloudflare` | `CF_API_EMAIL`, `CF_API_KEY` [^5] or `CF_DNS_API_TOKEN`, `[CF_ZONE_API_TOKEN]` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudflare) | | [ClouDNS](https://www.cloudns.net/) | `cloudns` | `CLOUDNS_AUTH_ID`, `CLOUDNS_AUTH_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudns) | -| [CloudXNS](https://www.cloudxns.net) | `cloudxns` | `CLOUDXNS_API_KEY`, `CLOUDXNS_SECRET_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudxns) | +| [CloudXNS](https://www.cloudxns.net) (DEPRECATED) | `cloudxns` | `CLOUDXNS_API_KEY`, `CLOUDXNS_SECRET_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudxns) | | [ConoHa](https://www.conoha.jp) | `conoha` | `CONOHA_TENANT_ID`, `CONOHA_API_USERNAME`, `CONOHA_API_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/conoha) | | [Constellix](https://constellix.com) | `constellix` | `CONSTELLIX_API_KEY`, `CONSTELLIX_SECRET_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/constellix) | +| [Core-Networks](https://www.core-networks.de) | `corenetworks` | `CORENETWORKS_LOGIN`, `CORENETWORKS_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/corenetworks) | | [CPanel and WHM](https://cpanel.net/) | `cpanel` | `CPANEL_MODE`, `CPANEL_USERNAME`, `CPANEL_TOKEN`, `CPANEL_BASE_URL` | [Additional configuration](https://go-acme.github.io/lego/dns/cpanel) | | [Derak Cloud](https://derak.cloud/) | `derak` | `DERAK_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/derak) | | [deSEC](https://desec.io) | `desec` | `DESEC_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/desec) | @@ -418,6 +419,7 @@ For complete details, refer to your provider's _Additional configuration_ link. | [Rackspace](https://www.rackspace.com/cloud/dns) | `rackspace` | `RACKSPACE_USER`, `RACKSPACE_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/rackspace) | | [RcodeZero](https://www.rcodezero.at) | `rcodezero` | `RCODEZERO_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/rcodezero) | | [reg.ru](https://www.reg.ru) | `regru` | `REGRU_USERNAME`, `REGRU_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/regru) | +| [Regfish](https://regfish.de) | `regfish` | `regfish` | [Additional configuration](https://go-acme.github.io/lego/dns/regfish) | | [RFC2136](https://tools.ietf.org/html/rfc2136) | `rfc2136` | `RFC2136_TSIG_KEY`, `RFC2136_TSIG_SECRET`, `RFC2136_TSIG_ALGORITHM`, `RFC2136_NAMESERVER` | [Additional configuration](https://go-acme.github.io/lego/dns/rfc2136) | | [RimuHosting](https://rimuhosting.com) | `rimuhosting` | `RIMUHOSTING_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/rimuhosting) | | [Route 53](https://aws.amazon.com/route53/) | `route53` | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `[AWS_REGION]`, `[AWS_HOSTED_ZONE_ID]` or a configured user/instance IAM profile. | [Additional configuration](https://go-acme.github.io/lego/dns/route53) | @@ -431,7 +433,9 @@ For complete details, refer to your provider's _Additional configuration_ link. | [Simply.com](https://www.simply.com/en/domains/) | `simply` | `SIMPLY_ACCOUNT_NAME`, `SIMPLY_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/simply) | | [Sonic](https://www.sonic.com/) | `sonic` | `SONIC_USER_ID`, `SONIC_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/sonic) | | [Stackpath](https://www.stackpath.com/) | `stackpath` | `STACKPATH_CLIENT_ID`, `STACKPATH_CLIENT_SECRET`, `STACKPATH_STACK_ID` | [Additional configuration](https://go-acme.github.io/lego/dns/stackpath) | +| [Technitium](https://technitium.com) | `technitium` | `TECHNITIUM_SERVER_BASE_URL`, `TECHNITIUM_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/technitium) | | [Tencent Cloud DNS](https://cloud.tencent.com/product/cns) | `tencentcloud` | `TENCENTCLOUD_SECRET_ID`, `TENCENTCLOUD_SECRET_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/tencentcloud) | +| [Timeweb Cloud](https://timeweb.cloud) | `timewebcloud` | `TIMEWEBCLOUD_AUTH_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/timewebcloud) | | [TransIP](https://www.transip.nl/) | `transip` | `TRANSIP_ACCOUNT_NAME`, `TRANSIP_PRIVATE_KEY_PATH` | [Additional configuration](https://go-acme.github.io/lego/dns/transip) | | [UKFast SafeDNS](https://docs.ukfast.co.uk/domains/safedns/index.html) | `safedns` | `SAFEDNS_AUTH_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/safedns) | | [Ultradns](https://neustarsecurityservices.com/dns-services) | `ultradns` | `ULTRADNS_USERNAME`, `ULTRADNS_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/ultradns) | @@ -441,6 +445,7 @@ For complete details, refer to your provider's _Additional configuration_ link. | [Versio](https://www.versio.nl/domeinnamen) | `versio` | `VERSIO_USERNAME`, `VERSIO_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/versio) | | [VinylDNS](https://www.vinyldns.io) | `vinyldns` | `VINYLDNS_ACCESS_KEY`, `VINYLDNS_SECRET_KEY`, `VINYLDNS_HOST` | [Additional configuration](https://go-acme.github.io/lego/dns/vinyldns) | | [VK Cloud](https://mcs.mail.ru/) | `vkcloud` | `VK_CLOUD_PASSWORD`, `VK_CLOUD_PROJECT_ID`, `VK_CLOUD_USERNAME` | [Additional configuration](https://go-acme.github.io/lego/dns/vkcloud) | +| [Volcano Engine](https://www.volcengine.com) | `volcengine` | `VOLC_ACCESSKEY`, `VOLC_SECRETKEY` | [Additional configuration](https://go-acme.github.io/lego/dns/volcengine) | | [Vscale](https://vscale.io/) | `vscale` | `VSCALE_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/vscale) | | [VULTR](https://www.vultr.com) | `vultr` | `VULTR_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/vultr) | | [Webnames](https://www.webnames.ru/) | `webnames` | `WEBNAMES_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/webnames) | diff --git a/go.mod b/go.mod index c9188afe1..3e4afd654 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/fatih/structs v1.1.0 github.com/fsnotify/fsnotify v1.7.0 github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2 // No tag on the repo. - github.com/go-acme/lego/v4 v4.19.2 + github.com/go-acme/lego/v4 v4.20.2 github.com/go-kit/kit v0.13.0 github.com/go-kit/log v0.2.1 github.com/golang/protobuf v1.5.4 @@ -27,7 +27,7 @@ require ( github.com/hashicorp/consul/api v1.26.1 github.com/hashicorp/go-hclog v1.6.3 github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/go-version v1.6.0 + github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/nomad/api v0.0.0-20231213195942-64e3dca9274b // No tag on the repo. github.com/influxdata/influxdb-client-go/v2 v2.7.0 github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab // No tag on the repo. @@ -69,11 +69,11 @@ require ( go.elastic.co/apm/v2 v2.4.8 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // No tag on the repo. golang.org/x/mod v0.21.0 - golang.org/x/net v0.29.0 - golang.org/x/text v0.18.0 - golang.org/x/time v0.6.0 + golang.org/x/net v0.30.0 + golang.org/x/text v0.19.0 + golang.org/x/time v0.7.0 golang.org/x/tools v0.25.0 - google.golang.org/grpc v1.66.1 + google.golang.org/grpc v1.67.1 gopkg.in/DataDog/dd-trace-go.v1 v1.56.1 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.26.3 @@ -86,17 +86,17 @@ require ( ) require ( - cloud.google.com/go/auth v0.9.3 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.5.1 // indirect + cloud.google.com/go/auth v0.10.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.5 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect dario.cat/mergo v1.0.0 // indirect github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect @@ -124,30 +124,30 @@ require ( github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 // indirect github.com/VividCortex/gohistogram v1.0.0 // indirect github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2 // indirect - github.com/aliyun/alibaba-cloud-sdk-go v1.63.15 // indirect + github.com/aliyun/alibaba-cloud-sdk-go v1.63.47 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c // indirect - github.com/aws/aws-sdk-go-v2 v1.30.5 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.33 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.32 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2 v1.32.3 // indirect + github.com/aws/aws-sdk-go-v2/config v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.42 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/lightsail v1.40.6 // indirect - github.com/aws/aws-sdk-go-v2/service/route53 v1.43.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.7 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.7 // indirect - github.com/aws/smithy-go v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 // indirect + github.com/aws/aws-sdk-go-v2/service/lightsail v1.42.3 // indirect + github.com/aws/aws-sdk-go-v2/service/route53 v1.46.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 // indirect + github.com/aws/smithy-go v1.22.0 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/civo/civogo v0.3.11 // indirect - github.com/cloudflare/cloudflare-go v0.104.0 // indirect + github.com/cloudflare/cloudflare-go v0.108.0 // indirect github.com/containerd/containerd v1.7.20 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect @@ -168,7 +168,7 @@ require ( github.com/elastic/go-windows v1.0.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/exoscale/egoscale/v3 v3.1.5 // indirect + github.com/exoscale/egoscale/v3 v3.1.7 // indirect github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect @@ -187,12 +187,12 @@ require ( github.com/go-playground/validator/v10 v10.16.0 // indirect github.com/go-resty/resty/v2 v2.13.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang-jwt/jwt/v4 v4.5.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/gnostic v0.5.7-v3refs // indirect @@ -204,7 +204,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect github.com/googleapis/gax-go/v2 v2.13.0 // indirect - github.com/gophercloud/gophercloud v1.14.0 // indirect + github.com/gophercloud/gophercloud v1.14.1 // indirect github.com/gophercloud/utils v0.0.0-20231010081019-80377eca5d56 // indirect github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect @@ -218,7 +218,7 @@ require ( github.com/hashicorp/hcl v1.0.1-vault-5 // indirect github.com/hashicorp/serf v0.10.1 // indirect github.com/huandu/xstrings v1.5.0 // indirect - github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.114 // indirect + github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.120 // indirect github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect @@ -234,7 +234,7 @@ require ( github.com/labbsr0x/bindman-dns-webhook v1.0.2 // indirect github.com/labbsr0x/goh v1.0.1 // indirect github.com/leodido/go-urn v1.2.4 // indirect - github.com/linode/linodego v1.40.0 // indirect + github.com/linode/linodego v1.42.0 // indirect github.com/liquidweb/liquidweb-cli v0.6.9 // indirect github.com/liquidweb/liquidweb-go v1.6.4 // indirect github.com/looplab/fsm v0.1.0 // indirect @@ -275,7 +275,7 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect - github.com/oracle/oci-go-sdk/v65 v65.73.0 // indirect + github.com/oracle/oci-go-sdk/v65 v65.77.1 // indirect github.com/outcaste-io/ristretto v0.2.3 // indirect github.com/ovh/go-ovh v1.6.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect @@ -287,7 +287,8 @@ require ( github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/quic-go/qpack v0.5.1 // indirect - github.com/redis/go-redis/v9 v9.2.1 // indirect + github.com/redis/go-redis/v9 v9.6.1 // indirect + github.com/regfish/regfish-dnsapi-go v0.1.1 // indirect github.com/sacloud/api-client-go v0.2.10 // indirect github.com/sacloud/go-http v0.1.8 // indirect github.com/sacloud/iaas-api-go v1.12.0 // indirect @@ -303,7 +304,7 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect - github.com/softlayer/softlayer-go v1.1.5 // indirect + github.com/softlayer/softlayer-go v1.1.7 // indirect github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect @@ -313,18 +314,19 @@ require ( github.com/spf13/viper v1.18.2 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1002 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1002 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1034 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1034 // indirect github.com/tinylib/msgp v1.1.8 // indirect github.com/tjfoc/gmsm v1.4.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/transip/gotransip/v6 v6.26.0 // indirect - github.com/ultradns/ultradns-go-sdk v1.7.0-20240913052650-970ca9a // indirect + github.com/ultradns/ultradns-go-sdk v1.8.0-20241010134910-243eeec // indirect github.com/vinyldns/go-vinyldns v0.9.16 // indirect + github.com/volcengine/volc-sdk-golang v1.0.183 // indirect github.com/vultr/govultr/v3 v3.9.1 // indirect - github.com/yandex-cloud/go-genproto v0.0.0-20240911120709-1fa0cb6f47c2 // indirect - github.com/yandex-cloud/go-sdk v0.0.0-20240911121212-e4e74d0d02f5 // indirect + github.com/yandex-cloud/go-genproto v0.0.0-20241101135610-76a0cfc1a773 // indirect + github.com/yandex-cloud/go-sdk v0.0.0-20241101143304-947cf519f6bd // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect go.elastic.co/apm/module/apmhttp/v2 v2.4.8 // indirect go.elastic.co/fastjson v1.1.0 // indirect @@ -345,20 +347,20 @@ require ( go.uber.org/zap v1.21.0 // indirect go4.org/intern v0.0.0-20230525184215-6c62f75575cb // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2 // indirect - golang.org/x/crypto v0.27.0 // indirect + golang.org/x/crypto v0.28.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/term v0.24.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.197.0 // indirect - google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/api v0.204.0 // indirect + google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/ns1/ns1-go.v2 v2.12.0 // indirect + gopkg.in/ns1/ns1-go.v2 v2.12.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a // indirect diff --git a/go.sum b/go.sum index 25aca9d85..4c7f634fe 100644 --- a/go.sum +++ b/go.sum @@ -18,18 +18,18 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go/auth v0.9.3 h1:VOEUIAADkkLtyfr3BLa3R8Ed/j6w1jTBmARx+wb5w5U= -cloud.google.com/go/auth v0.9.3/go.mod h1:7z6VY+7h3KUdRov5F1i8NDP5ZzWKYmEPO842BgCsmTk= -cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= -cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= +cloud.google.com/go/auth v0.10.0 h1:tWlkvFAh+wwTOzXIjrwM64karR1iTBZ/GRr0S/DULYo= +cloud.google.com/go/auth v0.10.0/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= +cloud.google.com/go/auth/oauth2adapt v0.2.5 h1:2p29+dePqsCHPP1bqDJcKj4qxRyYCcbzKpFyKGt3MTk= +cloud.google.com/go/auth/oauth2adapt v0.2.5/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs= -cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -51,22 +51,24 @@ github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 h1:Dy3M9aegiI7d7PF1LUdjbVigJReo+QOceYs github.com/AdamSLevy/jsonrpc2/v14 v14.1.0/go.mod h1:ZakZtbCXxCz82NJvq7MoREtiQesnDfrtF6RFUGzQfLo= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 h1:nyQWyZvwGTvunIMxi1Y9uXkcyr+I7TeNrr/foo4Kpk8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 h1:JZg6HRh6W6U4OLl6lk7BZ7BLisIzM9dG1R50zUk9C/M= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0/go.mod h1:YL1xnZ6QejvQHWJrX/AvhFl4WW4rqHVoKspWNVwFk0M= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 h1:B/dfvscEQtew9dVuoxqxrUKKv8Ih2f55PydknDamU+g= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0/go.mod h1:fiPSssYvltE08HJchL04dOy+RD4hgrjph0cwGGMntdI= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0 h1:+m0M/LFxN43KvULkDNfdXOgrjtg6UYJPFBJyuEcRCAw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0/go.mod h1:PwOyop78lveYMRs6oCxjiVyBdyCgIYH6XHIVZO9/SFQ= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 h1:lpOxwrQ919lCZoNCd69rVt8u1eLZuMORrGXqy8sNf3c= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0/go.mod h1:fSvRkb8d26z9dbL40Uf/OO6Vo9iExtZK3D0ulRV+8M0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.2.0 h1:9Eih8XcEeQnFD0ntMlUDleKMzfeCeUfa+VbnDCI4AZs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.2.0/go.mod h1:wGPyTi+aURdqPAGMZDQqnNs9IrShADF8w2WZb6bKeq0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0 h1:2qsIIvxVT+uE6yrNldntJKlLRgxGbZ85kgtz5SNBhMw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0/go.mod h1:AW8VEadnhw9xox+VaVd9sP7NjzOAnaZBLRH6Tq3cJ38= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.3.0 h1:yzrctSl9GMIQ5lHu7jc8olOsGjWDCsBpJhWqfGa/YIM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.3.0/go.mod h1:GE4m0rnnfwLGX0Y9A9A25Zx5N/90jneT5ABevqzhuFQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 h1:zLzoX5+W2l95UJoVwiyNS4dX8vHyQ6x2xRLoBBL9wMk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0/go.mod h1:wVEOJfGTj0oPAUGA1JuRAvz/lxXQsWW16axmHPP47Bk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1 h1:7CBQ+Ei8SP2c6ydQTGCCrS35bDxgTMfoP2miAwK++OU= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1/go.mod h1:c/wcGeGx5FUPbM/JltUYHZcKmigwyVLJlDq+4HdtXaw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -98,9 +100,12 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -123,8 +128,10 @@ github.com/DataDog/sketches-go v1.4.2 h1:gppNudE9d19cQ98RYABOetxIhpTCl4m7CnbRZjv github.com/DataDog/sketches-go v1.4.2/go.mod h1:xJIXldczJyyjnbDop7ZZcLxJdV3+7Kra7H1KMgpgkLk= github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61 h1:1NIUJ+MAMpqDr4LWIfNsoJR+G7zg/8GZVwuRkmJxtTc= github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61/go.mod h1:62qWSDaEI0BLykU+zQza5CAKgW0lOy9oBSz3/DvYz4w= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= 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= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= @@ -145,11 +152,14 @@ github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:i github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.30.1/go.mod h1:hGgx05L/DiW8XYBXeJdKIN6V2QUy2H6JqME5VT1NLRw= github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A= github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSdZ4X2o5g= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= 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.2.2 h1:F1j7z+/DKEsYqZNoxC6wvfmaiDneLsQOFQmuq9NADSY= @@ -159,11 +169,12 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/aliyun/alibaba-cloud-sdk-go v1.63.15 h1:r2uwBUQhLhcPzaWz9tRJqc8MjYwHb+oF2+Q6467BF14= -github.com/aliyun/alibaba-cloud-sdk-go v1.63.15/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= +github.com/aliyun/alibaba-cloud-sdk-go v1.63.47 h1:B8ApNodSpIM5ST9INmhMG4d0rRwNY/63/XjXUDO/XIo= +github.com/aliyun/alibaba-cloud-sdk-go v1.63.47/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -171,38 +182,43 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c h1:651/eoCRnQ7YtSjAnSzRucrJz+3iGEFt+ysraELS81M= github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.44.327 h1:ZS8oO4+7MOBLhkdwIhgtVeDzCeWOlTfKJS7EgggbIEY= github.com/aws/aws-sdk-go v1.44.327/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= -github.com/aws/aws-sdk-go-v2/config v1.27.33 h1:Nof9o/MsmH4oa0s2q9a0k7tMz5x/Yj5k06lDODWz3BU= -github.com/aws/aws-sdk-go-v2/config v1.27.33/go.mod h1:kEqdYzRb8dd8Sy2pOdEbExTTF5v7ozEXX0McgPE7xks= -github.com/aws/aws-sdk-go-v2/credentials v1.17.32 h1:7Cxhp/BnT2RcGy4VisJ9miUPecY+lyE9I8JvcZofn9I= -github.com/aws/aws-sdk-go-v2/credentials v1.17.32/go.mod h1:P5/QMF3/DCHbXGEGkdbilXHsyTBX5D3HSwcrSc9p20I= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2 v1.32.3 h1:T0dRlFBKcdaUPGNtkBSwHZxrtis8CQU17UpNBZYd0wk= +github.com/aws/aws-sdk-go-v2 v1.32.3/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2/config v1.28.1 h1:oxIvOUXy8x0U3fR//0eq+RdCKimWI900+SV+10xsCBw= +github.com/aws/aws-sdk-go-v2/config v1.28.1/go.mod h1:bRQcttQJiARbd5JZxw6wG0yIK3eLeSCPdg6uqmmlIiI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.42 h1:sBP0RPjBU4neGpIYyx8mkU2QqLPl5u9cmdTWVzIpHkM= +github.com/aws/aws-sdk-go-v2/credentials v1.17.42/go.mod h1:FwZBfU530dJ26rv9saAbxa9Ej3eF/AK0OAY86k13n4M= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 h1:68jFVtt3NulEzojFesM/WVarlFpCaXLKaBxDpzkQ9OQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18/go.mod h1:Fjnn5jQVIo6VyedMc0/EhPpfNlPl7dHV916O6B+49aE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 h1:Jw50LwEkVjuVzE1NzkhNKkBf9cRN7MtE1F/b2cOKTUM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22/go.mod h1:Y/SmAyPcOTmpeVaWSzSKiILfXTVJwrGmYZhcRbhWuEY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 h1:981MHwBaRZM7+9QSR6XamDzF/o7ouUGxFzr+nVSIhrs= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22/go.mod h1:1RA1+aBEfn+CAB/Mh0MB6LsdCYCnjZm7tKXtnk499ZQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.40.6 h1:ea6TO3HgVeVTB2Ie1djyBFWBOc9CohpKbo/QZbGTCJQ= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.40.6/go.mod h1:D2TUTD3v6AWmE5LzdCXLWNFtoYbSf6IEjKh1ggbuVdw= -github.com/aws/aws-sdk-go-v2/service/route53 v1.43.2 h1:957e1/SwXIfPi/0OUJkH9YnPZRe9G6Kisd/xUhF7AUE= -github.com/aws/aws-sdk-go-v2/service/route53 v1.43.2/go.mod h1:343vcjcyOTuHTBBgUrOxPM36/jE96qLZnGL447ldrB0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.7 h1:pIaGg+08llrP7Q5aiz9ICWbY8cqhTkyy+0SHvfzQpTc= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.7/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.7 h1:/Cfdu0XV3mONYKaOt1Gr0k1KvQzkzPyiKUdlWJqy+J4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.7/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.7 h1:NKTa1eqZYw8tiHSRGpP0VtTdub/8KNk8sDkNPFaOKDE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.7/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 h1:qcxX0JYlgWH3hpPUnd6U0ikcl6LLA9sLkXE2w1fpMvY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3/go.mod h1:cLSNEmI45soc+Ef8K/L+8sEA3A3pYFEYf5B5UI+6bH4= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.42.3 h1:lcsqV11EaB74iNKr/PaXV0Og1D/lCZIhIf+kPucTfPw= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.42.3/go.mod h1:IyYNP3fIP5/BvFKqQFj7wwQnKuH0wndcv6j4DyG9pRk= +github.com/aws/aws-sdk-go-v2/service/route53 v1.46.0 h1:AaOWmXBSDSIEsTzx8Y2nYAxckgmBPNiRU5mjn/a9ynI= +github.com/aws/aws-sdk-go-v2/service/route53 v1.46.0/go.mod h1:IN9bx4yLAa3a3J7A41skQefcYObNv6ARAd2i5WxvGKg= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 h1:UTpsIf0loCIWEbrqdLb+0RxnTXfWh2vhw4nQmFi4nPc= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.3/go.mod h1:FZ9j3PFHHAR+w0BSEjK955w5YD2UwB/l/H0yAK3MJvI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 h1:2YCmIXv3tmiItw0LlYf6v7gEHebLY45kBEnPezbUKyU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3/go.mod h1:u19stRyNPxGhj6dRm+Cdgu6N75qnbW7+QN0q0dsAk58= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 h1:wVnQ6tigGsRqSWDEEyH6lSAJ9OyFUsSnbaUWChuSGzs= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.3/go.mod h1:VZa9yTFyj4o10YGsmDO4gbQJUvvhY72fhumT8W4LqsE= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -221,12 +237,15 @@ github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdb github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= -github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -236,14 +255,14 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/civo/civogo v0.3.11 h1:mON/fyrV946Sbk6paRtOSGsN+asCgCmHCgArf5xmGxM= github.com/civo/civogo v0.3.11/go.mod h1:7+GeeFwc4AYTULaEshpT2vIcl3Qq8HPoxA17viX3l6g= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.104.0 h1:R/lB0dZupaZbOgibAH/BRrkFbZ6Acn/WsKg2iX2xXuY= -github.com/cloudflare/cloudflare-go v0.104.0/go.mod h1:pfUQ4PIG4ISI0/Mmc21Bp86UnFU0ktmPf3iTgbSL+cM= +github.com/cloudflare/cloudflare-go v0.108.0 h1:C4Skfjd8I8X3uEOGmQUT4/iGyZcWdkIU7HwvMoLkEE0= +github.com/cloudflare/cloudflare-go v0.108.0/go.mod h1:m492eNahT/9MsN7Ppnoge8AaI7QhVFtEgVm3I9HJFeU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/containerd/containerd v1.7.20 h1:Sl6jQYk3TRavaU83h66QMbI2Nqg9Jm6qzwX57Vsn1SQ= github.com/containerd/containerd v1.7.20/go.mod h1:52GsS5CwquuqPuLncsXwG0t2CiUce+KsNHJZQJvAgR0= @@ -276,6 +295,7 @@ github.com/cpu/goacmedns v0.1.1 h1:DM3H2NiN2oam7QljgGY5ygy4yDXhK5Z4JUnqaugs2C4= github.com/cpu/goacmedns v0.1.1/go.mod h1:MuaouqEhPAHxsbqjgnck5zeghuwBP1dLnPoobeGqugQ= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -321,6 +341,7 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= @@ -330,6 +351,7 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/ebitengine/purego v0.5.0-alpha.1 h1:0gVgWGb8GjKYs7cufvfNSleJAD00m2xWC26FMwOjNrw= github.com/ebitengine/purego v0.5.0-alpha.1/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elastic/go-sysinfo v1.7.1 h1:Wx4DSARcKLllpKT2TnFVdSUJOsybqMYCNQZq1/wO+s0= @@ -349,15 +371,14 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/exoscale/egoscale/v3 v3.1.5 h1:Nsfmqiq/CQJM3Ukqg9/u4rc9Q0QBeTQc3JFPMpFkhJg= -github.com/exoscale/egoscale/v3 v3.1.5/go.mod h1:GHKucK/J26v8PGWztGdhxWNMjrjG9PbelxKCJ4YI11Q= +github.com/exoscale/egoscale/v3 v3.1.7 h1:Q6p9tOVY0IiOW0fUpaPQWY7ggGEuSPZLAGxFgDd2sCE= +github.com/exoscale/egoscale/v3 v3.1.7/go.mod h1:GHKucK/J26v8PGWztGdhxWNMjrjG9PbelxKCJ4YI11Q= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= @@ -371,6 +392,10 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw 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/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -388,8 +413,8 @@ github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= -github.com/go-acme/lego/v4 v4.19.2 h1:Y8hrmMvWETdqzzkRly7m98xtPJJivWFsgWi8fcvZo+Y= -github.com/go-acme/lego/v4 v4.19.2/go.mod h1:wtDe3dDkmV4/oI2nydpNXSJpvV10J9RCyZ6MbYxNtlQ= +github.com/go-acme/lego/v4 v4.20.2 h1:ZwO3oLZb8fL6up1OZVJP3yHuvqhozzlEmyqKmhrPchQ= +github.com/go-acme/lego/v4 v4.20.2/go.mod h1:foauPlhnhoq8WUphaWx5U04uDc+JGhk4ZZtPz/Vqsjg= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= @@ -401,9 +426,11 @@ github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -459,8 +486,9 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b h1:/vQ+oYKu+JoyaMPDsv5FzwuL2wwWBgBbtj/YLCi4LuA= @@ -482,10 +510,10 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo= +github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -527,6 +555,7 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= @@ -598,12 +627,14 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v1.3.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= -github.com/gophercloud/gophercloud v1.14.0 h1:Bt9zQDhPrbd4qX7EILGmy+i7GP35cc+AAL2+wIJpUE8= -github.com/gophercloud/gophercloud v1.14.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gophercloud/gophercloud v1.14.1 h1:DTCNaTVGl8/cFu58O1JwWgis9gtISAFONqpMKNg/Vpw= +github.com/gophercloud/gophercloud v1.14.1/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gophercloud/utils v0.0.0-20231010081019-80377eca5d56 h1:sH7xkTfYzxIEgzq1tDHIMKRh1vThOEOGNsettdEeLbE= github.com/gophercloud/utils v0.0.0-20231010081019-80377eca5d56/go.mod h1:VSalo4adEk+3sNkmVJLnhHoOyOYYS8sTWLG4mv5BKto= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -623,9 +654,11 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9K github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.26.1 h1:5oSXOO5fboPZeW5SN+TdGFP/BILDgBm19OrPZ/pICIM= github.com/hashicorp/consul/api v1.26.1/go.mod h1:B4sQTeaSO16NtynqrAdwOlahJ7IUDZM9cj2420xYL8A= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/consul/sdk v0.15.0 h1:2qK9nDrr4tiJKRoxPGhm6B7xJjLVIQqkjiab2M4aKjU= github.com/hashicorp/consul/sdk v0.15.0/go.mod h1:r/OmRRPbHOe0yxNahLw7G9x5WG17E1BIECMtCjcPSNo= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= @@ -637,6 +670,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -661,10 +696,11 @@ github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjG github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -676,21 +712,25 @@ github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31 github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/nomad/api v0.0.0-20231213195942-64e3dca9274b h1:R1UDhkwGltpSPY9bCBBxIMQd+NY9BkN0vFHnJo/8o8w= github.com/hashicorp/nomad/api v0.0.0-20231213195942-64e3dca9274b/go.mod h1:ijDwa6o1uG1jFSq6kERiX2PamKGpZzTmo0XOFNeFZgw= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.114 h1:X3E16S6AUZsQKhJIQ5kNnylnp0GtSy2YhIbxfvDavtU= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.114/go.mod h1:JWz2ujO9X3oU5wb6kXp+DpR2UuDj2SldDbX8T0FSuhI= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.120 h1:i+rlH2xzkEMGbol86Fq/ioxgAaOnX2vkH4i/bLptc5s= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.120/go.mod h1:JWz2ujO9X3oU5wb6kXp+DpR2UuDj2SldDbX8T0FSuhI= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df h1:MZf03xP9WdakyXhOWuAD5uPK3wHh96wCsqe3hCMKh8E= @@ -720,8 +760,11 @@ github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFK github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= @@ -733,6 +776,8 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= 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/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= @@ -755,10 +800,14 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 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/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6 h1:IsMZxCuZqKuao2vNdfD82fjjgPLfyHLpR41Z88viRWs= +github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6/go.mod h1:3VeWNIJaW+O5xpRQbPp0Ybqu1vJd/pm7s2F473HRrkw= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.17.11-0.20241004063537-dbd6c381492a h1:cwHOqPB4H4iQq8177kf2SxpjNbcjJ2m3lNwKIe28Hqg= github.com/klauspost/compress v1.17.11-0.20241004063537-dbd6c381492a/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= @@ -809,8 +858,8 @@ github.com/lestrrat-go/httpcc v1.0.0/go.mod h1:tGS/u00Vh5N6FHNkExqGGNId8e0Big+++ github.com/lestrrat-go/iter v1.0.1/go.mod h1:zIdgO1mRKhn8l9vrZJZz9TUMMFbQbLeTsbqPDrJ/OJc= github.com/lestrrat-go/jwx v1.2.7/go.mod h1:bw24IXWbavc0R2RsOtpXL7RtMyP589yZ1+L7kd09ZGA= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= -github.com/linode/linodego v1.40.0 h1:7ESY0PwK94hoggoCtIroT1Xk6b1flrFBNZ6KwqbTqlI= -github.com/linode/linodego v1.40.0/go.mod h1:NsUw4l8QrLdIofRg1NYFBbW5ZERnmbZykVBszPZLORM= +github.com/linode/linodego v1.42.0 h1:ZSbi4MtvwrfB9Y6bknesorvvueBGGilcmh2D5dq76RM= +github.com/linode/linodego v1.42.0/go.mod h1:2yzmY6pegPBDgx2HDllmt0eIk2IlzqcgK6NR0wFCFRY= github.com/liquidweb/go-lwApi v0.0.0-20190605172801-52a4864d2738/go.mod h1:0sYF9rMXb0vlG+4SzdiGMXHheCZxjguMq+Zb4S2BfBs= github.com/liquidweb/liquidweb-cli v0.6.9 h1:acbIvdRauiwbxIsOCEMXGwF75aSJDbDiyAWPjVnwoYM= github.com/liquidweb/liquidweb-cli v0.6.9/go.mod h1:cE1uvQ+x24NGUL75D0QagOFCG8Wdvmwu8aL9TLmA/eQ= @@ -873,11 +922,14 @@ github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwU github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/dns v1.1.47/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= github.com/mimuret/golang-iij-dpf v0.9.1 h1:Gj6EhHJkOhr+q2RnvRPJsPMcjuVnWPSccEHyoEehU34= github.com/mimuret/golang-iij-dpf v0.9.1/go.mod h1:sl9KyOkESib9+KRD3HaGpgi1xk7eoN2+d96LCLsME2M= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -897,6 +949,7 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -932,6 +985,13 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04 h1:o6uBwrhM5C8Ll3MAAxrQxRHEu7FkapwTuI2WmL1rw4g= github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY4wsPvgQH/jsuJi4XO2ssZbdsIizr4CVC8= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nrdcg/auroradns v1.1.0 h1:KekGh8kmf2MNwqZVVYo/fw/ZONt8QMEmbMFOeljteWo= @@ -967,6 +1027,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= @@ -979,12 +1040,14 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -992,6 +1055,7 @@ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2sz github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A= github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= @@ -999,8 +1063,8 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.5 h1:UwtQQx2pyPIgWYHRg+epgdx1/HnBQTgN3/oIYEJTQzU= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/oracle/oci-go-sdk/v65 v65.73.0 h1:C7uel6CoKk4A1KPkdhFBAyvVyFRTHAmX8m0o64RmfPg= -github.com/oracle/oci-go-sdk/v65 v65.73.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= +github.com/oracle/oci-go-sdk/v65 v65.77.1 h1:gqjTXIUWvTihkn470AclxSAMcR1JecqjD2IUtp+sDIU= +github.com/oracle/oci-go-sdk/v65 v65.77.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= github.com/outcaste-io/ristretto v0.2.3 h1:AK4zt/fJ76kjlYObOeNwh4T3asEuaCmp26pOvUOL9w0= github.com/outcaste-io/ristretto v0.2.3/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= github.com/ovh/go-ovh v1.6.0 h1:ixLOwxQdzYDx296sXcgS35TOPEahJkpjMGtzPadCjQI= @@ -1015,11 +1079,13 @@ github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrap github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1 h1:VGcrWe3yk6o+t7BdVNy5UDPWa4OZuDWtE1W1ZbS7Kyw= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= +github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pires/go-proxyproto v0.6.1 h1:EBupykFmo22SDjv4fQVQd2J9NOoLPmyZA/15ldOGkPw= @@ -1066,6 +1132,7 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1077,6 +1144,7 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -1089,8 +1157,10 @@ github.com/rancher/go-rancher-metadata v0.0.0-20200311180630-7f4c936a06ac/go.mod github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6QmlCg= -github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= +github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= +github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA= +github.com/regfish/regfish-dnsapi-go v0.1.1 h1:TJFtbePHkd47q5GZwYl1h3DIYXmoxdLjW/SBsPtB5IE= +github.com/regfish/regfish-dnsapi-go v0.1.1/go.mod h1:ubIgXSfqarSnl3XHSn8hIFwFF3h0yrq0ZiWD93Y2VjY= github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052 h1:Qp27Idfgi6ACvFQat5+VJvlYToylpM/hcyLBI3WaKPA= github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052/go.mod h1:uvX/8buq8uVeiZiFht+0lqSLBHF+uGV8BrTv8W/SIwk= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -1142,6 +1212,7 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1152,11 +1223,12 @@ github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.4 h1:tpTjnuH7MLlqhoD21vRoMZbMIi5GmBsAJDFyF67GhZA= github.com/smartystreets/gunit v1.0.4/go.mod h1:EH5qMBab2UclzXUcpR8b93eHsIlp9u+pDQIRp5DZNzQ= -github.com/softlayer/softlayer-go v1.1.5 h1:UFFtgKxiw0yIuUw93XBCFIiIMYR5eLgmm4a5DqMHXGg= -github.com/softlayer/softlayer-go v1.1.5/go.mod h1:WeJrBLoTJcaT8nO1azeyHyNpo/fDLtbpbvh+pzts+Qw= +github.com/softlayer/softlayer-go v1.1.7 h1:SgTL+pQZt1h+5QkAhVmHORM/7N9c1X0sljJhuOIHxWE= +github.com/softlayer/softlayer-go v1.1.7/go.mod h1:WeJrBLoTJcaT8nO1azeyHyNpo/fDLtbpbvh+pzts+Qw= github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e h1:3OgWYFw7jxCZPcvAg+4R8A50GZ+CCkARF10lxu2qDsQ= github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e/go.mod h1:fKZCUVdirrxrBpwd9wb+lSoVixvpwAu8eHzbQB2tums= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -1191,6 +1263,8 @@ github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1217,10 +1291,10 @@ github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154/go.mod h1:7jxm github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1002 h1:RE84sHFFx6t24DJvSnF9fS1DzBNv9OpctzHK3t7AY+I= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1002/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1002 h1:QwE0dRkAAbdf+eACnkNULgDn9ZKUJpPWRyXdqJolP5E= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1002/go.mod h1:WdC0FYbqYhJwQ3kbqri6hVP5HAEp+rzX9FToItTAzUg= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1034 h1:T7ewuO2DD+5R2LRpD2kTRy25aCkVDVdYkmmyUS63i08= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1034/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1034 h1:hXxv58/eSlDj80n0P0ISXh91pC/2vqurJNwn5SpXFPI= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1034/go.mod h1:hwTIplwF9IYWz5HQcyw0+R8aqJB0lEZB8sI0pIA5Htw= github.com/testcontainers/testcontainers-go v0.32.0 h1:ug1aK08L3gCHdhknlTTwWjPHPS+/alvLJU/DRxTD/ME= github.com/testcontainers/testcontainers-go v0.32.0/go.mod h1:CRHrzHLQhlXUsa5gXjTOfqIEJcrK5+xMDmBr/WMI88E= github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= @@ -1248,13 +1322,14 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= -github.com/ultradns/ultradns-go-sdk v1.7.0-20240913052650-970ca9a h1:R6IR+Vj/RnGZLnX8PpPQsbbQthctO7Ah2q4tj5eoe2o= -github.com/ultradns/ultradns-go-sdk v1.7.0-20240913052650-970ca9a/go.mod h1:BZr7Qs3ku1ckpqed8tCRSqTlp8NAeZfAVpfx4OzXMss= +github.com/ultradns/ultradns-go-sdk v1.8.0-20241010134910-243eeec h1:2s/ghQ8wKE+UzD/hf3P4Gd1j0JI9ncbxv+nsypPoUYI= +github.com/ultradns/ultradns-go-sdk v1.8.0-20241010134910-243eeec/go.mod h1:BZr7Qs3ku1ckpqed8tCRSqTlp8NAeZfAVpfx4OzXMss= github.com/unrolled/render v1.0.2 h1:dGS3EmChQP3yOi1YeFNO/Dx+MbWZhdvhQJTXochM5bs= github.com/unrolled/render v1.0.2/go.mod h1:gN9T0NhL4Bfbwu8ann7Ry/TGHYfosul+J0obPf6NBdM= github.com/unrolled/secure v1.0.9 h1:BWRuEb1vDrBFFDdbCnKkof3gZ35I/bnHGyt0LB0TNyQ= github.com/unrolled/secure v1.0.9/go.mod h1:fO+mEan+FLB0CdEnHf6Q4ZZVNqG+5fuLFnP8p0BXDPI= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -1262,6 +1337,8 @@ github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vinyldns/go-vinyldns v0.9.16 h1:GZJStDkcCk1F1AcRc64LuuMh+ENL8pHA0CVd4ulRMcQ= github.com/vinyldns/go-vinyldns v0.9.16/go.mod h1:5qIJOdmzAnatKjurI+Tl4uTus7GJKJxb+zitufjHs3Q= +github.com/volcengine/volc-sdk-golang v1.0.183 h1:V6M/lhgnBxZS3pLDNwMXSLw+i4VowphNCfVzai6JjWE= +github.com/volcengine/volc-sdk-golang v1.0.183/go.mod h1:u0VtPvlXWpXDTmc9IHkaW1q+5Jjwus4oAqRhNMDRInE= github.com/vulcand/oxy/v2 v2.0.0 h1:V+scHhd2xBjO8ojBRgxCM+OdZxRA/YTs8M70w5tdNy8= github.com/vulcand/oxy/v2 v2.0.0/go.mod h1:uIAz3sYafO7i+V3SC8oDlMn/lt1i9aWcyXuXqVswKzE= github.com/vulcand/predicate v1.2.0 h1:uFsW1gcnnR7R+QTID+FVcs0sSYlIGntoGOTb3rQJt50= @@ -1269,16 +1346,18 @@ github.com/vulcand/predicate v1.2.0/go.mod h1:VipoNYXny6c8N381zGUWkjuuNHiRbeAZhE github.com/vultr/govultr/v3 v3.9.1 h1:uxSIb8Miel7tqTs3ee+z3t+JelZikwqBBsZzCOPBy/8= github.com/vultr/govultr/v3 v3.9.1/go.mod h1:Rd8ebpXm7jxH3MDmhnEs+zrlYW212ouhx+HeUMfHm2o= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yandex-cloud/go-genproto v0.0.0-20240911120709-1fa0cb6f47c2 h1:WgeEP+8WizCQyccJNHOMLONq23qVAzYHtyg5qTdUWmg= -github.com/yandex-cloud/go-genproto v0.0.0-20240911120709-1fa0cb6f47c2/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= -github.com/yandex-cloud/go-sdk v0.0.0-20240911121212-e4e74d0d02f5 h1:Q4LvUMF4kzaGtopoIdXReL9/qGtmzOewBhF3dQvuHMU= -github.com/yandex-cloud/go-sdk v0.0.0-20240911121212-e4e74d0d02f5/go.mod h1:9dt2V80cfJGRZA+5SKP3Ky+R/DxH02XfKObi2Uy2uPc= +github.com/yandex-cloud/go-genproto v0.0.0-20241101135610-76a0cfc1a773 h1:xkWrnYFWxiwCKVbmuOEMR030UCFklpglmOcPv9yJz2c= +github.com/yandex-cloud/go-genproto v0.0.0-20241101135610-76a0cfc1a773/go.mod h1:0LDD/IZLIUIV4iPH+YcF+jysO3jkSvADFGm4dCAuwQo= +github.com/yandex-cloud/go-sdk v0.0.0-20241101143304-947cf519f6bd h1:LcA5pQoWjS2hhG6bV2ZL9eBEV2wLSVbM2KcpDphYP/w= +github.com/yandex-cloud/go-sdk v0.0.0-20241101143304-947cf519f6bd/go.mod h1:oku4OkbdLLOOpZEz2XxYGXI7rFhxBI5W0cLPmpStdqA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1307,6 +1386,7 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3 go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= @@ -1345,6 +1425,7 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1352,6 +1433,7 @@ go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/ratelimit v0.3.0 h1:IdZd9wqvFXnvLvSEBo0KPcGfkoBGNkpTHlrE3Rcjkjw= @@ -1359,6 +1441,7 @@ go.uber.org/ratelimit v0.3.0/go.mod h1:So5LG7CV1zWpY1sHe+DXTJqQvOx+FFPFaAs2SnoyB go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= @@ -1377,27 +1460,34 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= 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= @@ -1494,8 +1584,11 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1504,10 +1597,11 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1520,6 +1614,7 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1544,6 +1639,7 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1574,6 +1670,7 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1617,6 +1714,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc 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-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1634,12 +1732,13 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1649,11 +1748,12 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= 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= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1668,21 +1768,23 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1788,8 +1890,8 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.197.0 h1:x6CwqQLsFiA5JKAiGyGBjc2bNtHtLddhJCE2IKuhhcQ= -google.golang.org/api v0.197.0/go.mod h1:AuOuo20GoQ331nq7DquGHlU6d+2wN2fZ8O0ta60nRNw= +google.golang.org/api v0.204.0 h1:3PjmQQEDkR/ENVZZwIYB4W/KzYtN8OrqnNcHWpeR8E4= +google.golang.org/api v0.204.0/go.mod h1:69y8QSoKIbL9F94bWgWAq6wGqGwyjBgi2y8rAK8zLag= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1840,13 +1942,13 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 h1:BulPr26Jqjnd4eYDVe+YvyR7Yc2vJGkO5/0UxD0/jZU= -google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:hL97c3SYopEHblzpxRL4lSs523++l8DYxGM1FQiYmb4= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 h1:Q3nlH8iSQSRUwOskjbcSMcF2jiYMNiQYZ0c2KEJLKKU= +google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38/go.mod h1:xBI+tzfqGGN2JBeSebfKXFSdBpWVQ7sLW40PTupVRm4= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1870,9 +1972,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= -google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1887,8 +1988,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/DataDog/dd-trace-go.v1 v1.56.1 h1:AUe/ZF7xm6vYnigPe+TY54DmfWYJxhMRaw/TfvrbzvE= gopkg.in/DataDog/dd-trace-go.v1 v1.56.1/go.mod h1:KDLJ3CWVOSuVVwu+0ZR5KZo2rP6c7YyBV3v387dIpUU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1901,6 +2002,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -1911,12 +2013,13 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/ns1/ns1-go.v2 v2.12.0 h1:cqdqQoTx17JmTusfxh5m3e2b36jfUzFAZedv89pFX18= -gopkg.in/ns1/ns1-go.v2 v2.12.0/go.mod h1:pfaU0vECVP7DIOr453z03HXS6dFJpXdNRwOyRzwmPSc= +gopkg.in/ns1/ns1-go.v2 v2.12.2 h1:SPM5BTTMJ1zVBhMMiiPFdF7l6Y3fq5o7bKM7jDqsUfM= +gopkg.in/ns1/ns1-go.v2 v2.12.2/go.mod h1:pfaU0vECVP7DIOr453z03HXS6dFJpXdNRwOyRzwmPSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From f437fb4230f663893dbd12da2f82a1c9a8660262 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 12 Nov 2024 10:56:06 +0100 Subject: [PATCH 10/22] chore: update linter --- .github/workflows/validate.yaml | 2 +- .golangci.yml | 13 +- .semaphore/semaphore.yml | 2 +- cmd/traefik/traefik.go | 2 +- integration/http_test.go | 6 +- pkg/api/handler_http_test.go | 26 +- pkg/api/handler_test.go | 2 +- pkg/config/label/label_test.go | 22 +- pkg/config/static/entrypoints.go | 4 +- pkg/healthcheck/healthcheck_test.go | 2 +- pkg/middlewares/accesslog/logger_test.go | 5 +- pkg/middlewares/tracing/mock_tracing_test.go | 28 +- pkg/muxer/tcp/mux.go | 2 +- pkg/provider/aggregator/aggregator.go | 10 +- pkg/provider/consulcatalog/config_test.go | 97 +++-- pkg/provider/docker/config.go | 2 +- pkg/provider/docker/config_test.go | 90 +++-- pkg/provider/ecs/config_test.go | 89 +++-- .../kubernetes/crd/kubernetes_http.go | 2 +- .../kubernetes/crd/kubernetes_test.go | 257 +++++++------ .../kubernetes/gateway/kubernetes_test.go | 358 ++++++++---------- .../kubernetes/ingress/annotations_test.go | 4 +- .../kubernetes/ingress/kubernetes_test.go | 108 +++--- pkg/provider/kv/kv_test.go | 18 +- pkg/provider/marathon/config_test.go | 81 ++-- pkg/provider/nomad/config_test.go | 87 +++-- pkg/provider/rancher/config_test.go | 43 +-- pkg/provider/traefik/internal.go | 2 +- pkg/redactor/redactor_config_test.go | 32 +- pkg/server/configurationwatcher_test.go | 6 +- .../service/loadbalancer/wrr/wrr_test.go | 50 +-- pkg/server/service/proxy_test.go | 2 +- pkg/server/service/proxy_websocket_test.go | 30 +- pkg/server/service/roundtripper_test.go | 6 +- pkg/server/service/service_test.go | 4 +- pkg/tcp/proxy.go | 4 +- pkg/tls/certificate.go | 122 +++--- pkg/tls/certificate_store.go | 6 +- 38 files changed, 796 insertions(+), 830 deletions(-) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index abcbc97d7..832b91528 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -7,7 +7,7 @@ on: env: GO_VERSION: '1.23' - GOLANGCI_LINT_VERSION: v1.61.0 + GOLANGCI_LINT_VERSION: v1.62.0 MISSPELL_VERSION: v0.6.0 jobs: diff --git a/.golangci.yml b/.golangci.yml index 41a87c9fd..2ea78a8ed 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -159,8 +159,6 @@ linters-settings: linters: enable-all: true disable: - - execinquery # deprecated - - gomnd # deprecated - sqlclosecheck # not relevant (SQL) - rowserrcheck # not relevant (SQL) - cyclop # duplicate of gocyclo @@ -273,3 +271,14 @@ issues: - path: pkg/provider/acme/local_store.go linters: - musttag + - path: pkg/tls/certificate.go + text: 'the methods of "Certificates" use pointer receiver and non-pointer receiver.' + linters: + - recvcheck + +output: + show-stats: true + sort-results: true + sort-order: + - linter + - file diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 419ea70a0..fa09ce3c4 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.61.0 + - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.62.0 - 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/cmd/traefik/traefik.go b/cmd/traefik/traefik.go index 140242d3d..d54b806f3 100644 --- a/cmd/traefik/traefik.go +++ b/cmd/traefik/traefik.go @@ -187,7 +187,7 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err return nil, err } - acmeProviders := initACMEProvider(staticConfiguration, &providerAggregator, tlsManager, httpChallengeProvider, tlsChallengeProvider) + acmeProviders := initACMEProvider(staticConfiguration, providerAggregator, tlsManager, httpChallengeProvider, tlsChallengeProvider) // Entrypoints diff --git a/integration/http_test.go b/integration/http_test.go index 7d19c41d5..800ec316d 100644 --- a/integration/http_test.go +++ b/integration/http_test.go @@ -41,7 +41,7 @@ func (s *HTTPSuite) TestSimpleConfiguration() { Services: map[string]*dynamic.Service{ "serviceHTTP": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: boolRef(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://bacon:80", @@ -81,6 +81,4 @@ func startTestServerWithResponse(response []byte) (ts *httptest.Server) { return ts } -func boolRef(b bool) *bool { - return &b -} +func pointer[T any](v T) *T { return &v } diff --git a/pkg/api/handler_http_test.go b/pkg/api/handler_http_test.go index 7ed879a97..7c1d7fb4c 100644 --- a/pkg/api/handler_http_test.go +++ b/pkg/api/handler_http_test.go @@ -19,7 +19,7 @@ import ( "github.com/traefik/traefik/v2/pkg/config/static" ) -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func TestHandler_HTTP(t *testing.T) { type expected struct { @@ -337,7 +337,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", @@ -354,7 +354,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.2", @@ -423,7 +423,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", @@ -440,7 +440,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.2", @@ -457,7 +457,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.3", @@ -487,7 +487,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", @@ -505,7 +505,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.2", @@ -536,7 +536,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", @@ -554,7 +554,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.2", @@ -585,7 +585,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", @@ -614,7 +614,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", @@ -643,7 +643,7 @@ func TestHandler_HTTP(t *testing.T) { si := &runtime.ServiceInfo{ Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", diff --git a/pkg/api/handler_test.go b/pkg/api/handler_test.go index 9a2e3ae76..b2d5395ca 100644 --- a/pkg/api/handler_test.go +++ b/pkg/api/handler_test.go @@ -38,7 +38,7 @@ func TestHandler_RawData(t *testing.T) { "foo-service@myprovider": { Service: &dynamic.Service{ LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://127.0.0.1", diff --git a/pkg/config/label/label_test.go b/pkg/config/label/label_test.go index a11fb3976..b4c209e4c 100644 --- a/pkg/config/label/label_test.go +++ b/pkg/config/label/label_test.go @@ -13,6 +13,8 @@ import ( "github.com/traefik/traefik/v2/pkg/types" ) +func pointer[T any](v T) *T { return &v } + func TestDecodeConfiguration(t *testing.T) { labels := map[string]string{ "traefik.http.middlewares.Middleware0.addprefix.prefix": "foobar", @@ -265,7 +267,7 @@ func TestDecodeConfiguration(t *testing.T) { Port: "42", }, }, - TerminationDelay: func(i int) *int { return &i }(42), + TerminationDelay: pointer(42), ProxyProtocol: &dynamic.ProxyProtocol{Version: 42}, }, }, @@ -276,7 +278,7 @@ func TestDecodeConfiguration(t *testing.T) { Port: "42", }, }, - TerminationDelay: func(i int) *int { return &i }(42), + TerminationDelay: pointer(42), ProxyProtocol: &dynamic.ProxyProtocol{Version: 2}, }, }, @@ -665,9 +667,9 @@ func TestDecodeConfiguration(t *testing.T) { "name0": "foobar", "name1": "foobar", }, - FollowRedirects: func(v bool) *bool { return &v }(true), + FollowRedirects: pointer(true), }, - PassHostHeader: func(v bool) *bool { return &v }(true), + PassHostHeader: pointer(true), ResponseForwarding: &dynamic.ResponseForwarding{ FlushInterval: "foobar", }, @@ -693,9 +695,9 @@ func TestDecodeConfiguration(t *testing.T) { "name0": "foobar", "name1": "foobar", }, - FollowRedirects: func(v bool) *bool { return &v }(true), + FollowRedirects: pointer(true), }, - PassHostHeader: func(v bool) *bool { return &v }(true), + PassHostHeader: pointer(true), ResponseForwarding: &dynamic.ResponseForwarding{ FlushInterval: "foobar", }, @@ -773,7 +775,7 @@ func TestEncodeConfiguration(t *testing.T) { Port: "42", }, }, - TerminationDelay: func(i int) *int { return &i }(42), + TerminationDelay: pointer(42), }, }, "Service1": { @@ -783,7 +785,7 @@ func TestEncodeConfiguration(t *testing.T) { Port: "42", }, }, - TerminationDelay: func(i int) *int { return &i }(42), + TerminationDelay: pointer(42), }, }, }, @@ -1170,7 +1172,7 @@ func TestEncodeConfiguration(t *testing.T) { "name1": "foobar", }, }, - PassHostHeader: func(v bool) *bool { return &v }(true), + PassHostHeader: pointer(true), ResponseForwarding: &dynamic.ResponseForwarding{ FlushInterval: "foobar", }, @@ -1197,7 +1199,7 @@ func TestEncodeConfiguration(t *testing.T) { "name1": "foobar", }, }, - PassHostHeader: func(v bool) *bool { return &v }(true), + PassHostHeader: pointer(true), ResponseForwarding: &dynamic.ResponseForwarding{ FlushInterval: "foobar", }, diff --git a/pkg/config/static/entrypoints.go b/pkg/config/static/entrypoints.go index 27b9f7a0b..017480098 100644 --- a/pkg/config/static/entrypoints.go +++ b/pkg/config/static/entrypoints.go @@ -24,14 +24,14 @@ type EntryPoint struct { // GetAddress strips any potential protocol part of the address field of the // entry point, in order to return the actual address. -func (ep EntryPoint) GetAddress() string { +func (ep *EntryPoint) GetAddress() string { splitN := strings.SplitN(ep.Address, "/", 2) return splitN[0] } // GetProtocol returns the protocol part of the address field of the entry point. // If none is specified, it defaults to "tcp". -func (ep EntryPoint) GetProtocol() (string, error) { +func (ep *EntryPoint) GetProtocol() (string, error) { splitN := strings.SplitN(ep.Address, "/", 2) if len(splitN) < 2 { return "tcp", nil diff --git a/pkg/healthcheck/healthcheck_test.go b/pkg/healthcheck/healthcheck_test.go index 73254b27e..4fcebde3b 100644 --- a/pkg/healthcheck/healthcheck_test.go +++ b/pkg/healthcheck/healthcheck_test.go @@ -278,7 +278,7 @@ func TestNewRequest(t *testing.T) { if test.expected.err { require.Error(t, err) - assert.Nil(t, nil) + assert.Nil(t, req) } else { require.NoError(t, err, "failed to create new backend request") require.NotNil(t, req) diff --git a/pkg/middlewares/accesslog/logger_test.go b/pkg/middlewares/accesslog/logger_test.go index dc48c3593..097a36322 100644 --- a/pkg/middlewares/accesslog/logger_test.go +++ b/pkg/middlewares/accesslog/logger_test.go @@ -12,7 +12,6 @@ import ( "net/url" "os" "path/filepath" - "regexp" "strconv" "strings" "testing" @@ -809,10 +808,10 @@ func assertValidLogData(t *testing.T, expected string, logData []byte) { assert.Equal(t, resultExpected[OriginContentSize], result[OriginContentSize], formatErrMessage) assert.Equal(t, resultExpected[RequestRefererHeader], result[RequestRefererHeader], formatErrMessage) assert.Equal(t, resultExpected[RequestUserAgentHeader], result[RequestUserAgentHeader], formatErrMessage) - assert.Regexp(t, regexp.MustCompile(`\d*`), result[RequestCount], formatErrMessage) + assert.Regexp(t, `\d*`, result[RequestCount], formatErrMessage) assert.Equal(t, resultExpected[RouterName], result[RouterName], formatErrMessage) assert.Equal(t, resultExpected[ServiceURL], result[ServiceURL], formatErrMessage) - assert.Regexp(t, regexp.MustCompile(`\d*ms`), result[Duration], formatErrMessage) + assert.Regexp(t, `\d*ms`, result[Duration], formatErrMessage) } func captureStdout(t *testing.T) (out *os.File, restoreStdout func()) { diff --git a/pkg/middlewares/tracing/mock_tracing_test.go b/pkg/middlewares/tracing/mock_tracing_test.go index 33aac1ee6..2d3c46891 100644 --- a/pkg/middlewares/tracing/mock_tracing_test.go +++ b/pkg/middlewares/tracing/mock_tracing_test.go @@ -38,24 +38,24 @@ type MockSpan struct { Tags map[string]interface{} } -func (n MockSpan) Context() opentracing.SpanContext { return MockSpanContext{} } -func (n MockSpan) SetBaggageItem(key, val string) opentracing.Span { - return MockSpan{Tags: make(map[string]interface{})} +func (n *MockSpan) Context() opentracing.SpanContext { return MockSpanContext{} } +func (n *MockSpan) SetBaggageItem(key, val string) opentracing.Span { + return &MockSpan{Tags: make(map[string]interface{})} } -func (n MockSpan) BaggageItem(key string) string { return "" } -func (n MockSpan) SetTag(key string, value interface{}) opentracing.Span { +func (n *MockSpan) BaggageItem(key string) string { return "" } +func (n *MockSpan) SetTag(key string, value interface{}) opentracing.Span { n.Tags[key] = value return n } -func (n MockSpan) LogFields(fields ...log.Field) {} -func (n MockSpan) LogKV(keyVals ...interface{}) {} -func (n MockSpan) Finish() {} -func (n MockSpan) FinishWithOptions(opts opentracing.FinishOptions) {} -func (n MockSpan) SetOperationName(operationName string) opentracing.Span { return n } -func (n MockSpan) Tracer() opentracing.Tracer { return MockTracer{} } -func (n MockSpan) LogEvent(event string) {} -func (n MockSpan) LogEventWithPayload(event string, payload interface{}) {} -func (n MockSpan) Log(data opentracing.LogData) {} +func (n *MockSpan) LogFields(fields ...log.Field) {} +func (n *MockSpan) LogKV(keyVals ...interface{}) {} +func (n *MockSpan) Finish() {} +func (n *MockSpan) FinishWithOptions(opts opentracing.FinishOptions) {} +func (n *MockSpan) SetOperationName(operationName string) opentracing.Span { return n } +func (n *MockSpan) Tracer() opentracing.Tracer { return MockTracer{} } +func (n *MockSpan) LogEvent(event string) {} +func (n *MockSpan) LogEventWithPayload(event string, payload interface{}) {} +func (n *MockSpan) Log(data opentracing.LogData) {} func (n *MockSpan) Reset() { n.Tags = make(map[string]interface{}) } diff --git a/pkg/muxer/tcp/mux.go b/pkg/muxer/tcp/mux.go index e50b78899..5bf4fbc08 100644 --- a/pkg/muxer/tcp/mux.go +++ b/pkg/muxer/tcp/mux.go @@ -102,7 +102,7 @@ func NewMuxer() (*Muxer, error) { // Match returns the handler of the first route matching the connection metadata, // and whether the match is exactly from the rule HostSNI(*). -func (m Muxer) Match(meta ConnData) (tcp.Handler, bool) { +func (m *Muxer) Match(meta ConnData) (tcp.Handler, bool) { for _, route := range m.routes { if route.matchers.match(meta) { return route.handler, route.catchAll diff --git a/pkg/provider/aggregator/aggregator.go b/pkg/provider/aggregator/aggregator.go index 888d51fa0..fca5f73ec 100644 --- a/pkg/provider/aggregator/aggregator.go +++ b/pkg/provider/aggregator/aggregator.go @@ -67,8 +67,8 @@ type ProviderAggregator struct { } // NewProviderAggregator returns an aggregate of all the providers configured in the static configuration. -func NewProviderAggregator(conf static.Providers) ProviderAggregator { - p := ProviderAggregator{ +func NewProviderAggregator(conf static.Providers) *ProviderAggregator { + p := &ProviderAggregator{ providersThrottleDuration: time.Duration(conf.ProvidersThrottleDuration), } @@ -172,12 +172,12 @@ func (p *ProviderAggregator) AddProvider(provider provider.Provider) error { } // Init the provider. -func (p ProviderAggregator) Init() error { +func (p *ProviderAggregator) Init() error { return nil } // Provide calls the provide method of every providers. -func (p ProviderAggregator) Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error { +func (p *ProviderAggregator) Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error { if p.fileProvider != nil { p.launchProvider(configurationChan, pool, p.fileProvider) } @@ -197,7 +197,7 @@ func (p ProviderAggregator) Provide(configurationChan chan<- dynamic.Message, po return nil } -func (p ProviderAggregator) launchProvider(configurationChan chan<- dynamic.Message, pool *safe.Pool, prd provider.Provider) { +func (p *ProviderAggregator) launchProvider(configurationChan chan<- dynamic.Message, pool *safe.Pool, prd provider.Provider) { jsonConf, err := redactor.RemoveCredentials(prd) if err != nil { log.WithoutContext().Debugf("Cannot marshal the provider configuration %T: %v", prd, err) diff --git a/pkg/provider/consulcatalog/config_test.go b/pkg/provider/consulcatalog/config_test.go index 5bfba067e..22f830c48 100644 --- a/pkg/provider/consulcatalog/config_test.go +++ b/pkg/provider/consulcatalog/config_test.go @@ -13,8 +13,7 @@ import ( "github.com/traefik/traefik/v2/pkg/types" ) -func Int(v int) *int { return &v } -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func TestDefaultRule(t *testing.T) { testCases := []struct { @@ -64,7 +63,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -118,7 +117,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -164,7 +163,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -210,7 +209,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -262,7 +261,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -350,7 +349,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -407,7 +406,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "https://127.0.0.1:443", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "tls-ns-dc1-dev-Test", }, }, @@ -497,7 +496,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "https://127.0.0.2:444", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "tls-ns-dc1-dev-Test", }, }, @@ -578,7 +577,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -588,7 +587,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -651,7 +650,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -711,7 +710,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -774,7 +773,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -826,7 +825,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -879,7 +878,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -924,7 +923,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -982,7 +981,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1030,7 +1029,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -1040,7 +1039,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1216,7 +1215,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1267,7 +1266,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1344,7 +1343,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1408,7 +1407,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1488,7 +1487,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.3:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1548,7 +1547,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1622,7 +1621,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.3:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1688,7 +1687,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1740,7 +1739,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1793,7 +1792,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "h2c://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1840,7 +1839,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -1850,7 +1849,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2074,7 +2073,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2137,7 +2136,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2188,7 +2187,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2241,7 +2240,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2337,7 +2336,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2393,7 +2392,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2515,7 +2514,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.2:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2544,7 +2543,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2631,7 +2630,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2668,7 +2667,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2760,7 +2759,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(200), + TerminationDelay: pointer(200), }, }, }, @@ -2844,7 +2843,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "https://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "tls-ns-dc1-Test", }, }, @@ -2855,7 +2854,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "https://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "tls-ns-dc1-Test", }, }, @@ -2933,7 +2932,7 @@ func Test_buildConfiguration(t *testing.T) { Servers: []dynamic.TCPServer{ {Address: "127.0.0.1:80"}, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, "Test-17573747155436217342": { @@ -2941,7 +2940,7 @@ func Test_buildConfiguration(t *testing.T) { Servers: []dynamic.TCPServer{ {Address: "127.0.0.2:80"}, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -3136,7 +3135,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, diff --git a/pkg/provider/docker/config.go b/pkg/provider/docker/config.go index f47b0221f..6ce921e3e 100644 --- a/pkg/provider/docker/config.go +++ b/pkg/provider/docker/config.go @@ -307,7 +307,7 @@ func (p *Provider) getIPPort(ctx context.Context, container dockerData, serverPo return ip, port, nil } -func (p Provider) getIPAddress(ctx context.Context, container dockerData) string { +func (p *Provider) getIPAddress(ctx context.Context, container dockerData) string { logger := log.FromContext(ctx) netNotFound := false diff --git a/pkg/provider/docker/config_test.go b/pkg/provider/docker/config_test.go index ed371e7ad..03a5af050 100644 --- a/pkg/provider/docker/config_test.go +++ b/pkg/provider/docker/config_test.go @@ -71,7 +71,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -130,7 +130,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -191,7 +191,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -244,7 +244,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -297,7 +297,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -356,7 +356,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -579,7 +579,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -658,7 +658,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -668,7 +668,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -747,7 +747,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -807,7 +807,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -868,7 +868,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -921,7 +921,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -987,7 +987,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1043,7 +1043,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -1053,7 +1053,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1113,7 +1113,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1353,7 +1353,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1412,7 +1412,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1508,7 +1508,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1591,7 +1591,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1696,7 +1696,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.3:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1773,7 +1773,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1872,7 +1872,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.3:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1954,7 +1954,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2026,7 +2026,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -2036,7 +2036,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2096,7 +2096,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2157,7 +2157,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "h2c://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2212,7 +2212,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -2222,7 +2222,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2418,7 +2418,7 @@ func Test_buildConfiguration(t *testing.T) { Services: map[string]*dynamic.Service{ "Test": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2487,7 +2487,7 @@ func Test_buildConfiguration(t *testing.T) { Services: map[string]*dynamic.TCPService{ "Test": { LoadBalancer: &dynamic.TCPServersLoadBalancer{ - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2676,7 +2676,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2747,7 +2747,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2806,7 +2806,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2867,7 +2867,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2979,7 +2979,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -3043,7 +3043,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -3215,7 +3215,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3314,7 +3314,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(200), + TerminationDelay: pointer(200), }, }, }, @@ -3391,7 +3391,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://192.168.0.1:8081", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3451,7 +3451,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:79", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3958,6 +3958,4 @@ func TestSwarmGetPort(t *testing.T) { } } -func Int(v int) *int { return &v } - -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } diff --git a/pkg/provider/ecs/config_test.go b/pkg/provider/ecs/config_test.go index 3d8f912b8..39764d679 100644 --- a/pkg/provider/ecs/config_test.go +++ b/pkg/provider/ecs/config_test.go @@ -12,8 +12,7 @@ import ( "github.com/traefik/traefik/v2/pkg/types" ) -func Int(v int) *int { return &v } -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func TestDefaultRule(t *testing.T) { testCases := []struct { @@ -66,7 +65,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://10.0.0.1:1337", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -120,7 +119,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -176,7 +175,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -224,7 +223,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -272,7 +271,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -326,7 +325,7 @@ func TestDefaultRule(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -528,7 +527,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -597,7 +596,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -607,7 +606,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -676,7 +675,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -731,7 +730,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -787,7 +786,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -835,7 +834,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -896,7 +895,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -947,7 +946,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -957,7 +956,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1012,7 +1011,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1217,7 +1216,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1271,7 +1270,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1357,7 +1356,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1430,7 +1429,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1520,7 +1519,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.3:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1587,7 +1586,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1671,7 +1670,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.3:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1744,7 +1743,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1806,7 +1805,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -1816,7 +1815,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1871,7 +1870,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1927,7 +1926,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "h2c://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1983,7 +1982,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "h2c://127.0.0.1:8040", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2047,7 +2046,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:32124", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -2057,7 +2056,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:32123", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2107,7 +2106,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -2117,7 +2116,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2397,7 +2396,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2463,7 +2462,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2517,7 +2516,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2573,7 +2572,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2675,7 +2674,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2734,7 +2733,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2891,7 +2890,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2980,7 +2979,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(200), + TerminationDelay: pointer(200), }, }, }, @@ -3046,7 +3045,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, diff --git a/pkg/provider/kubernetes/crd/kubernetes_http.go b/pkg/provider/kubernetes/crd/kubernetes_http.go index 56637a22a..ad84a247b 100644 --- a/pkg/provider/kubernetes/crd/kubernetes_http.go +++ b/pkg/provider/kubernetes/crd/kubernetes_http.go @@ -321,7 +321,7 @@ func (c configBuilder) buildServersLB(namespace string, svc traefikv1alpha1.Load return &dynamic.Service{LoadBalancer: lb}, nil } -func (c *configBuilder) makeServersTransportKey(parentNamespace string, serversTransportName string) (string, error) { +func (c configBuilder) makeServersTransportKey(parentNamespace string, serversTransportName string) (string, error) { if serversTransportName == "" { return "", nil } diff --git a/pkg/provider/kubernetes/crd/kubernetes_test.go b/pkg/provider/kubernetes/crd/kubernetes_test.go index 1d9869d61..ba9031b33 100644 --- a/pkg/provider/kubernetes/crd/kubernetes_test.go +++ b/pkg/provider/kubernetes/crd/kubernetes_test.go @@ -27,8 +27,7 @@ import ( var _ provider.Provider = (*Provider)(nil) -func Int(v int) *int { return &v } -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func TestLoadIngressRouteTCPs(t *testing.T) { testCases := []struct { @@ -376,11 +375,11 @@ func TestLoadIngressRouteTCPs(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-test.route-fdd3e9338e47a45efefc-whoamitcp-8000", - Weight: func(i int) *int { return &i }(2), + Weight: pointer(2), }, { Name: "default-test.route-fdd3e9338e47a45efefc-whoamitcp2-8080", - Weight: func(i int) *int { return &i }(3), + Weight: pointer(3), }, }, }, @@ -443,15 +442,15 @@ func TestLoadIngressRouteTCPs(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-test.route-fdd3e9338e47a45efefc-whoamitcp-8000", - Weight: func(i int) *int { return &i }(2), + Weight: pointer(2), }, { Name: "default-test.route-fdd3e9338e47a45efefc-whoamitcp2-8080", - Weight: func(i int) *int { return &i }(3), + Weight: pointer(3), }, { Name: "default-test.route-fdd3e9338e47a45efefc-whoamitcp3-8083", - Weight: func(i int) *int { return &i }(4), + Weight: pointer(4), }, }, }, @@ -1054,7 +1053,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) { Address: "10.10.0.2:8000", }, }, - TerminationDelay: Int(500), + TerminationDelay: pointer(500), }, }, }, @@ -1264,11 +1263,11 @@ func TestLoadIngressRouteTCPs(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-test.route-673acf455cb2dab0b43a-whoamitcp-ipv6-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-test.route-673acf455cb2dab0b43a-external.service.with.ipv6-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -1313,7 +1312,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) { URL: "http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:8080", }, }, - PassHostHeader: func(i bool) *bool { return &i }(true), + PassHostHeader: pointer(true), }, }, "default-external-svc-with-ipv6-8080": { @@ -1323,7 +1322,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) { URL: "http://[2001:db8:85a3:8d3:1319:8a2e:370:7347]:8080", }, }, - PassHostHeader: func(i bool) *bool { return &i }(true), + PassHostHeader: pointer(true), }, }, "default-test-route-6b204d94623b3df4370c": { @@ -1331,11 +1330,11 @@ func TestLoadIngressRouteTCPs(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-ipv6-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-external-svc-with-ipv6-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -1537,7 +1536,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1605,7 +1604,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1656,7 +1655,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1713,7 +1712,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1761,7 +1760,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-test-route-77c62dfe9517144aeeaa": { @@ -1774,7 +1773,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1813,11 +1812,11 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-whoami2-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -1832,7 +1831,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-whoami2-8080": { @@ -1845,7 +1844,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1883,7 +1882,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -1898,7 +1897,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1929,7 +1928,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -1944,7 +1943,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1982,11 +1981,11 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-wrr1", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-wrr2", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -1996,11 +1995,11 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami4-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2015,7 +2014,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-whoami5-8080": { @@ -2028,7 +2027,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-wrr2": { @@ -2036,11 +2035,11 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami6-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-whoami7-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2055,7 +2054,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.6:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-whoami7-8080": { @@ -2068,7 +2067,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.8:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2106,11 +2105,11 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-wrr2", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2120,7 +2119,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2135,7 +2134,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2173,15 +2172,15 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-wrr2", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-mirror1", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2191,7 +2190,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2214,7 +2213,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-whoami5-8080": { @@ -2227,7 +2226,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2266,23 +2265,23 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "baz-whoami6-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "foo-wrr1", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "foo-mirror2", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "foo-mirror3", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "foo-mirror4", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2297,7 +2296,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.6:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "foo-wrr1": { @@ -2305,19 +2304,19 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "foo-whoami4-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "baz-whoami6-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "foo-mirror1", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "bar-wrr2", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2332,7 +2331,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "foo-mirror1": { @@ -2355,7 +2354,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "bar-mirrored": { @@ -2393,7 +2392,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "foo-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2457,7 +2456,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-whoami5-8080": { @@ -2470,7 +2469,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2516,7 +2515,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami4-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2526,7 +2525,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami5-8080", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -2541,7 +2540,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-whoami5-8080": { @@ -2554,7 +2553,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2592,11 +2591,11 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: Int(10), + Weight: pointer(10), }, { Name: "default-whoami2-8080", - Weight: Int(0), + Weight: pointer(0), }, }, }, @@ -2611,7 +2610,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-whoami2-8080": { @@ -2624,7 +2623,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2744,7 +2743,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2813,7 +2812,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2861,7 +2860,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2930,7 +2929,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3000,7 +2999,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3068,7 +3067,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3140,7 +3139,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3213,7 +3212,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3257,7 +3256,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3300,7 +3299,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "https://10.10.0.6:8443", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3343,7 +3342,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "https://10.10.0.8:8443", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3590,7 +3589,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3632,7 +3631,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(false), + PassHostHeader: pointer(false), ResponseForwarding: &dynamic.ResponseForwarding{FlushInterval: "10s"}, }, }, @@ -3687,7 +3686,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3744,7 +3743,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3790,7 +3789,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3831,7 +3830,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://external.domain:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3870,7 +3869,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://external.domain:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -3909,7 +3908,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "https://external.domain:443", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -4000,7 +3999,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "https://external.domain:443", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "default-test", }, }, @@ -4014,7 +4013,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "https://10.10.0.6:8443", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "default-default-test", }, }, @@ -4023,11 +4022,11 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-external-svc-with-https-443", - Weight: Int(1), + Weight: pointer(1), }, { Name: "default-whoamitls-443", - Weight: Int(1), + Weight: pointer(1), }, }, }, @@ -4086,7 +4085,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: map[string]*dynamic.Service{ "default-test-route-6b204d94623b3df4370c": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -4130,7 +4129,7 @@ func TestLoadIngressRoutes(t *testing.T) { URL: "http://10.10.0.4:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -4176,18 +4175,18 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-test-weighted", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-test-mirror", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, }, "default-test-errorpage-errorpage-service": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-test-weighted": { @@ -4195,7 +4194,7 @@ func TestLoadIngressRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-without-endpoints-subsets-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -4215,7 +4214,7 @@ func TestLoadIngressRoutes(t *testing.T) { }, "default-whoami-without-endpoints-subsets-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -4390,11 +4389,11 @@ func TestLoadIngressRouteUDPs(t *testing.T) { Services: []dynamic.UDPWRRService{ { Name: "default-test.route-0-whoamiudp-8000", - Weight: func(i int) *int { return &i }(2), + Weight: pointer(2), }, { Name: "default-test.route-0-whoamiudp2-8080", - Weight: func(i int) *int { return &i }(3), + Weight: pointer(3), }, }, }, @@ -4456,15 +4455,15 @@ func TestLoadIngressRouteUDPs(t *testing.T) { Services: []dynamic.UDPWRRService{ { Name: "default-test.route-0-whoamiudp-8000", - Weight: func(i int) *int { return &i }(2), + Weight: pointer(2), }, { Name: "default-test.route-0-whoamiudp2-8080", - Weight: func(i int) *int { return &i }(3), + Weight: pointer(3), }, { Name: "default-test.route-0-whoamiudp3-8083", - Weight: func(i int) *int { return &i }(4), + Weight: pointer(4), }, }, }, @@ -5096,7 +5095,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -5171,7 +5170,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-test-crossnamespace-route-9313b71dbe6a649d5049": { @@ -5184,7 +5183,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-test-errorpage-errorpage-service": { @@ -5197,7 +5196,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-test-crossnamespace-route-a1963878aac7331b7950": { @@ -5210,7 +5209,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -5254,23 +5253,23 @@ func TestCrossNamespace(t *testing.T) { Services: []dynamic.WRRService{ { Name: "cross-ns-whoami-svc-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-tr-svc-wrr1", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "cross-ns-tr-svc-wrr2", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "default-tr-svc-mirror1", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, { Name: "cross-ns-tr-svc-mirror2", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -5285,7 +5284,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "foo-test@kubernetescrd", }, }, @@ -5299,7 +5298,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "default-tr-svc-wrr1": { @@ -5307,7 +5306,7 @@ func TestCrossNamespace(t *testing.T) { Services: []dynamic.WRRService{ { Name: "cross-ns-whoami-svc-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -5317,7 +5316,7 @@ func TestCrossNamespace(t *testing.T) { Services: []dynamic.WRRService{ { Name: "cross-ns-whoami-svc-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -5354,7 +5353,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -5385,7 +5384,7 @@ func TestCrossNamespace(t *testing.T) { Services: []dynamic.WRRService{ { Name: "cross-ns-whoami-svc-80", - Weight: func(i int) *int { return &i }(1), + Weight: pointer(1), }, }, }, @@ -5400,7 +5399,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "cross-ns-tr-svc-mirror2": { @@ -5424,7 +5423,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -5468,7 +5467,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), ServersTransport: "cross-ns-st-cross-ns@kubernetescrd", }, }, @@ -5560,7 +5559,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -5619,7 +5618,7 @@ func TestCrossNamespace(t *testing.T) { URL: "http://10.10.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -6167,7 +6166,7 @@ func TestExternalNameService(t *testing.T) { URL: "http://external.domain:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -6454,7 +6453,7 @@ func TestNativeLB(t *testing.T) { URL: "http://10.10.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, diff --git a/pkg/provider/kubernetes/gateway/kubernetes_test.go b/pkg/provider/kubernetes/gateway/kubernetes_test.go index ea0e7c504..1d51d26af 100644 --- a/pkg/provider/kubernetes/gateway/kubernetes_test.go +++ b/pkg/provider/kubernetes/gateway/kubernetes_test.go @@ -16,6 +16,8 @@ import ( var _ provider.Provider = (*Provider)(nil) +func ptr[T any](v T) *T { return &v } + func TestLoadHTTPRoutes(t *testing.T) { testCases := []struct { desc string @@ -536,7 +538,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -622,11 +624,11 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "service@file", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -682,7 +684,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -746,7 +748,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -801,7 +803,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -856,7 +858,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -916,7 +918,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -926,7 +928,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami2-8080", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -994,11 +996,11 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, { Name: "default-whoami2-8080", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1077,7 +1079,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1087,7 +1089,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1162,7 +1164,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1172,7 +1174,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1241,7 +1243,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1251,7 +1253,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1306,7 +1308,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1366,7 +1368,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1376,7 +1378,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "bar-whoami-bar-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1444,7 +1446,7 @@ func TestLoadHTTPRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "bar-whoami-bar-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1690,7 +1692,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1751,7 +1753,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1761,7 +1763,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-10000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1829,11 +1831,11 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-tcp-app-my-tcp-gateway-tcp-1-e3b0c44298fc1c149afb-wrr-0", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, { Name: "default-tcp-app-my-tcp-gateway-tcp-1-e3b0c44298fc1c149afb-wrr-1", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1843,7 +1845,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1853,7 +1855,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-10000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1919,11 +1921,11 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "service@file", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -1977,7 +1979,7 @@ func TestLoadTCPRoutes(t *testing.T) { Weighted: &dynamic.TCPWeightedRoundRobin{ Services: []dynamic.TCPWRRService{{ Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }}, }, }, @@ -2039,7 +2041,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2098,7 +2100,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2108,7 +2110,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2174,7 +2176,7 @@ func TestLoadTCPRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2458,7 +2460,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2524,7 +2526,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2581,7 +2583,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2645,7 +2647,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2655,7 +2657,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-10000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2731,11 +2733,11 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "service@file", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2801,7 +2803,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2858,7 +2860,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2915,7 +2917,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -2972,7 +2974,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3029,7 +3031,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3094,7 +3096,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3104,7 +3106,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3173,7 +3175,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3230,11 +3232,11 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-tls-app-my-gateway-tcp-1-673acf455cb2dab0b43a-wrr-0", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, { Name: "default-tls-app-my-gateway-tcp-1-673acf455cb2dab0b43a-wrr-1", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3244,7 +3246,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3254,7 +3256,7 @@ func TestLoadTLSRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-10000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3459,7 +3461,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3469,7 +3471,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3479,7 +3481,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3519,7 +3521,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3529,7 +3531,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3633,7 +3635,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3643,7 +3645,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3653,7 +3655,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3693,7 +3695,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3703,7 +3705,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3791,7 +3793,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3801,7 +3803,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3811,7 +3813,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3845,7 +3847,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3855,7 +3857,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3894,7 +3896,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3904,7 +3906,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3940,7 +3942,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "bar-whoami-bar-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -3950,7 +3952,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "bar-whoami-bar-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4026,7 +4028,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4036,7 +4038,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4046,7 +4048,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "bar-whoamitcp-bar-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4087,7 +4089,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "bar-whoami-bar-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4097,7 +4099,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "bar-whoami-bar-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4152,7 +4154,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4162,7 +4164,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "default-whoamitcp-9000", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4202,7 +4204,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4212,7 +4214,7 @@ func TestLoadMixedRoutes(t *testing.T) { Services: []dynamic.WRRService{ { Name: "default-whoami-80", - Weight: func(i int) *int { return &i }(1), + Weight: ptr(1), }, }, }, @@ -4437,7 +4439,7 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: nil, }, }, @@ -4451,7 +4453,7 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: pointer.String("/foo/"), }, }, @@ -4465,13 +4467,13 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: pointer.String("/foo/"), }, }, { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr("unknown"), + Type: ptr[gatev1alpha2.PathMatchType]("unknown"), Value: pointer.String("/foo/"), }, }, @@ -4485,7 +4487,7 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: pointer.String("/foo/"), }, }, @@ -4500,14 +4502,14 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: pointer.String("/foo/"), }, }, { Headers: []gatev1alpha2.HTTPHeaderMatch{ { - Type: headerMatchTypePtr(gatev1alpha2.HeaderMatchExact), + Type: ptr[gatev1alpha2.HeaderMatchType](gatev1alpha2.HeaderMatchExact), Name: "my-header", Value: "foo", }, @@ -4523,12 +4525,12 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: pointer.String("/foo/"), }, Headers: []gatev1alpha2.HTTPHeaderMatch{ { - Type: headerMatchTypePtr(gatev1alpha2.HeaderMatchExact), + Type: ptr[gatev1alpha2.HeaderMatchType](gatev1alpha2.HeaderMatchExact), Name: "my-header", Value: "foo", }, @@ -4545,12 +4547,12 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: pointer.String("/foo/"), }, Headers: []gatev1alpha2.HTTPHeaderMatch{ { - Type: headerMatchTypePtr(gatev1alpha2.HeaderMatchExact), + Type: ptr[gatev1alpha2.HeaderMatchType](gatev1alpha2.HeaderMatchExact), Name: "my-header", Value: "foo", }, @@ -4567,14 +4569,14 @@ func Test_extractRule(t *testing.T) { Matches: []gatev1alpha2.HTTPRouteMatch{ { Path: &gatev1alpha2.HTTPPathMatch{ - Type: pathMatchTypePtr(gatev1alpha2.PathMatchExact), + Type: ptr[gatev1alpha2.PathMatchType](gatev1alpha2.PathMatchExact), Value: pointer.String("/foo/"), }, }, { Headers: []gatev1alpha2.HTTPHeaderMatch{ { - Type: headerMatchTypePtr(gatev1alpha2.HeaderMatchExact), + Type: ptr[gatev1alpha2.HeaderMatchType](gatev1alpha2.HeaderMatchExact), Name: "my-header", Value: "foo", }, @@ -4707,11 +4709,11 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Namespace: namespacePtr("default"), - Kind: kindPtr("Foo"), - Group: groupPtr(gatev1alpha2.GroupName), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Kind: ptr[gatev1alpha2.Kind]("Foo"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }, }, }, @@ -4732,11 +4734,11 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Namespace: namespacePtr("default"), - Kind: kindPtr("Gateway"), - Group: groupPtr("foo.com"), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), + Group: ptr[gatev1alpha2.Group]("foo.com"), }, }, }, @@ -4757,10 +4759,10 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Namespace: namespacePtr("default"), - Group: groupPtr(gatev1alpha2.GroupName), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }, }, }, @@ -4781,10 +4783,10 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Namespace: namespacePtr("default"), - Kind: kindPtr("Gateway"), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), }, }, }, @@ -4805,11 +4807,11 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Namespace: namespacePtr("default"), - Group: groupPtr(gatev1alpha2.GroupName), - Kind: kindPtr("Gateway"), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), }, }, }, @@ -4830,11 +4832,11 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Namespace: namespacePtr("bar"), - Group: groupPtr(gatev1alpha2.GroupName), - Kind: kindPtr("Gateway"), + Namespace: ptr[gatev1alpha2.Namespace]("bar"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), }, }, }, @@ -4855,10 +4857,10 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Group: groupPtr(gatev1alpha2.GroupName), - Kind: kindPtr("Gateway"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), }, }, }, @@ -4879,11 +4881,11 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("bar"), + SectionName: ptr[gatev1alpha2.SectionName]("bar"), Name: "gateway", - Namespace: namespacePtr("default"), - Kind: kindPtr("Gateway"), - Group: groupPtr(gatev1alpha2.GroupName), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }, }, }, @@ -4904,10 +4906,10 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("foo"), + SectionName: ptr[gatev1alpha2.SectionName]("foo"), Name: "gateway", - Kind: kindPtr("Gateway"), - Group: groupPtr(gatev1alpha2.GroupName), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }, }, }, @@ -4928,11 +4930,11 @@ func Test_shouldAttach(t *testing.T) { routeSpec: gatev1alpha2.CommonRouteSpec{ ParentRefs: []gatev1alpha2.ParentRef{ { - SectionName: sectionNamePtr("foo"), + SectionName: ptr[gatev1alpha2.SectionName]("foo"), Name: "gateway", - Namespace: namespacePtr("default"), - Kind: kindPtr("Gateway"), - Group: groupPtr(gatev1alpha2.GroupName), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }, }, }, @@ -4954,15 +4956,15 @@ func Test_shouldAttach(t *testing.T) { ParentRefs: []gatev1alpha2.ParentRef{ { Name: "gateway2", - Namespace: namespacePtr("default"), - Kind: kindPtr("Gateway"), - Group: groupPtr(gatev1alpha2.GroupName), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }, { Name: "gateway", - Namespace: namespacePtr("default"), - Kind: kindPtr("Gateway"), - Group: groupPtr(gatev1alpha2.GroupName), + Namespace: ptr[gatev1alpha2.Namespace]("default"), + Kind: ptr[gatev1alpha2.Kind]("Gateway"), + Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }, }, }, @@ -4993,7 +4995,7 @@ func Test_matchingHostnames(t *testing.T) { { desc: "Only listener hostname", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("foo.com"), }, want: []gatev1alpha2.Hostname{"foo.com"}, }, @@ -5005,7 +5007,7 @@ func Test_matchingHostnames(t *testing.T) { { desc: "Matching hostname", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("foo.com"), }, hostnames: []gatev1alpha2.Hostname{"foo.com"}, want: []gatev1alpha2.Hostname{"foo.com"}, @@ -5013,7 +5015,7 @@ func Test_matchingHostnames(t *testing.T) { { desc: "Matching hostname with wildcard", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("*.foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("*.foo.com"), }, hostnames: []gatev1alpha2.Hostname{"*.foo.com"}, want: []gatev1alpha2.Hostname{"*.foo.com"}, @@ -5021,7 +5023,7 @@ func Test_matchingHostnames(t *testing.T) { { desc: "Matching subdomain with listener wildcard", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("*.foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("*.foo.com"), }, hostnames: []gatev1alpha2.Hostname{"bar.foo.com"}, want: []gatev1alpha2.Hostname{"bar.foo.com"}, @@ -5029,7 +5031,7 @@ func Test_matchingHostnames(t *testing.T) { { desc: "Matching subdomain with route hostname wildcard", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("bar.foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("bar.foo.com"), }, hostnames: []gatev1alpha2.Hostname{"*.foo.com"}, want: []gatev1alpha2.Hostname{"bar.foo.com"}, @@ -5037,21 +5039,21 @@ func Test_matchingHostnames(t *testing.T) { { desc: "Non matching root domain with listener wildcard", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("*.foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("*.foo.com"), }, hostnames: []gatev1alpha2.Hostname{"foo.com"}, }, { desc: "Non matching root domain with route hostname wildcard", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("foo.com"), }, hostnames: []gatev1alpha2.Hostname{"*.foo.com"}, }, { desc: "Multiple route hostnames with one matching route hostname", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("*.foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("*.foo.com"), }, hostnames: []gatev1alpha2.Hostname{"bar.com", "test.foo.com", "test.buz.com"}, want: []gatev1alpha2.Hostname{"test.foo.com"}, @@ -5059,14 +5061,14 @@ func Test_matchingHostnames(t *testing.T) { { desc: "Multiple route hostnames with non matching route hostname", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("*.fuz.com"), + Hostname: ptr[gatev1alpha2.Hostname]("*.fuz.com"), }, hostnames: []gatev1alpha2.Hostname{"bar.com", "test.foo.com", "test.buz.com"}, }, { desc: "Multiple route hostnames with multiple matching route hostnames", listener: gatev1alpha2.Listener{ - Hostname: hostnamePtr("*.foo.com"), + Hostname: ptr[gatev1alpha2.Hostname]("*.foo.com"), }, hostnames: []gatev1alpha2.Hostname{"toto.foo.com", "test.foo.com", "test.buz.com"}, want: []gatev1alpha2.Hostname{"toto.foo.com", "test.foo.com"}, @@ -5097,10 +5099,10 @@ func Test_getAllowedRoutes(t *testing.T) { { desc: "Empty AllowedRoutes", supportedRouteKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, wantKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, }, { @@ -5108,12 +5110,12 @@ func Test_getAllowedRoutes(t *testing.T) { listener: gatev1alpha2.Listener{ AllowedRoutes: &gatev1alpha2.AllowedRoutes{ Kinds: []gatev1alpha2.RouteGroupKind{{ - Kind: kindTLSRoute, Group: groupPtr("foo"), + Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group]("foo"), }}, }, }, supportedRouteKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, wantErr: true, }, @@ -5127,7 +5129,7 @@ func Test_getAllowedRoutes(t *testing.T) { }, }, supportedRouteKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, wantErr: true, }, @@ -5136,12 +5138,12 @@ func Test_getAllowedRoutes(t *testing.T) { listener: gatev1alpha2.Listener{ AllowedRoutes: &gatev1alpha2.AllowedRoutes{ Kinds: []gatev1alpha2.RouteGroupKind{{ - Kind: "foo", Group: groupPtr(gatev1alpha2.GroupName), + Kind: "foo", Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }}, }, }, supportedRouteKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, wantErr: true, }, @@ -5150,15 +5152,15 @@ func Test_getAllowedRoutes(t *testing.T) { listener: gatev1alpha2.Listener{ AllowedRoutes: &gatev1alpha2.AllowedRoutes{ Kinds: []gatev1alpha2.RouteGroupKind{{ - Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName), + Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName), }}, }, }, supportedRouteKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, wantKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, }, { @@ -5166,20 +5168,20 @@ func Test_getAllowedRoutes(t *testing.T) { listener: gatev1alpha2.Listener{ AllowedRoutes: &gatev1alpha2.AllowedRoutes{ Kinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, - {Kind: kindTCPRoute, Group: groupPtr(gatev1alpha2.GroupName)}, - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, - {Kind: kindTCPRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, + {Kind: kindTCPRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, + {Kind: kindTCPRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, }, }, supportedRouteKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, - {Kind: kindTCPRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, + {Kind: kindTCPRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, wantKinds: []gatev1alpha2.RouteGroupKind{ - {Kind: kindTLSRoute, Group: groupPtr(gatev1alpha2.GroupName)}, - {Kind: kindTCPRoute, Group: groupPtr(gatev1alpha2.GroupName)}, + {Kind: kindTLSRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, + {Kind: kindTCPRoute, Group: ptr[gatev1alpha2.Group](gatev1alpha2.GroupName)}, }, }, } @@ -5215,7 +5217,7 @@ func Test_makeListenerKey(t *testing.T) { listener: gatev1alpha2.Listener{ Port: 443, Protocol: gatev1alpha2.HTTPSProtocolType, - Hostname: hostnamePtr("www.example.com"), + Hostname: ptr[gatev1alpha2.Hostname]("www.example.com"), }, expectedKey: "HTTPS|www.example.com|443", }, @@ -5237,27 +5239,3 @@ func Test_makeListenerKey(t *testing.T) { }) } } - -func hostnamePtr(hostname gatev1alpha2.Hostname) *gatev1alpha2.Hostname { - return &hostname -} - -func groupPtr(group gatev1alpha2.Group) *gatev1alpha2.Group { - return &group -} - -func sectionNamePtr(sectionName gatev1alpha2.SectionName) *gatev1alpha2.SectionName { - return §ionName -} - -func namespacePtr(namespace gatev1alpha2.Namespace) *gatev1alpha2.Namespace { - return &namespace -} - -func kindPtr(kind gatev1alpha2.Kind) *gatev1alpha2.Kind { - return &kind -} - -func pathMatchTypePtr(p gatev1alpha2.PathMatchType) *gatev1alpha2.PathMatchType { return &p } - -func headerMatchTypePtr(h gatev1alpha2.HeaderMatchType) *gatev1alpha2.HeaderMatchType { return &h } diff --git a/pkg/provider/kubernetes/ingress/annotations_test.go b/pkg/provider/kubernetes/ingress/annotations_test.go index 7dbf309f9..f44e70079 100644 --- a/pkg/provider/kubernetes/ingress/annotations_test.go +++ b/pkg/provider/kubernetes/ingress/annotations_test.go @@ -124,7 +124,7 @@ func Test_parseServiceConfig(t *testing.T) { }, ServersScheme: "protocol", ServersTransport: "foobar@file", - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), NativeLB: true, }, }, @@ -137,7 +137,7 @@ func Test_parseServiceConfig(t *testing.T) { expected: &ServiceConfig{ Service: &ServiceIng{ Sticky: &dynamic.Sticky{Cookie: &dynamic.Cookie{}}, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, diff --git a/pkg/provider/kubernetes/ingress/kubernetes_test.go b/pkg/provider/kubernetes/ingress/kubernetes_test.go index abd08ab01..e999e14b7 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes_test.go +++ b/pkg/provider/kubernetes/ingress/kubernetes_test.go @@ -21,7 +21,7 @@ import ( var _ provider.Provider = (*Provider)(nil) -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func TestLoadConfigurationFromIngresses(t *testing.T) { testCases := []struct { @@ -68,7 +68,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -115,7 +115,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Sticky: &dynamic.Sticky{ Cookie: &dynamic.Cookie{ Name: "foobar", @@ -157,7 +157,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -191,7 +191,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -225,7 +225,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -259,7 +259,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -289,7 +289,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -319,7 +319,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-example-com-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.11.0.1:80", @@ -350,7 +350,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -384,7 +384,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -418,7 +418,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -431,7 +431,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, "testing-service2-8082": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.2:8080", @@ -462,7 +462,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -496,7 +496,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "default-backend": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -526,7 +526,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8089", @@ -556,7 +556,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-tchouk": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8089", @@ -586,7 +586,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-tchouk": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8089", @@ -620,7 +620,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-tchouk": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8089", @@ -633,7 +633,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, "testing-service1-carotte": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8090", @@ -663,7 +663,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-tchouk": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8089", @@ -697,7 +697,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-tchouk": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8089", @@ -710,7 +710,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, "toto-service1-tchouk": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.11.0.1:8089", @@ -762,7 +762,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-8080": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.0.0.1:8080", @@ -790,7 +790,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-example-com-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.11.0.1:80", @@ -827,7 +827,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-443": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "https://10.10.0.1:8443", @@ -857,7 +857,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-8443": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "https://10.10.0.1:8443", @@ -888,7 +888,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-8443": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "https://10.10.0.1:8443", @@ -919,7 +919,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "default-backend": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.30.0.1:8080", @@ -949,7 +949,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1023,7 +1023,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1053,7 +1053,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1085,7 +1085,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1113,7 +1113,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1141,7 +1141,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1169,7 +1169,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1197,7 +1197,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1225,7 +1225,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1265,7 +1265,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1294,7 +1294,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1322,7 +1322,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1350,7 +1350,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1378,7 +1378,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1406,7 +1406,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1434,7 +1434,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1462,7 +1462,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1490,7 +1490,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1518,7 +1518,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-80": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1546,7 +1546,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-foobar": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:4711", @@ -1587,7 +1587,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { Services: map[string]*dynamic.Service{ "default-backend": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.10.0.1:8080", @@ -1676,7 +1676,7 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-8080": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://traefik.wtf:8080", @@ -1708,7 +1708,7 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) { URL: "http://[2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b]:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1736,7 +1736,7 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) { URL: "http://[2001:0db8:3c4d:0015:0000:0000:1a2f:2a3b]:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1809,7 +1809,7 @@ func TestLoadConfigurationFromIngressesWithNativeLB(t *testing.T) { Services: map[string]*dynamic.Service{ "testing-service1-8080": { LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: "http://10.0.0.1:8080", diff --git a/pkg/provider/kv/kv_test.go b/pkg/provider/kv/kv_test.go index 535a48bab..18693d485 100644 --- a/pkg/provider/kv/kv_test.go +++ b/pkg/provider/kv/kv_test.go @@ -15,6 +15,8 @@ import ( "github.com/traefik/traefik/v2/pkg/types" ) +func pointer[T any](v T) *T { return &v } + func Test_buildConfiguration(t *testing.T) { provider := newProviderMock(mapToPairs(map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "foobar", @@ -647,13 +649,13 @@ func Test_buildConfiguration(t *testing.T) { Interval: "foobar", Timeout: "foobar", Hostname: "foobar", - FollowRedirects: func(v bool) *bool { return &v }(true), + FollowRedirects: pointer(true), Headers: map[string]string{ "name0": "foobar", "name1": "foobar", }, }, - PassHostHeader: func(v bool) *bool { return &v }(true), + PassHostHeader: pointer(true), ResponseForwarding: &dynamic.ResponseForwarding{ FlushInterval: "foobar", }, @@ -662,7 +664,7 @@ func Test_buildConfiguration(t *testing.T) { "Service02": { Mirroring: &dynamic.Mirroring{ Service: "foobar", - MaxBodySize: func(v int64) *int64 { return &v }(42), + MaxBodySize: pointer[int64](42), Mirrors: []dynamic.MirrorService{ { Name: "foobar", @@ -680,11 +682,11 @@ func Test_buildConfiguration(t *testing.T) { Services: []dynamic.WRRService{ { Name: "foobar", - Weight: func(v int) *int { return &v }(42), + Weight: pointer(42), }, { Name: "foobar", - Weight: func(v int) *int { return &v }(42), + Weight: pointer(42), }, }, Sticky: &dynamic.Sticky{ @@ -768,7 +770,7 @@ func Test_buildConfiguration(t *testing.T) { Services: map[string]*dynamic.TCPService{ "TCPService01": { LoadBalancer: &dynamic.TCPServersLoadBalancer{ - TerminationDelay: func(v int) *int { return &v }(42), + TerminationDelay: pointer(42), Servers: []dynamic.TCPServer{ {Address: "foobar"}, {Address: "foobar"}, @@ -780,11 +782,11 @@ func Test_buildConfiguration(t *testing.T) { Services: []dynamic.TCPWRRService{ { Name: "foobar", - Weight: func(v int) *int { return &v }(42), + Weight: pointer(42), }, { Name: "foobar", - Weight: func(v int) *int { return &v }(43), + Weight: pointer(43), }, }, }, diff --git a/pkg/provider/marathon/config_test.go b/pkg/provider/marathon/config_test.go index 8400b877a..f8923833c 100644 --- a/pkg/provider/marathon/config_test.go +++ b/pkg/provider/marathon/config_test.go @@ -13,8 +13,7 @@ import ( "github.com/traefik/traefik/v2/pkg/types" ) -func Int(v int) *int { return &v } -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func TestGetConfigurationAPIErrors(t *testing.T) { fakeClient := newFakeClient(true, marathon.Applications{}) @@ -73,7 +72,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, @@ -146,7 +145,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, @@ -202,7 +201,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, @@ -248,7 +247,7 @@ func TestBuildConfiguration(t *testing.T) { Address: "localhost:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -314,7 +313,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:8081", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, @@ -378,7 +377,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:8083", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, @@ -431,7 +430,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, "bar": {LoadBalancer: &dynamic.ServersLoadBalancer{ Servers: []dynamic.Server{ @@ -439,7 +438,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:8081", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, @@ -487,7 +486,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:81", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -533,7 +532,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, @@ -580,7 +579,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -620,7 +619,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -673,7 +672,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -716,7 +715,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -726,7 +725,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -837,7 +836,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "app2": { @@ -847,7 +846,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -905,7 +904,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "app2": { @@ -915,7 +914,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -962,7 +961,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "app2": { @@ -972,7 +971,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1026,7 +1025,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1073,7 +1072,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "app2": { @@ -1083,7 +1082,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1130,7 +1129,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1178,7 +1177,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "h2c://localhost:90", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1220,7 +1219,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -1230,7 +1229,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1459,7 +1458,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1507,7 +1506,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1554,7 +1553,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1593,7 +1592,7 @@ func TestBuildConfiguration(t *testing.T) { Address: "localhost:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1679,7 +1678,7 @@ func TestBuildConfiguration(t *testing.T) { Address: "localhost:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1728,7 +1727,7 @@ func TestBuildConfiguration(t *testing.T) { Address: "localhost:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1824,7 +1823,7 @@ func TestBuildConfiguration(t *testing.T) { Address: "localhost:8080", }, }, - TerminationDelay: Int(200), + TerminationDelay: pointer(200), }, }, }, @@ -1874,7 +1873,7 @@ func TestBuildConfiguration(t *testing.T) { Address: "localhost:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1900,7 +1899,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1964,7 +1963,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2012,7 +2011,7 @@ func TestBuildConfiguration(t *testing.T) { URL: "http://localhost:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }}, }, ServersTransports: map[string]*dynamic.ServersTransport{}, diff --git a/pkg/provider/nomad/config_test.go b/pkg/provider/nomad/config_test.go index 84a4791bc..b18335d3c 100644 --- a/pkg/provider/nomad/config_test.go +++ b/pkg/provider/nomad/config_test.go @@ -58,7 +58,7 @@ func Test_defaultRule(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -112,7 +112,7 @@ func Test_defaultRule(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -157,7 +157,7 @@ func Test_defaultRule(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -208,7 +208,7 @@ func Test_defaultRule(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -282,7 +282,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -345,7 +345,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://192.168.1.101:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -355,7 +355,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://192.168.1.102:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -418,7 +418,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -478,7 +478,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -541,7 +541,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -593,7 +593,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -646,7 +646,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -691,7 +691,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -749,7 +749,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -797,7 +797,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -807,7 +807,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -984,7 +984,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1035,7 +1035,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1113,7 +1113,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1178,7 +1178,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1237,7 +1237,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1301,7 +1301,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1353,7 +1353,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1406,7 +1406,7 @@ func Test_buildConfig(t *testing.T) { URL: "h2c://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1453,7 +1453,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Service2": { @@ -1463,7 +1463,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:8080", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1654,7 +1654,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1717,7 +1717,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1768,7 +1768,7 @@ func Test_buildConfig(t *testing.T) { Address: "127.0.0.1:9999", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1821,7 +1821,7 @@ func Test_buildConfig(t *testing.T) { Address: "127.0.0.1:9999", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1917,7 +1917,7 @@ func Test_buildConfig(t *testing.T) { Address: "127.0.0.1:9999", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1973,7 +1973,7 @@ func Test_buildConfig(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2095,7 +2095,7 @@ func Test_buildConfig(t *testing.T) { Address: "127.0.0.2:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2124,7 +2124,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2211,7 +2211,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2248,7 +2248,7 @@ func Test_buildConfig(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2340,7 +2340,7 @@ func Test_buildConfig(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(200), + TerminationDelay: pointer(200), }, }, }, @@ -2423,7 +2423,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test-1234154071633021619": { @@ -2433,7 +2433,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2497,7 +2497,7 @@ func Test_buildConfig(t *testing.T) { Servers: []dynamic.TCPServer{ {Address: "127.0.0.1:80"}, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, "Test-8769860286750522282": { @@ -2505,7 +2505,7 @@ func Test_buildConfig(t *testing.T) { Servers: []dynamic.TCPServer{ {Address: "127.0.0.2:80"}, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -2648,7 +2648,7 @@ func Test_buildConfig(t *testing.T) { URL: "http://127.0.0.1:9999", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -2786,5 +2786,4 @@ func extractNamespacesFromProvider(providers []*Provider) []string { return res } -func Int(v int) *int { return &v } -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } diff --git a/pkg/provider/rancher/config_test.go b/pkg/provider/rancher/config_test.go index 633e85415..80e9b2322 100644 --- a/pkg/provider/rancher/config_test.go +++ b/pkg/provider/rancher/config_test.go @@ -11,8 +11,7 @@ import ( "github.com/traefik/traefik/v2/pkg/types" ) -func Int(v int) *int { return &v } -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func Test_buildConfiguration(t *testing.T) { testCases := []struct { @@ -60,7 +59,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -123,7 +122,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -133,7 +132,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -199,7 +198,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, "Test2": { @@ -209,7 +208,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://128.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -262,7 +261,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -377,7 +376,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -466,7 +465,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -529,7 +528,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -580,7 +579,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -641,7 +640,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -685,7 +684,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -781,7 +780,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:80", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -833,7 +832,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -942,7 +941,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.2:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -971,7 +970,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1046,7 +1045,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.2:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, @@ -1083,7 +1082,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(100), + TerminationDelay: pointer(100), }, }, }, @@ -1175,7 +1174,7 @@ func Test_buildConfiguration(t *testing.T) { Address: "127.0.0.1:8080", }, }, - TerminationDelay: Int(200), + TerminationDelay: pointer(200), }, }, }, @@ -1238,7 +1237,7 @@ func Test_buildConfiguration(t *testing.T) { URL: "http://127.0.0.1:80", }, }, - PassHostHeader: Bool(true), + PassHostHeader: pointer(true), }, }, }, diff --git a/pkg/provider/traefik/internal.go b/pkg/provider/traefik/internal.go index da44f8ff2..de367bfae 100644 --- a/pkg/provider/traefik/internal.go +++ b/pkg/provider/traefik/internal.go @@ -31,7 +31,7 @@ func New(staticCfg static.Configuration) *Provider { } // ThrottleDuration returns the throttle duration. -func (i Provider) ThrottleDuration() time.Duration { +func (i *Provider) ThrottleDuration() time.Duration { return 0 } diff --git a/pkg/redactor/redactor_config_test.go b/pkg/redactor/redactor_config_test.go index 468db5d62..f96eb04fa 100644 --- a/pkg/redactor/redactor_config_test.go +++ b/pkg/redactor/redactor_config_test.go @@ -85,12 +85,12 @@ func init() { Interval: "foo", Timeout: "foo", Hostname: "foo", - FollowRedirects: boolPtr(true), + FollowRedirects: pointer(true), Headers: map[string]string{ "foo": "bar", }, }, - PassHostHeader: boolPtr(true), + PassHostHeader: pointer(true), ResponseForwarding: &dynamic.ResponseForwarding{ FlushInterval: "foo", }, @@ -107,7 +107,7 @@ func init() { Services: []dynamic.WRRService{ { Name: "foo", - Weight: intPtr(42), + Weight: pointer(42), }, }, Sticky: &dynamic.Sticky{ @@ -123,7 +123,7 @@ func init() { "baz": { Mirroring: &dynamic.Mirroring{ Service: "foo", - MaxBodySize: int64Ptr(42), + MaxBodySize: pointer[int64](42), Mirrors: []dynamic.MirrorService{ { Name: "foo", @@ -379,7 +379,7 @@ func init() { Services: map[string]*dynamic.TCPService{ "foo": { LoadBalancer: &dynamic.TCPServersLoadBalancer{ - TerminationDelay: intPtr(42), + TerminationDelay: pointer(42), ProxyProtocol: &dynamic.ProxyProtocol{ Version: 42, }, @@ -395,7 +395,7 @@ func init() { Services: []dynamic.TCPWRRService{ { Name: "foo", - Weight: intPtr(42), + Weight: pointer(42), }, }, }, @@ -424,7 +424,7 @@ func init() { Services: []dynamic.UDPWRRService{ { Name: "foo", - Weight: intPtr(42), + Weight: pointer(42), }, }, }, @@ -481,7 +481,7 @@ func TestAnonymize_dynamicConfiguration(t *testing.T) { } expected := strings.TrimSuffix(string(expectedConfiguration), "\n") - assert.Equal(t, expected, cleanJSON) + assert.JSONEq(t, expected, cleanJSON) } func TestSecure_dynamicConfiguration(t *testing.T) { @@ -498,7 +498,7 @@ func TestSecure_dynamicConfiguration(t *testing.T) { } expected := strings.TrimSuffix(string(expectedConfiguration), "\n") - assert.Equal(t, expected, cleanJSON) + assert.JSONEq(t, expected, cleanJSON) } func TestDo_staticConfiguration(t *testing.T) { @@ -990,17 +990,7 @@ func TestDo_staticConfiguration(t *testing.T) { } expected := strings.TrimSuffix(string(expectedConfiguration), "\n") - assert.Equal(t, expected, cleanJSON) + assert.JSONEq(t, expected, cleanJSON) } -func boolPtr(value bool) *bool { - return &value -} - -func intPtr(value int) *int { - return &value -} - -func int64Ptr(value int64) *int64 { - return &value -} +func pointer[T any](v T) *T { return &v } diff --git a/pkg/server/configurationwatcher_test.go b/pkg/server/configurationwatcher_test.go index f353c1f90..e7179734c 100644 --- a/pkg/server/configurationwatcher_test.go +++ b/pkg/server/configurationwatcher_test.go @@ -317,7 +317,7 @@ func TestListenProvidersThrottleProviderConfigReload(t *testing.T) { }) } - providerAggregator := aggregator.ProviderAggregator{} + providerAggregator := &aggregator.ProviderAggregator{} err := providerAggregator.AddProvider(pvd) assert.NoError(t, err) @@ -499,7 +499,7 @@ func TestListenProvidersIgnoreSameConfig(t *testing.T) { }, } - providerAggregator := aggregator.ProviderAggregator{} + providerAggregator := &aggregator.ProviderAggregator{} err := providerAggregator.AddProvider(pvd) assert.NoError(t, err) @@ -641,7 +641,7 @@ func TestListenProvidersIgnoreIntermediateConfigs(t *testing.T) { }, } - providerAggregator := aggregator.ProviderAggregator{} + providerAggregator := &aggregator.ProviderAggregator{} err := providerAggregator.AddProvider(pvd) assert.NoError(t, err) diff --git a/pkg/server/service/loadbalancer/wrr/wrr_test.go b/pkg/server/service/loadbalancer/wrr/wrr_test.go index 32068504e..8ef17faeb 100644 --- a/pkg/server/service/loadbalancer/wrr/wrr_test.go +++ b/pkg/server/service/loadbalancer/wrr/wrr_test.go @@ -10,7 +10,7 @@ import ( "github.com/traefik/traefik/v2/pkg/config/dynamic" ) -func Int(v int) *int { return &v } +func pointer[T any](v T) *T { return &v } type responseRecorder struct { *httptest.ResponseRecorder @@ -32,12 +32,12 @@ func TestBalancer(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "first") rw.WriteHeader(http.StatusOK) - }), Int(3)) + }), pointer(3)) balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "second") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) recorder := &responseRecorder{ResponseRecorder: httptest.NewRecorder(), save: map[string]int{}} for range 4 { @@ -63,9 +63,9 @@ func TestBalancerOneServerZeroWeight(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "first") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) - balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {}), Int(0)) + balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {}), pointer(0)) recorder := &responseRecorder{ResponseRecorder: httptest.NewRecorder(), save: map[string]int{}} for range 3 { @@ -84,11 +84,11 @@ func TestBalancerNoServiceUp(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.WriteHeader(http.StatusInternalServerError) - }), Int(1)) + }), pointer(1)) balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.WriteHeader(http.StatusInternalServerError) - }), Int(1)) + }), pointer(1)) balancer.SetStatus(context.WithValue(context.Background(), serviceName, "parent"), "first", false) balancer.SetStatus(context.WithValue(context.Background(), serviceName, "parent"), "second", false) @@ -105,11 +105,11 @@ func TestBalancerOneServerDown(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "first") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.WriteHeader(http.StatusInternalServerError) - }), Int(1)) + }), pointer(1)) balancer.SetStatus(context.WithValue(context.Background(), serviceName, "parent"), "second", false) recorder := &responseRecorder{ResponseRecorder: httptest.NewRecorder(), save: map[string]int{}} @@ -126,12 +126,12 @@ func TestBalancerDownThenUp(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "first") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "second") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer.SetStatus(context.WithValue(context.Background(), serviceName, "parent"), "second", false) recorder := &responseRecorder{ResponseRecorder: httptest.NewRecorder(), save: map[string]int{}} @@ -155,30 +155,30 @@ func TestBalancerPropagate(t *testing.T) { balancer1.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "first") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer1.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "second") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer2 := New(nil, &dynamic.HealthCheck{}) balancer2.AddService("third", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "third") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer2.AddService("fourth", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "fourth") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) topBalancer := New(nil, &dynamic.HealthCheck{}) - topBalancer.AddService("balancer1", balancer1, Int(1)) + topBalancer.AddService("balancer1", balancer1, pointer(1)) _ = balancer1.RegisterStatusUpdater(func(up bool) { topBalancer.SetStatus(context.WithValue(context.Background(), serviceName, "top"), "balancer1", up) // TODO(mpl): if test gets flaky, add channel or something here to signal that // propagation is done, and wait on it before sending request. }) - topBalancer.AddService("balancer2", balancer2, Int(1)) + topBalancer.AddService("balancer2", balancer2, pointer(1)) _ = balancer2.RegisterStatusUpdater(func(up bool) { topBalancer.SetStatus(context.WithValue(context.Background(), serviceName, "top"), "balancer2", up) }) @@ -225,8 +225,8 @@ func TestBalancerPropagate(t *testing.T) { func TestBalancerAllServersZeroWeight(t *testing.T) { balancer := New(nil, nil) - balancer.AddService("test", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {}), Int(0)) - balancer.AddService("test2", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {}), Int(0)) + balancer.AddService("test", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {}), pointer(0)) + balancer.AddService("test2", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {}), pointer(0)) recorder := httptest.NewRecorder() balancer.ServeHTTP(recorder, httptest.NewRequest(http.MethodGet, "/", nil)) @@ -242,12 +242,12 @@ func TestSticky(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "first") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "second") rw.WriteHeader(http.StatusOK) - }), Int(2)) + }), pointer(2)) recorder := &responseRecorder{ResponseRecorder: httptest.NewRecorder(), save: map[string]int{}} @@ -275,12 +275,12 @@ func TestSticky_FallBack(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "first") rw.WriteHeader(http.StatusOK) - }), Int(1)) + }), pointer(1)) balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "second") rw.WriteHeader(http.StatusOK) - }), Int(2)) + }), pointer(2)) recorder := &responseRecorder{ResponseRecorder: httptest.NewRecorder(), save: map[string]int{}} @@ -304,12 +304,12 @@ func TestBalancerBias(t *testing.T) { balancer.AddService("first", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "A") rw.WriteHeader(http.StatusOK) - }), Int(11)) + }), pointer(11)) balancer.AddService("second", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("server", "B") rw.WriteHeader(http.StatusOK) - }), Int(3)) + }), pointer(3)) recorder := &responseRecorder{ResponseRecorder: httptest.NewRecorder(), save: map[string]int{}} diff --git a/pkg/server/service/proxy_test.go b/pkg/server/service/proxy_test.go index 567ba6105..40ca69d67 100644 --- a/pkg/server/service/proxy_test.go +++ b/pkg/server/service/proxy_test.go @@ -28,7 +28,7 @@ func BenchmarkProxy(b *testing.B) { req := testhelpers.MustNewRequest(http.MethodGet, "http://foo.bar/", nil) pool := newBufferPool() - handler, _ := buildProxy(Bool(false), nil, &staticTransport{res}, pool) + handler, _ := buildProxy(pointer(false), nil, &staticTransport{res}, pool) b.ReportAllocs() for range b.N { diff --git a/pkg/server/service/proxy_websocket_test.go b/pkg/server/service/proxy_websocket_test.go index 108133c37..eb0210a6e 100644 --- a/pkg/server/service/proxy_websocket_test.go +++ b/pkg/server/service/proxy_websocket_test.go @@ -18,10 +18,10 @@ import ( "golang.org/x/net/websocket" ) -func Bool(v bool) *bool { return &v } +func pointer[T any](v T) *T { return &v } func TestWebSocketTCPClose(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) errChan := make(chan error, 1) @@ -61,7 +61,7 @@ func TestWebSocketTCPClose(t *testing.T) { } func TestWebSocketPingPong(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) @@ -127,7 +127,7 @@ func TestWebSocketPingPong(t *testing.T) { } func TestWebSocketEcho(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) mux := http.NewServeMux() @@ -193,7 +193,7 @@ func TestWebSocketPassHost(t *testing.T) { for _, test := range testCases { t.Run(test.desc, func(t *testing.T) { - f, err := buildProxy(Bool(test.passHost), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(test.passHost), nil, http.DefaultTransport, nil) require.NoError(t, err) @@ -252,7 +252,7 @@ func TestWebSocketPassHost(t *testing.T) { } func TestWebSocketServerWithoutCheckOrigin(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) upgrader := gorillawebsocket.Upgrader{CheckOrigin: func(r *http.Request) bool { @@ -293,7 +293,7 @@ func TestWebSocketServerWithoutCheckOrigin(t *testing.T) { } func TestWebSocketRequestWithOrigin(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) upgrader := gorillawebsocket.Upgrader{} @@ -339,7 +339,7 @@ func TestWebSocketRequestWithOrigin(t *testing.T) { } func TestWebSocketRequestWithQueryParams(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) upgrader := gorillawebsocket.Upgrader{} @@ -379,7 +379,7 @@ func TestWebSocketRequestWithQueryParams(t *testing.T) { } func TestWebSocketRequestWithHeadersInResponseWriter(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) mux := http.NewServeMux() @@ -411,7 +411,7 @@ func TestWebSocketRequestWithHeadersInResponseWriter(t *testing.T) { } func TestWebSocketRequestWithEncodedChar(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) upgrader := gorillawebsocket.Upgrader{} @@ -451,7 +451,7 @@ func TestWebSocketRequestWithEncodedChar(t *testing.T) { } func TestWebSocketUpgradeFailed(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) mux := http.NewServeMux() @@ -501,7 +501,7 @@ func TestWebSocketUpgradeFailed(t *testing.T) { } func TestForwardsWebsocketTraffic(t *testing.T) { - f, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + f, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) mux := http.NewServeMux() @@ -557,7 +557,7 @@ func TestWebSocketTransferTLSConfig(t *testing.T) { srv := createTLSWebsocketServer() defer srv.Close() - forwarderWithoutTLSConfig, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + forwarderWithoutTLSConfig, err := buildProxy(pointer(true), nil, http.DefaultTransport, nil) require.NoError(t, err) proxyWithoutTLSConfig := createProxyWithForwarder(t, forwarderWithoutTLSConfig, srv.URL) @@ -576,7 +576,7 @@ func TestWebSocketTransferTLSConfig(t *testing.T) { transport := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, } - forwarderWithTLSConfig, err := buildProxy(Bool(true), nil, transport, nil) + forwarderWithTLSConfig, err := buildProxy(pointer(true), nil, transport, nil) require.NoError(t, err) proxyWithTLSConfig := createProxyWithForwarder(t, forwarderWithTLSConfig, srv.URL) @@ -597,7 +597,7 @@ func TestWebSocketTransferTLSConfig(t *testing.T) { defaultTransport := http.DefaultTransport.(*http.Transport).Clone() defaultTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} - forwarderWithTLSConfigFromDefaultTransport, err := buildProxy(Bool(true), nil, defaultTransport, nil) + forwarderWithTLSConfigFromDefaultTransport, err := buildProxy(pointer(true), nil, defaultTransport, nil) require.NoError(t, err) proxyWithTLSConfigFromDefaultTransport := createProxyWithForwarder(t, forwarderWithTLSConfigFromDefaultTransport, srv.URL) diff --git a/pkg/server/service/roundtripper_test.go b/pkg/server/service/roundtripper_test.go index 8171de56b..2c5a2584e 100644 --- a/pkg/server/service/roundtripper_test.go +++ b/pkg/server/service/roundtripper_test.go @@ -16,10 +16,6 @@ import ( traefiktls "github.com/traefik/traefik/v2/pkg/tls" ) -func Int32(i int32) *int32 { - return &i -} - // LocalhostCert is a PEM-encoded TLS cert // for host example.com, www.example.com // expiring at Jan 29 16:00:00 2084 GMT. @@ -117,7 +113,7 @@ func TestKeepConnectionWhenSameConfiguration(t *testing.T) { rw.WriteHeader(http.StatusOK) })) - connCount := Int32(0) + connCount := pointer[int32](0) srv.Config.ConnState = func(conn net.Conn, state http.ConnState) { if state == http.StateNew { atomic.AddInt32(connCount, 1) diff --git a/pkg/server/service/service_test.go b/pkg/server/service/service_test.go index b761b410e..8b6b305a9 100644 --- a/pkg/server/service/service_test.go +++ b/pkg/server/service/service_test.go @@ -238,7 +238,7 @@ func TestGetLoadBalancerServiceHandler(t *testing.T) { serviceName: "test", service: &dynamic.ServersLoadBalancer{ Sticky: &dynamic.Sticky{Cookie: &dynamic.Cookie{}}, - PassHostHeader: func(v bool) *bool { return &v }(true), + PassHostHeader: pointer(true), Servers: []dynamic.Server{ { URL: serverPassHost.URL, @@ -256,7 +256,7 @@ func TestGetLoadBalancerServiceHandler(t *testing.T) { desc: "PassHost doesn't pass the host instead of the IP", serviceName: "test", service: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(false), + PassHostHeader: pointer(false), Sticky: &dynamic.Sticky{Cookie: &dynamic.Cookie{}}, Servers: []dynamic.Server{ { diff --git a/pkg/tcp/proxy.go b/pkg/tcp/proxy.go index 9f91c49b3..3b84c1d91 100644 --- a/pkg/tcp/proxy.go +++ b/pkg/tcp/proxy.go @@ -89,7 +89,7 @@ func (p *Proxy) ServeTCP(conn WriteCloser) { <-errChan } -func (p Proxy) dialBackend() (*net.TCPConn, error) { +func (p *Proxy) dialBackend() (*net.TCPConn, error) { // Dial using directly the TCPAddr for IP based addresses. if p.tcpAddr != nil { return net.DialTCP("tcp", nil, p.tcpAddr) @@ -106,7 +106,7 @@ func (p Proxy) dialBackend() (*net.TCPConn, error) { return conn.(*net.TCPConn), nil } -func (p Proxy) connCopy(dst, src WriteCloser, errCh chan error) { +func (p *Proxy) connCopy(dst, src WriteCloser, errCh chan error) { _, err := io.Copy(dst, src) errCh <- err diff --git a/pkg/tls/certificate.go b/pkg/tls/certificate.go index fca4a2586..02dd376a4 100644 --- a/pkg/tls/certificate.go +++ b/pkg/tls/certificate.go @@ -45,13 +45,6 @@ var ( } ) -// Certificate holds a SSL cert/key pair -// Certs and Key could be either a file path, or the file content itself. -type Certificate struct { - CertFile FileOrContent `json:"certFile,omitempty" toml:"certFile,omitempty" yaml:"certFile,omitempty"` - KeyFile FileOrContent `json:"keyFile,omitempty" toml:"keyFile,omitempty" yaml:"keyFile,omitempty" loggable:"false"` -} - // Certificates defines traefik certificates type // Certs and Keys could be either a file path, or the file content itself. type Certificates []Certificate @@ -73,31 +66,47 @@ func (c Certificates) GetCertificates() []tls.Certificate { return certs } -// FileOrContent hold a file path or content. -type FileOrContent string - -func (f FileOrContent) String() string { - return string(f) -} - -// IsPath returns true if the FileOrContent is a file path, otherwise returns false. -func (f FileOrContent) IsPath() bool { - _, err := os.Stat(f.String()) - return err == nil -} - -func (f FileOrContent) Read() ([]byte, error) { - var content []byte - if f.IsPath() { - var err error - content, err = os.ReadFile(f.String()) - if err != nil { - return nil, err - } - } else { - content = []byte(f) +// String is the method to format the flag's value, part of the flag.Value interface. +// The String method's output will be used in diagnostics. +func (c *Certificates) String() string { + if len(*c) == 0 { + return "" } - return content, nil + var result []string + for _, certificate := range *c { + result = append(result, certificate.CertFile.String()+","+certificate.KeyFile.String()) + } + return strings.Join(result, ";") +} + +// Set is the method to set the flag value, part of the flag.Value interface. +// Set's argument is a string to be parsed to set the flag. +// It's a comma-separated list, so we split it. +func (c *Certificates) Set(value string) error { + certificates := strings.Split(value, ";") + for _, certificate := range certificates { + files := strings.Split(certificate, ",") + if len(files) != 2 { + return fmt.Errorf("bad certificates format: %s", value) + } + *c = append(*c, Certificate{ + CertFile: FileOrContent(files[0]), + KeyFile: FileOrContent(files[1]), + }) + } + return nil +} + +// Type is type of the struct. +func (c *Certificates) Type() string { + return "certificates" +} + +// Certificate holds a SSL cert/key pair +// Certs and Key could be either a file path, or the file content itself. +type Certificate struct { + CertFile FileOrContent `json:"certFile,omitempty" toml:"certFile,omitempty" yaml:"certFile,omitempty"` + KeyFile FileOrContent `json:"keyFile,omitempty" toml:"keyFile,omitempty" yaml:"keyFile,omitempty" loggable:"false"` } // AppendCertificate appends a Certificate to a certificates map keyed by store name. @@ -194,40 +203,31 @@ func (c *Certificate) GetTruncatedCertificateName() string { return certName } -// String is the method to format the flag's value, part of the flag.Value interface. -// The String method's output will be used in diagnostics. -func (c *Certificates) String() string { - if len(*c) == 0 { - return "" - } - var result []string - for _, certificate := range *c { - result = append(result, certificate.CertFile.String()+","+certificate.KeyFile.String()) - } - return strings.Join(result, ";") +// FileOrContent hold a file path or content. +type FileOrContent string + +func (f FileOrContent) String() string { + return string(f) } -// Set is the method to set the flag value, part of the flag.Value interface. -// Set's argument is a string to be parsed to set the flag. -// It's a comma-separated list, so we split it. -func (c *Certificates) Set(value string) error { - certificates := strings.Split(value, ";") - for _, certificate := range certificates { - files := strings.Split(certificate, ",") - if len(files) != 2 { - return fmt.Errorf("bad certificates format: %s", value) +// IsPath returns true if the FileOrContent is a file path, otherwise returns false. +func (f FileOrContent) IsPath() bool { + _, err := os.Stat(f.String()) + return err == nil +} + +func (f FileOrContent) Read() ([]byte, error) { + var content []byte + if f.IsPath() { + var err error + content, err = os.ReadFile(f.String()) + if err != nil { + return nil, err } - *c = append(*c, Certificate{ - CertFile: FileOrContent(files[0]), - KeyFile: FileOrContent(files[1]), - }) + } else { + content = []byte(f) } - return nil -} - -// Type is type of the struct. -func (c *Certificates) Type() string { - return "certificates" + return content, nil } // VerifyPeerCertificate verifies the chain certificates and their URI. diff --git a/pkg/tls/certificate_store.go b/pkg/tls/certificate_store.go index 1a954a0e0..8a7d0e4ac 100644 --- a/pkg/tls/certificate_store.go +++ b/pkg/tls/certificate_store.go @@ -31,7 +31,7 @@ func NewCertificateStore() *CertificateStore { } } -func (c CertificateStore) getDefaultCertificateDomains() []string { +func (c *CertificateStore) getDefaultCertificateDomains() []string { var allCerts []string if c.DefaultCertificate == nil { @@ -58,7 +58,7 @@ func (c CertificateStore) getDefaultCertificateDomains() []string { } // GetAllDomains return a slice with all the certificate domain. -func (c CertificateStore) GetAllDomains() []string { +func (c *CertificateStore) GetAllDomains() []string { allDomains := c.getDefaultCertificateDomains() // Get dynamic certificates @@ -157,7 +157,7 @@ func (c *CertificateStore) GetCertificate(domains []string) *tls.Certificate { } // ResetCache clears the cache in the store. -func (c CertificateStore) ResetCache() { +func (c *CertificateStore) ResetCache() { if c.CertCache != nil { c.CertCache.Flush() } From e5c80637fc742377d4103bdbaaf1948766f9173c Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Tue, 12 Nov 2024 15:04:04 +0100 Subject: [PATCH 11/22] Add X-Forwarded-Prefix to the migration guide Co-authored-by: Romain --- docs/content/migration/v2.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/content/migration/v2.md b/docs/content/migration/v2.md index c0a58100b..0e1dd3e60 100644 --- a/docs/content/migration/v2.md +++ b/docs/content/migration/v2.md @@ -649,3 +649,10 @@ As a consequence, middlewares do not have access to those Connection headers, and a new option has been introduced to specify which ones could go through the middleware chain before being removed: `.forwardedHeaders.connection`. Please check out the [entrypoint forwarded headers connection option configuration](../routing/entrypoints.md#forwarded-headers) documentation. + +## v2.11.14 + +### X-Forwarded-Prefix + +In `v2.11.14`, the `X-Forwarded-Prefix` header is now handled like the other `X-Forwarded-*` headers: Traefik removes it when it's sent from an untrusted source. +Please refer to the Forwarded headers [documentation](https://doc.traefik.io/traefik/routing/entrypoints/#forwarded-headers) for more details. From 8c196523610a0b5a561bbfed03b25d109113c752 Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Tue, 12 Nov 2024 17:06:03 +0100 Subject: [PATCH 12/22] Fix absolute link in the migration guide --- docs/content/migration/v2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/migration/v2.md b/docs/content/migration/v2.md index 0e1dd3e60..3e8ac3584 100644 --- a/docs/content/migration/v2.md +++ b/docs/content/migration/v2.md @@ -655,4 +655,4 @@ Please check out the [entrypoint forwarded headers connection option configurati ### X-Forwarded-Prefix In `v2.11.14`, the `X-Forwarded-Prefix` header is now handled like the other `X-Forwarded-*` headers: Traefik removes it when it's sent from an untrusted source. -Please refer to the Forwarded headers [documentation](https://doc.traefik.io/traefik/routing/entrypoints/#forwarded-headers) for more details. +Please refer to the Forwarded headers [documentation](../routing/entrypoints.md#forwarded-headers) for more details. From fdce8c604a4cf26e25c3ff5da331002c1c6503b9 Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 12 Nov 2024 17:34:04 +0100 Subject: [PATCH 13/22] Change level of peeking first byte error log to DEBUG for Postgres --- pkg/server/router/tcp/postgres.go | 2 +- pkg/server/router/tcp/router.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/server/router/tcp/postgres.go b/pkg/server/router/tcp/postgres.go index 99a658c0e..5d773704f 100644 --- a/pkg/server/router/tcp/postgres.go +++ b/pkg/server/router/tcp/postgres.go @@ -29,7 +29,7 @@ func isPostgres(br *bufio.Reader) (bool, error) { if err != nil { var opErr *net.OpError if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || !opErr.Timeout()) { - log.Error().Err(err).Msg("Error while Peeking first byte") + log.Debug().Err(err).Msg("Error while peeking first bytes") } return false, err } diff --git a/pkg/server/router/tcp/router.go b/pkg/server/router/tcp/router.go index 9356e0d69..0f5c8f843 100644 --- a/pkg/server/router/tcp/router.go +++ b/pkg/server/router/tcp/router.go @@ -364,7 +364,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { if err != nil { var opErr *net.OpError if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || !opErr.Timeout()) { - log.Debug().Err(err).Msg("Error while Peeking first byte") + log.Debug().Err(err).Msg("Error while peeking first byte") } return nil, err } From ef5f1b1508a3a788806f61f99c3253ab86f2d93c Mon Sep 17 00:00:00 2001 From: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:14:04 +0100 Subject: [PATCH 14/22] Improve documentation on dashboard --- docs/content/operations/api.md | 2 +- docs/content/operations/dashboard.md | 55 +++++++++++++++------------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/docs/content/operations/api.md b/docs/content/operations/api.md index 7c8248c2e..2829f3ffe 100644 --- a/docs/content/operations/api.md +++ b/docs/content/operations/api.md @@ -70,7 +70,7 @@ And then define a routing configuration on Traefik itself with the ### `insecure` -Enable the API in `insecure` mode, which means that the API will be available directly on the entryPoint named `traefik`. +Enable the API in `insecure` mode, which means that the API will be available directly on the entryPoint named `traefik`, on path `/api`. !!! info If the entryPoint named `traefik` is not configured, it will be automatically created on port 8080. diff --git a/docs/content/operations/dashboard.md b/docs/content/operations/dashboard.md index 8c3902cc8..353470cdf 100644 --- a/docs/content/operations/dashboard.md +++ b/docs/content/operations/dashboard.md @@ -37,32 +37,15 @@ Start by enabling the dashboard by using the following option from [Traefik's AP on the [static configuration](../getting-started/configuration-overview.md#the-static-configuration): ```yaml tab="File (YAML)" -api: - # Dashboard - # - # Optional - # Default: true - # - dashboard: true +api: {} ``` ```toml tab="File (TOML)" [api] - # Dashboard - # - # Optional - # Default: true - # - dashboard = true ``` ```bash tab="CLI" -# Dashboard -# -# Optional -# Default: true -# ---api.dashboard=true +--api=true ``` Then define a routing configuration on Traefik itself, @@ -106,27 +89,47 @@ rule = "Host(`traefik.example.com`) && PathPrefix(`/api`, `/dashboard`)" ## Insecure Mode -This mode is not recommended because it does not allow the use of security features. +When _insecure_ mode is enabled, one can access the dashboard on the `traefik` port (default: `8080`) of the Traefik instance, +at the following URL: `http://:8080/dashboard/` (trailing slash is mandatory). -To enable the "insecure mode", use the following options from [Traefik's API](./api.md#insecure): +This mode is **not** recommended because it does not allow security features. +For example, it is not possible to add an authentication middleware with this mode. + +It should be used for testing purpose **only**. + +To enable the _insecure_ mode, use the following options from [Traefik's API](./api.md#insecure): ```yaml tab="File (YAML)" api: - dashboard: true insecure: true ``` ```toml tab="File (TOML)" [api] - dashboard = true insecure = true ``` ```bash tab="CLI" ---api.dashboard=true --api.insecure=true +--api.insecure=true ``` -You can now access the dashboard on the port `8080` of the Traefik instance, -at the following URL: `http://:8080/dashboard/` (trailing slash is mandatory). +## Disable The Dashboard + +By default, the dashboard is enabled when the API is enabled. +If necessary, the dashboard can be disabled by using the following option. + +```yaml tab="File (YAML)" +api: + dashboard: false +``` + +```toml tab="File (TOML)" +[api] + dashboard = false +``` + +```bash tab="CLI" +--api.dashboard=false +``` {!traefik-for-business-applications.md!} From 1c80f12bc289a99d0f4118103f0cabbd946baa00 Mon Sep 17 00:00:00 2001 From: davefu113 <142489013+davefu113@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:56:04 +0800 Subject: [PATCH 15/22] Apply keepalive config to h2c entrypoints --- pkg/server/server_entrypoint_tcp.go | 10 ++--- pkg/server/server_entrypoint_tcp_test.go | 52 ++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/pkg/server/server_entrypoint_tcp.go b/pkg/server/server_entrypoint_tcp.go index 5cd6cbb49..5d170685f 100644 --- a/pkg/server/server_entrypoint_tcp.go +++ b/pkg/server/server_entrypoint_tcp.go @@ -578,17 +578,17 @@ func createHTTPServer(ctx context.Context, ln net.Listener, configuration *stati handler = http.AllowQuerySemicolons(handler) } + debugConnection := os.Getenv(debugConnectionEnv) != "" + if debugConnection || (configuration.Transport != nil && (configuration.Transport.KeepAliveMaxTime > 0 || configuration.Transport.KeepAliveMaxRequests > 0)) { + handler = newKeepAliveMiddleware(handler, configuration.Transport.KeepAliveMaxRequests, configuration.Transport.KeepAliveMaxTime) + } + if withH2c { handler = h2c.NewHandler(handler, &http2.Server{ MaxConcurrentStreams: uint32(configuration.HTTP2.MaxConcurrentStreams), }) } - debugConnection := os.Getenv(debugConnectionEnv) != "" - if debugConnection || (configuration.Transport != nil && (configuration.Transport.KeepAliveMaxTime > 0 || configuration.Transport.KeepAliveMaxRequests > 0)) { - handler = newKeepAliveMiddleware(handler, configuration.Transport.KeepAliveMaxRequests, configuration.Transport.KeepAliveMaxTime) - } - serverHTTP := &http.Server{ Handler: handler, ErrorLog: httpServerLogger, diff --git a/pkg/server/server_entrypoint_tcp_test.go b/pkg/server/server_entrypoint_tcp_test.go index 4dc9ee428..f3b8865c9 100644 --- a/pkg/server/server_entrypoint_tcp_test.go +++ b/pkg/server/server_entrypoint_tcp_test.go @@ -3,6 +3,7 @@ package server import ( "bufio" "context" + "crypto/tls" "errors" "io" "net" @@ -17,6 +18,7 @@ import ( "github.com/traefik/traefik/v2/pkg/config/static" tcprouter "github.com/traefik/traefik/v2/pkg/server/router/tcp" "github.com/traefik/traefik/v2/pkg/tcp" + "golang.org/x/net/http2" ) func TestShutdownHijacked(t *testing.T) { @@ -330,3 +332,53 @@ func TestKeepAliveMaxTime(t *testing.T) { err = resp.Body.Close() require.NoError(t, err) } + +func TestKeepAliveH2c(t *testing.T) { + epConfig := &static.EntryPointsTransport{} + epConfig.SetDefaults() + epConfig.KeepAliveMaxRequests = 1 + + entryPoint, err := NewTCPEntryPoint(context.Background(), &static.EntryPoint{ + Address: ":0", + Transport: epConfig, + ForwardedHeaders: &static.ForwardedHeaders{}, + HTTP2: &static.HTTP2Config{}, + }, nil) + require.NoError(t, err) + + router, err := tcprouter.NewRouter() + require.NoError(t, err) + + router.SetHTTPHandler(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + rw.WriteHeader(http.StatusOK) + })) + + conn, err := startEntrypoint(entryPoint, router) + require.NoError(t, err) + + http2Transport := &http2.Transport{ + AllowHTTP: true, + DialTLSContext: func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) { + return conn, nil + }, + } + + client := &http.Client{Transport: http2Transport} + + resp, err := client.Get("http://" + entryPoint.listener.Addr().String()) + require.NoError(t, err) + require.False(t, resp.Close) + err = resp.Body.Close() + require.NoError(t, err) + + _, err = client.Get("http://" + entryPoint.listener.Addr().String()) + require.Error(t, err) + // Unlike HTTP/1, where we can directly check `resp.Close`, HTTP/2 uses a different + // mechanism: it sends a GOAWAY frame when the connection is closing. + // We can only check the error type. The error received should be poll.ErrClosed from + // the `internal/poll` package, but we cannot directly reference the error type due to + // package restrictions. Since this error message ("use of closed network connection") + // is distinct and specific, we rely on its consistency, assuming it is stable and unlikely + // to change. + require.Contains(t, err.Error(), "use of closed network connection") +} From 5658c8ac06c8cb6a84c0ccb1a897a215b462b07b Mon Sep 17 00:00:00 2001 From: Antoine <74150795+AntoineDeveloper@users.noreply.github.com> Date: Mon, 18 Nov 2024 05:42:04 -0500 Subject: [PATCH 16/22] Fix spelling, grammar, and rephrase sections for clarity in some documentation pages --- README.md | 2 +- SECURITY.md | 2 +- docs/content/contributing/building-testing.md | 2 +- docs/content/contributing/documentation.md | 6 +++--- docs/content/contributing/maintainers-guidelines.md | 2 +- docs/content/contributing/submitting-pull-requests.md | 4 ++-- docs/content/contributing/submitting-security-issues.md | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 245baf434..a82256542 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ _(But if you'd rather configure some of your routes manually, Traefik supports t - Provides HTTPS to your microservices by leveraging [Let's Encrypt](https://letsencrypt.org) (wildcard certificates support) - Circuit breakers, retry - See the magic through its clean web UI -- Websocket, HTTP/2, GRPC ready +- WebSocket, HTTP/2, GRPC ready - Provides metrics (Rest, Prometheus, Datadog, Statsd, InfluxDB) - Keeps access logs (JSON, CLF) - Fast diff --git a/SECURITY.md b/SECURITY.md index 7b5c4b953..c9a2670f6 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,7 +1,7 @@ # Security Policy You can join our security mailing list to be aware of the latest announcements from our security team. -You can subscribe sending a mail to security+subscribe@traefik.io or on [the online viewer](https://groups.google.com/a/traefik.io/forum/#!forum/security). +You can subscribe by sending an email to security+subscribe@traefik.io or on [the online viewer](https://groups.google.com/a/traefik.io/forum/#!forum/security). Reported vulnerabilities can be found on [cve.mitre.org](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=traefik). diff --git a/docs/content/contributing/building-testing.md b/docs/content/contributing/building-testing.md index 20d05740a..cd71b9482 100644 --- a/docs/content/contributing/building-testing.md +++ b/docs/content/contributing/building-testing.md @@ -92,7 +92,7 @@ For development purposes, you can specify which tests to run by using (only work Create `tailscale.secret` file in `integration` directory. - This file need to contains a [Tailscale auth key](https://tailscale.com/kb/1085/auth-keys) + This file needs to contain a [Tailscale auth key](https://tailscale.com/kb/1085/auth-keys) (an ephemeral, but reusable, one is recommended). Add this section to your tailscale ACLs to auto-approve the routes for the diff --git a/docs/content/contributing/documentation.md b/docs/content/contributing/documentation.md index 3911abe4a..5c61504a0 100644 --- a/docs/content/contributing/documentation.md +++ b/docs/content/contributing/documentation.md @@ -15,13 +15,13 @@ Let's see how. ### General -This [documentation](https://doc.traefik.io/traefik/ "Link to the official Traefik documentation") is built with [MkDocs](https://mkdocs.org/ "Link to website of MkDocs"). +This [documentation](https://doc.traefik.io/traefik/ "Link to the official Traefik documentation") is built with [MkDocs](https://mkdocs.org/ "Link to the website of MkDocs"). ### Method 1: `Docker` and `make` Please make sure you have the following requirements installed: -- [Docker](https://www.docker.com/ "Link to website of Docker") +- [Docker](https://www.docker.com/ "Link to the website of Docker") You can build the documentation and test it locally (with live reloading), using the `docs-serve` target: @@ -51,7 +51,7 @@ $ make docs-build Please make sure you have the following requirements installed: -- [Python](https://www.python.org/ "Link to website of Python") +- [Python](https://www.python.org/ "Link to the website of Python") - [pip](https://pypi.org/project/pip/ "Link to the website of pip on PyPI") ```bash diff --git a/docs/content/contributing/maintainers-guidelines.md b/docs/content/contributing/maintainers-guidelines.md index 7c229917e..4fa13a0f1 100644 --- a/docs/content/contributing/maintainers-guidelines.md +++ b/docs/content/contributing/maintainers-guidelines.md @@ -32,7 +32,7 @@ The contributor should also meet one or several of the following requirements: including those of other maintainers and contributors. - The contributor is active on Traefik Community forums - or other technical forums/boards such as K8S slack, Reddit, StackOverflow, hacker news. + or other technical forums/boards, such as K8S Slack, Reddit, StackOverflow, and Hacker News. Any existing active maintainer can create an issue to discuss promoting a contributor to maintainer. Other maintainers can vote on the issue, and if the quorum is reached, the contributor is promoted to maintainer. diff --git a/docs/content/contributing/submitting-pull-requests.md b/docs/content/contributing/submitting-pull-requests.md index 7488378ed..22508becc 100644 --- a/docs/content/contributing/submitting-pull-requests.md +++ b/docs/content/contributing/submitting-pull-requests.md @@ -17,7 +17,7 @@ or the list of [confirmed bugs](https://github.com/traefik/traefik/labels/kind%2 ## How We Prioritize -We wish we could review every pull request right away, but because it's a time consuming operation, it's not always possible. +We wish we could review every pull request right away, but because it's a time-consuming operation, it's not always possible. The PRs we are able to handle the fastest are: @@ -128,7 +128,7 @@ This label can be used when: Traefik Proxy is made by the community for the community, as such the goal is to engage the community to make Traefik the best reverse proxy available. Part of this goal is maintaining a lean codebase and ensuring code velocity. -unfortunately, this means that sometimes we will not be able to merge a pull request. +Unfortunately, this means that sometimes we will not be able to merge a pull request. Because we respect the work you did, you will always be told why we are closing your pull request. If you do not agree with our decision, do not worry; closed pull requests are effortless to recreate, diff --git a/docs/content/contributing/submitting-security-issues.md b/docs/content/contributing/submitting-security-issues.md index 08fbb79a2..981c7fe4c 100644 --- a/docs/content/contributing/submitting-security-issues.md +++ b/docs/content/contributing/submitting-security-issues.md @@ -8,7 +8,7 @@ description: "Security is a key part of Traefik Proxy. Read the technical docume ## Security Advisories We strongly advise you to join our mailing list to be aware of the latest announcements from our security team. -You can subscribe sending a mail to security+subscribe@traefik.io or on [the online viewer](https://groups.google.com/a/traefik.io/forum/#!forum/security). +You can subscribe by sending an email to security+subscribe@traefik.io or on [the online viewer](https://groups.google.com/a/traefik.io/forum/#!forum/security). ## CVE From 6baa110adbf4150e60809e64f43d9a2006f5379a Mon Sep 17 00:00:00 2001 From: bluepuma77 Date: Mon, 18 Nov 2024 11:58:04 +0100 Subject: [PATCH 17/22] Update access-logs.md, add examples for accesslog.format --- docs/content/observability/access-logs.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/content/observability/access-logs.md b/docs/content/observability/access-logs.md index 2a0c83398..52e781319 100644 --- a/docs/content/observability/access-logs.md +++ b/docs/content/observability/access-logs.md @@ -59,6 +59,20 @@ If the given format is unsupported, the default (CLF) is used instead. - [] " " "" "" "" "" ms ``` +```yaml tab="File (YAML)" +accessLog: + format: "json" +``` + +```toml tab="File (TOML)" +[accessLog] + format = "json" +``` + +```bash tab="CLI" +--accesslog.format=json +``` + ### `bufferingSize` To write the logs in an asynchronous fashion, specify a `bufferingSize` option. From 8ffd1854db4631db9d8e26b49e1a534ddd912fe3 Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Mon, 18 Nov 2024 14:40:05 +0100 Subject: [PATCH 18/22] Fix the defaultRule CLI examples --- docs/content/providers/consul-catalog.md | 2 +- docs/content/providers/docker.md | 2 +- docs/content/providers/ecs.md | 2 +- docs/content/providers/marathon.md | 2 +- docs/content/providers/nomad.md | 2 +- docs/content/providers/rancher.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content/providers/consul-catalog.md b/docs/content/providers/consul-catalog.md index 9ea44de94..b27b6cb2a 100644 --- a/docs/content/providers/consul-catalog.md +++ b/docs/content/providers/consul-catalog.md @@ -525,7 +525,7 @@ providers: ``` ```bash tab="CLI" ---providers.consulcatalog.defaultRule=Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`) +--providers.consulcatalog.defaultRule='Host(`{{ .Name }}.{{ index .Labels "customLabel"}}`)' # ... ``` diff --git a/docs/content/providers/docker.md b/docs/content/providers/docker.md index 2a11a2e7c..c1cadd86b 100644 --- a/docs/content/providers/docker.md +++ b/docs/content/providers/docker.md @@ -466,7 +466,7 @@ providers: ``` ```bash tab="CLI" ---providers.docker.defaultRule=Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`) +--providers.docker.defaultRule='Host(`{{ .Name }}.{{ index .Labels "customLabel"}}`)' # ... ``` diff --git a/docs/content/providers/ecs.md b/docs/content/providers/ecs.md index 80a11a35e..ba5e41088 100644 --- a/docs/content/providers/ecs.md +++ b/docs/content/providers/ecs.md @@ -259,7 +259,7 @@ providers: ``` ```bash tab="CLI" ---providers.ecs.defaultRule=Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`) +--providers.ecs.defaultRule='Host(`{{ .Name }}.{{ index .Labels "customLabel"}}`)' # ... ``` diff --git a/docs/content/providers/marathon.md b/docs/content/providers/marathon.md index 0b5c2794b..d8ca6aa21 100644 --- a/docs/content/providers/marathon.md +++ b/docs/content/providers/marathon.md @@ -138,7 +138,7 @@ providers: ``` ```bash tab="CLI" ---providers.marathon.defaultRule=Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`) +--providers.marathon.defaultRule='Host(`{{ .Name }}.{{ index .Labels "customLabel"}}`)' # ... ``` diff --git a/docs/content/providers/nomad.md b/docs/content/providers/nomad.md index 5c565b055..b9c01526c 100644 --- a/docs/content/providers/nomad.md +++ b/docs/content/providers/nomad.md @@ -374,7 +374,7 @@ providers: ``` ```bash tab="CLI" ---providers.nomad.defaultRule="Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)" +--providers.nomad.defaultRule='Host(`{{ .Name }}.{{ index .Labels "customLabel"}}`)' # ... ``` diff --git a/docs/content/providers/rancher.md b/docs/content/providers/rancher.md index f43b70b1f..f58c508fd 100644 --- a/docs/content/providers/rancher.md +++ b/docs/content/providers/rancher.md @@ -121,7 +121,7 @@ providers: ``` ```bash tab="CLI" ---providers.rancher.defaultRule=Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`) +--providers.rancher.defaultRule='Host(`{{ .Name }}.{{ index .Labels "customLabel"}}`)' # ... ``` From cc80568d9e60d04b97318c9b36e909d6355dc11d Mon Sep 17 00:00:00 2001 From: Julien Salleyron Date: Tue, 19 Nov 2024 14:52:04 +0100 Subject: [PATCH 19/22] Fix internal handlers ServiceBuilder composition --- pkg/server/service/internalhandler.go | 23 +++++------- pkg/server/service/managerfactory.go | 7 ++-- pkg/server/service/service.go | 25 +++++++++++-- pkg/server/service/service_test.go | 52 ++++++++++++++++++++++++--- 4 files changed, 80 insertions(+), 27 deletions(-) diff --git a/pkg/server/service/internalhandler.go b/pkg/server/service/internalhandler.go index 4bd6fd258..4ec26c930 100644 --- a/pkg/server/service/internalhandler.go +++ b/pkg/server/service/internalhandler.go @@ -8,11 +8,6 @@ import ( "strings" ) -type serviceManager interface { - BuildHTTP(rootCtx context.Context, serviceName string) (http.Handler, error) - LaunchHealthCheck() -} - // InternalHandlers is the internal HTTP handlers builder. type InternalHandlers struct { api http.Handler @@ -21,26 +16,24 @@ type InternalHandlers struct { prometheus http.Handler ping http.Handler acmeHTTP http.Handler - serviceManager } // NewInternalHandlers creates a new InternalHandlers. -func NewInternalHandlers(next serviceManager, apiHandler, rest, metricsHandler, pingHandler, dashboard, acmeHTTP http.Handler) *InternalHandlers { +func NewInternalHandlers(apiHandler, rest, metricsHandler, pingHandler, dashboard, acmeHTTP http.Handler) *InternalHandlers { return &InternalHandlers{ - api: apiHandler, - dashboard: dashboard, - rest: rest, - prometheus: metricsHandler, - ping: pingHandler, - acmeHTTP: acmeHTTP, - serviceManager: next, + api: apiHandler, + dashboard: dashboard, + rest: rest, + prometheus: metricsHandler, + ping: pingHandler, + acmeHTTP: acmeHTTP, } } // BuildHTTP builds an HTTP handler. func (m *InternalHandlers) BuildHTTP(rootCtx context.Context, serviceName string) (http.Handler, error) { if !strings.HasSuffix(serviceName, "@internal") { - return m.serviceManager.BuildHTTP(rootCtx, serviceName) + return nil, nil } internalHandler, err := m.get(serviceName) diff --git a/pkg/server/service/managerfactory.go b/pkg/server/service/managerfactory.go index 5db06ef40..07ba4e25d 100644 --- a/pkg/server/service/managerfactory.go +++ b/pkg/server/service/managerfactory.go @@ -71,13 +71,12 @@ func NewManagerFactory(staticConfiguration static.Configuration, routinesPool *s } // Build creates a service manager. -func (f *ManagerFactory) Build(configuration *runtime.Configuration) *InternalHandlers { - svcManager := NewManager(configuration.Services, f.metricsRegistry, f.routinesPool, f.roundTripperManager) - +func (f *ManagerFactory) Build(configuration *runtime.Configuration) *Manager { var apiHandler http.Handler if f.api != nil { apiHandler = f.api(configuration) } - return NewInternalHandlers(svcManager, apiHandler, f.restHandler, f.metricsHandler, f.pingHandler, f.dashboardHandler, f.acmeHTTPHandler) + internalHandlers := NewInternalHandlers(apiHandler, f.restHandler, f.metricsHandler, f.pingHandler, f.dashboardHandler, f.acmeHTTPHandler) + return NewManager(configuration.Services, f.metricsRegistry, f.routinesPool, f.roundTripperManager, internalHandlers) } diff --git a/pkg/server/service/service.go b/pkg/server/service/service.go index cc43e76a2..f30770b62 100644 --- a/pkg/server/service/service.go +++ b/pkg/server/service/service.go @@ -34,22 +34,28 @@ import ( const ( defaultHealthCheckInterval = 30 * time.Second defaultHealthCheckTimeout = 5 * time.Second -) -const defaultMaxBodySize int64 = -1 + defaultMaxBodySize int64 = -1 +) // RoundTripperGetter is a roundtripper getter interface. type RoundTripperGetter interface { Get(name string) (http.RoundTripper, error) } +// ServiceBuilder is a Service builder. +type ServiceBuilder interface { + BuildHTTP(rootCtx context.Context, serviceName string) (http.Handler, error) +} + // NewManager creates a new Manager. -func NewManager(configs map[string]*runtime.ServiceInfo, metricsRegistry metrics.Registry, routinePool *safe.Pool, roundTripperManager RoundTripperGetter) *Manager { +func NewManager(configs map[string]*runtime.ServiceInfo, metricsRegistry metrics.Registry, routinePool *safe.Pool, roundTripperManager RoundTripperGetter, serviceBuilders ...ServiceBuilder) *Manager { return &Manager{ routinePool: routinePool, metricsRegistry: metricsRegistry, bufferPool: newBufferPool(), roundTripperManager: roundTripperManager, + serviceBuilders: serviceBuilders, balancers: make(map[string]healthcheck.Balancers), configs: configs, rand: rand.New(rand.NewSource(time.Now().UnixNano())), @@ -62,6 +68,8 @@ type Manager struct { metricsRegistry metrics.Registry bufferPool httputil.BufferPool roundTripperManager RoundTripperGetter + serviceBuilders []ServiceBuilder + // balancers is the map of all Balancers, keyed by service name. // There is one Balancer per service handler, and there is one service handler per reference to a service // (e.g. if 2 routers refer to the same service name, 2 service handlers are created), @@ -78,6 +86,17 @@ func (m *Manager) BuildHTTP(rootCtx context.Context, serviceName string) (http.H serviceName = provider.GetQualifiedName(ctx, serviceName) ctx = provider.AddInContext(ctx, serviceName) + // Must be before we get configs to handle services without config. + for _, builder := range m.serviceBuilders { + handler, err := builder.BuildHTTP(rootCtx, serviceName) + if err != nil { + return nil, err + } + if handler != nil { + return handler, nil + } + } + conf, ok := m.configs[serviceName] if !ok { return nil, fmt.Errorf("the service %q does not exist", serviceName) diff --git a/pkg/server/service/service_test.go b/pkg/server/service/service_test.go index 8b6b305a9..7e73de2d2 100644 --- a/pkg/server/service/service_test.go +++ b/pkg/server/service/service_test.go @@ -18,9 +18,9 @@ import ( "github.com/traefik/traefik/v2/pkg/testhelpers" ) -type MockForwarder struct{} +type mockForwarder struct{} -func (MockForwarder) ServeHTTP(http.ResponseWriter, *http.Request) { +func (mockForwarder) ServeHTTP(http.ResponseWriter, *http.Request) { panic("implement me") } @@ -44,14 +44,14 @@ func TestGetLoadBalancer(t *testing.T) { }, }, }, - fwd: &MockForwarder{}, + fwd: &mockForwarder{}, expectError: true, }, { desc: "Succeeds when there are no servers", serviceName: "test", service: &dynamic.ServersLoadBalancer{}, - fwd: &MockForwarder{}, + fwd: &mockForwarder{}, expectError: false, }, { @@ -60,7 +60,7 @@ func TestGetLoadBalancer(t *testing.T) { service: &dynamic.ServersLoadBalancer{ Sticky: &dynamic.Sticky{Cookie: &dynamic.Cookie{}}, }, - fwd: &MockForwarder{}, + fwd: &mockForwarder{}, expectError: false, }, } @@ -476,6 +476,48 @@ func Test1xxResponses(t *testing.T) { } } +type serviceBuilderFunc func(ctx context.Context, serviceName string) (http.Handler, error) + +func (s serviceBuilderFunc) BuildHTTP(ctx context.Context, serviceName string) (http.Handler, error) { + return s(ctx, serviceName) +} + +type internalHandler struct{} + +func (internalHandler) ServeHTTP(_ http.ResponseWriter, _ *http.Request) {} + +func TestManager_ServiceBuilders(t *testing.T) { + var internalHandler internalHandler + + manager := NewManager(map[string]*runtime.ServiceInfo{ + "test@test": { + Service: &dynamic.Service{ + LoadBalancer: &dynamic.ServersLoadBalancer{}, + }, + }, + }, nil, nil, &RoundTripperManager{ + roundTrippers: map[string]http.RoundTripper{ + "default@internal": http.DefaultTransport, + }, + }, serviceBuilderFunc(func(rootCtx context.Context, serviceName string) (http.Handler, error) { + if strings.HasSuffix(serviceName, "@internal") { + return internalHandler, nil + } + return nil, nil + })) + + h, err := manager.BuildHTTP(context.Background(), "test@internal") + require.NoError(t, err) + assert.Equal(t, internalHandler, h) + + h, err = manager.BuildHTTP(context.Background(), "test@test") + require.NoError(t, err) + assert.NotNil(t, h) + + _, err = manager.BuildHTTP(context.Background(), "wrong@test") + assert.Error(t, err) +} + func TestManager_Build(t *testing.T) { testCases := []struct { desc string From 8eadfbb9906ddf06d150f1d2f77f278514ed8fff Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Wed, 20 Nov 2024 15:26:04 +0100 Subject: [PATCH 20/22] Prepare release v2.11.14 --- CHANGELOG.md | 20 ++++++++++++++++++++ script/gcg/traefik-bugfix.toml | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a010870a..d5d993033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## [v2.11.14](https://github.com/traefik/traefik/tree/v2.11.14) (2024-11-20) +[All Commits](https://github.com/traefik/traefik/compare/v2.11.13...v2.11.14) + +**Bug fixes:** +- **[acme]** Update go-acme/lego to v4.20.2 ([#11263](https://github.com/traefik/traefik/pull/11263) by [ldez](https://github.com/ldez)) +- **[logs,server]** Change level of peeking first byte error log to DEBUG ([#11254](https://github.com/traefik/traefik/pull/11254) by [rtribotte](https://github.com/rtribotte)) +- **[middleware,server]** Drop untrusted X-Forwarded-Prefix header ([#11253](https://github.com/traefik/traefik/pull/11253) by [rtribotte](https://github.com/rtribotte)) +- **[server]** Apply keepalive config to h2c entrypoints ([#11276](https://github.com/traefik/traefik/pull/11276) by [davefu113](https://github.com/davefu113)) +- **[service]** Fix internal handlers ServiceBuilder composition ([#11281](https://github.com/traefik/traefik/pull/11281) by [juliens](https://github.com/juliens)) + +**Documentation:** +- **[accesslogs]** Update access-logs.md, add examples for accesslog.format ([#11275](https://github.com/traefik/traefik/pull/11275) by [bluepuma77](https://github.com/bluepuma77)) +- Fix the defaultRule CLI examples ([#11282](https://github.com/traefik/traefik/pull/11282) by [kevinpollet](https://github.com/kevinpollet)) +- Fix spelling, grammar, and rephrase sections for clarity in some documentation pages ([#11280](https://github.com/traefik/traefik/pull/11280) by [AntoineDeveloper](https://github.com/AntoineDeveloper)) +- Fix absolute link in the migration guide ([#11269](https://github.com/traefik/traefik/pull/11269) by [kevinpollet](https://github.com/kevinpollet)) +- Add X-Forwarded-Prefix to the migration guide ([#11267](https://github.com/traefik/traefik/pull/11267) by [kevinpollet](https://github.com/kevinpollet)) +- Fix a small typo in entrypoints documentation ([#11261](https://github.com/traefik/traefik/pull/11261) by [quiode](https://github.com/quiode)) +- Add a warning about environment variables casing for static configuration ([#11226](https://github.com/traefik/traefik/pull/11226) by [anchal00](https://github.com/anchal00)) +- Improve documentation on dashboard ([#11220](https://github.com/traefik/traefik/pull/11220) by [mloiseleur](https://github.com/mloiseleur)) + ## [v2.11.13](https://github.com/traefik/traefik/tree/v2.11.13) (2024-10-28) [All Commits](https://github.com/traefik/traefik/compare/v2.11.12...v2.11.13) diff --git a/script/gcg/traefik-bugfix.toml b/script/gcg/traefik-bugfix.toml index c7581b405..c118c2a48 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.11.13 +# example new bugfix v2.11.14 CurrentRef = "v2.11" -PreviousRef = "v2.11.12" +PreviousRef = "v2.11.13" BaseBranch = "v2.11" -FutureCurrentRefName = "v2.11.13" +FutureCurrentRefName = "v2.11.14" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10 From 8a0c1e614fad3b9735814002f26fcb04c2314a06 Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Wed, 20 Nov 2024 17:04:04 +0100 Subject: [PATCH 21/22] Fix HostRegexp config for rule syntax v2 Co-authored-by: Romain --- pkg/config/static/static_config.go | 6 + .../Ingress-with-wildcard-host-syntax-v2.yml | 49 +++ pkg/provider/kubernetes/ingress/kubernetes.go | 284 +++++++++--------- .../kubernetes/ingress/kubernetes_test.go | 34 +++ 4 files changed, 239 insertions(+), 134 deletions(-) create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host-syntax-v2.yml diff --git a/pkg/config/static/static_config.go b/pkg/config/static/static_config.go index 36a47f4dd..7f26e053a 100644 --- a/pkg/config/static/static_config.go +++ b/pkg/config/static/static_config.go @@ -297,6 +297,12 @@ func (c *Configuration) SetEffectiveConfiguration() { c.Providers.KubernetesGateway.EntryPoints = entryPoints } + // Defines the default rule syntax for the Kubernetes Ingress Provider. + // This allows the provider to adapt the matcher syntax to the desired rule syntax version. + if c.Core != nil && c.Providers.KubernetesIngress != nil { + c.Providers.KubernetesIngress.DefaultRuleSyntax = c.Core.DefaultRuleSyntax + } + c.initACMEProvider() } diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host-syntax-v2.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host-syntax-v2.yml new file mode 100644 index 000000000..e0df96260 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host-syntax-v2.yml @@ -0,0 +1,49 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: "*.foobar.com" + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: EndpointSlice +apiVersion: discovery.k8s.io/v1 +metadata: + name: service1-abc + namespace: testing + labels: + kubernetes.io/service-name: service1 + +addressType: IPv4 +ports: + - port: 8080 + name: "" +endpoints: + - addresses: + - 10.10.0.1 + conditions: + ready: true diff --git a/pkg/provider/kubernetes/ingress/kubernetes.go b/pkg/provider/kubernetes/ingress/kubernetes.go index c6b38e5ea..08f945511 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes.go +++ b/pkg/provider/kubernetes/ingress/kubernetes.go @@ -56,6 +56,9 @@ type Provider struct { DisableClusterScopeResources bool `description:"Disables the lookup of cluster scope resources (incompatible with IngressClasses and NodePortLB enabled services)." json:"disableClusterScopeResources,omitempty" toml:"disableClusterScopeResources,omitempty" yaml:"disableClusterScopeResources,omitempty" export:"true"` NativeLBByDefault bool `description:"Defines whether to use Native Kubernetes load-balancing mode by default." json:"nativeLBByDefault,omitempty" toml:"nativeLBByDefault,omitempty" yaml:"nativeLBByDefault,omitempty" export:"true"` + // The default rule syntax is initialized with the configuration defined by the user with the core.DefaultRuleSyntax option. + DefaultRuleSyntax string `json:"-" toml:"-" yaml:"-" label:"-" file:"-"` + lastConfiguration safe.Safe routerTransform k8s.RouterTransform @@ -336,7 +339,7 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl serviceName := provider.Normalize(ingress.Namespace + "-" + pa.Backend.Service.Name + "-" + portString) conf.HTTP.Services[serviceName] = service - rt := loadRouter(rule, pa, rtConfig, serviceName) + rt := p.loadRouter(rule, pa, rtConfig, serviceName) p.applyRouterTransform(ctxIngress, rt, ingress) @@ -432,100 +435,6 @@ func (p *Provider) shouldProcessIngress(ingress *netv1.Ingress, ingressClasses [ len(p.IngressClass) == 0 && ingress.Annotations[annotationKubernetesIngressClass] == traefikDefaultIngressClass } -func buildHostRule(host string) string { - if strings.HasPrefix(host, "*.") { - host = strings.Replace(regexp.QuoteMeta(host), `\*\.`, `[a-zA-Z0-9-]+\.`, 1) - return fmt.Sprintf("HostRegexp(`^%s$`)", host) - } - - return fmt.Sprintf("Host(`%s`)", host) -} - -func getCertificates(ctx context.Context, ingress *netv1.Ingress, k8sClient Client, tlsConfigs map[string]*tls.CertAndStores) error { - for _, t := range ingress.Spec.TLS { - if t.SecretName == "" { - log.Ctx(ctx).Debug().Msg("Skipping TLS sub-section: No secret name provided") - continue - } - - configKey := ingress.Namespace + "-" + t.SecretName - if _, tlsExists := tlsConfigs[configKey]; !tlsExists { - secret, exists, err := k8sClient.GetSecret(ingress.Namespace, t.SecretName) - if err != nil { - return fmt.Errorf("failed to fetch secret %s/%s: %w", ingress.Namespace, t.SecretName, err) - } - if !exists { - return fmt.Errorf("secret %s/%s does not exist", ingress.Namespace, t.SecretName) - } - - cert, key, err := getCertificateBlocks(secret, ingress.Namespace, t.SecretName) - if err != nil { - return err - } - - tlsConfigs[configKey] = &tls.CertAndStores{ - Certificate: tls.Certificate{ - CertFile: types.FileOrContent(cert), - KeyFile: types.FileOrContent(key), - }, - } - } - } - - return nil -} - -func getCertificateBlocks(secret *corev1.Secret, namespace, secretName string) (string, string, error) { - var missingEntries []string - - tlsCrtData, tlsCrtExists := secret.Data["tls.crt"] - if !tlsCrtExists { - missingEntries = append(missingEntries, "tls.crt") - } - - tlsKeyData, tlsKeyExists := secret.Data["tls.key"] - if !tlsKeyExists { - missingEntries = append(missingEntries, "tls.key") - } - - if len(missingEntries) > 0 { - return "", "", fmt.Errorf("secret %s/%s is missing the following TLS data entries: %s", - namespace, secretName, strings.Join(missingEntries, ", ")) - } - - cert := string(tlsCrtData) - if cert == "" { - missingEntries = append(missingEntries, "tls.crt") - } - - key := string(tlsKeyData) - if key == "" { - missingEntries = append(missingEntries, "tls.key") - } - - if len(missingEntries) > 0 { - return "", "", fmt.Errorf("secret %s/%s contains the following empty TLS data entries: %s", - namespace, secretName, strings.Join(missingEntries, ", ")) - } - - return cert, key, nil -} - -func getTLSConfig(tlsConfigs map[string]*tls.CertAndStores) []*tls.CertAndStores { - var secretNames []string - for secretName := range tlsConfigs { - secretNames = append(secretNames, secretName) - } - sort.Strings(secretNames) - - var configs []*tls.CertAndStores - for _, secretName := range secretNames { - configs = append(configs, tlsConfigs[secretName]) - } - - return configs -} - func (p *Provider) loadService(client Client, namespace string, backend netv1.IngressBackend) (*dynamic.Service, error) { if backend.Resource != nil { // https://kubernetes.io/docs/concepts/services-networking/ingress/#resource-backend @@ -698,6 +607,152 @@ func (p *Provider) loadService(client Client, namespace string, backend netv1.In return svc, nil } +func (p *Provider) loadRouter(rule netv1.IngressRule, pa netv1.HTTPIngressPath, rtConfig *RouterConfig, serviceName string) *dynamic.Router { + rt := &dynamic.Router{ + Service: serviceName, + } + + if rtConfig != nil && rtConfig.Router != nil { + rt.RuleSyntax = rtConfig.Router.RuleSyntax + rt.Priority = rtConfig.Router.Priority + rt.EntryPoints = rtConfig.Router.EntryPoints + rt.Middlewares = rtConfig.Router.Middlewares + + if rtConfig.Router.TLS != nil { + rt.TLS = rtConfig.Router.TLS + } + } + + var rules []string + if len(rule.Host) > 0 { + if rt.RuleSyntax == "v2" || (rt.RuleSyntax == "" && p.DefaultRuleSyntax == "v2") { + rules = append(rules, buildHostRuleV2(rule.Host)) + } else { + rules = append(rules, buildHostRule(rule.Host)) + } + } + + if len(pa.Path) > 0 { + matcher := defaultPathMatcher + + if pa.PathType == nil || *pa.PathType == "" || *pa.PathType == netv1.PathTypeImplementationSpecific { + if rtConfig != nil && rtConfig.Router != nil && rtConfig.Router.PathMatcher != "" { + matcher = rtConfig.Router.PathMatcher + } + } else if *pa.PathType == netv1.PathTypeExact { + matcher = "Path" + } + + rules = append(rules, fmt.Sprintf("%s(`%s`)", matcher, pa.Path)) + } + + rt.Rule = strings.Join(rules, " && ") + return rt +} + +func buildHostRuleV2(host string) string { + if strings.HasPrefix(host, "*.") { + host = strings.Replace(host, "*.", "{subdomain:[a-zA-Z0-9-]+}.", 1) + return fmt.Sprintf("HostRegexp(`%s`)", host) + } + + return fmt.Sprintf("Host(`%s`)", host) +} + +func buildHostRule(host string) string { + if strings.HasPrefix(host, "*.") { + host = strings.Replace(regexp.QuoteMeta(host), `\*\.`, `[a-zA-Z0-9-]+\.`, 1) + return fmt.Sprintf("HostRegexp(`^%s$`)", host) + } + + return fmt.Sprintf("Host(`%s`)", host) +} + +func getCertificates(ctx context.Context, ingress *netv1.Ingress, k8sClient Client, tlsConfigs map[string]*tls.CertAndStores) error { + for _, t := range ingress.Spec.TLS { + if t.SecretName == "" { + log.Ctx(ctx).Debug().Msg("Skipping TLS sub-section: No secret name provided") + continue + } + + configKey := ingress.Namespace + "-" + t.SecretName + if _, tlsExists := tlsConfigs[configKey]; !tlsExists { + secret, exists, err := k8sClient.GetSecret(ingress.Namespace, t.SecretName) + if err != nil { + return fmt.Errorf("failed to fetch secret %s/%s: %w", ingress.Namespace, t.SecretName, err) + } + if !exists { + return fmt.Errorf("secret %s/%s does not exist", ingress.Namespace, t.SecretName) + } + + cert, key, err := getCertificateBlocks(secret, ingress.Namespace, t.SecretName) + if err != nil { + return err + } + + tlsConfigs[configKey] = &tls.CertAndStores{ + Certificate: tls.Certificate{ + CertFile: types.FileOrContent(cert), + KeyFile: types.FileOrContent(key), + }, + } + } + } + + return nil +} + +func getCertificateBlocks(secret *corev1.Secret, namespace, secretName string) (string, string, error) { + var missingEntries []string + + tlsCrtData, tlsCrtExists := secret.Data["tls.crt"] + if !tlsCrtExists { + missingEntries = append(missingEntries, "tls.crt") + } + + tlsKeyData, tlsKeyExists := secret.Data["tls.key"] + if !tlsKeyExists { + missingEntries = append(missingEntries, "tls.key") + } + + if len(missingEntries) > 0 { + return "", "", fmt.Errorf("secret %s/%s is missing the following TLS data entries: %s", + namespace, secretName, strings.Join(missingEntries, ", ")) + } + + cert := string(tlsCrtData) + if cert == "" { + missingEntries = append(missingEntries, "tls.crt") + } + + key := string(tlsKeyData) + if key == "" { + missingEntries = append(missingEntries, "tls.key") + } + + if len(missingEntries) > 0 { + return "", "", fmt.Errorf("secret %s/%s contains the following empty TLS data entries: %s", + namespace, secretName, strings.Join(missingEntries, ", ")) + } + + return cert, key, nil +} + +func getTLSConfig(tlsConfigs map[string]*tls.CertAndStores) []*tls.CertAndStores { + var secretNames []string + for secretName := range tlsConfigs { + secretNames = append(secretNames, secretName) + } + sort.Strings(secretNames) + + var configs []*tls.CertAndStores + for _, secretName := range secretNames { + configs = append(configs, tlsConfigs[secretName]) + } + + return configs +} + func getNativeServiceAddress(service corev1.Service, svcPort corev1.ServicePort) (string, error) { if service.Spec.ClusterIP == "None" { return "", fmt.Errorf("no clusterIP on headless service: %s/%s", service.Namespace, service.Name) @@ -734,45 +789,6 @@ func makeRouterKeyWithHash(key, rule string) (string, error) { return dupKey, nil } -func loadRouter(rule netv1.IngressRule, pa netv1.HTTPIngressPath, rtConfig *RouterConfig, serviceName string) *dynamic.Router { - var rules []string - if len(rule.Host) > 0 { - rules = []string{buildHostRule(rule.Host)} - } - - if len(pa.Path) > 0 { - matcher := defaultPathMatcher - - if pa.PathType == nil || *pa.PathType == "" || *pa.PathType == netv1.PathTypeImplementationSpecific { - if rtConfig != nil && rtConfig.Router != nil && rtConfig.Router.PathMatcher != "" { - matcher = rtConfig.Router.PathMatcher - } - } else if *pa.PathType == netv1.PathTypeExact { - matcher = "Path" - } - - rules = append(rules, fmt.Sprintf("%s(`%s`)", matcher, pa.Path)) - } - - rt := &dynamic.Router{ - Rule: strings.Join(rules, " && "), - Service: serviceName, - } - - if rtConfig != nil && rtConfig.Router != nil { - rt.RuleSyntax = rtConfig.Router.RuleSyntax - rt.Priority = rtConfig.Router.Priority - rt.EntryPoints = rtConfig.Router.EntryPoints - rt.Middlewares = rtConfig.Router.Middlewares - - if rtConfig.Router.TLS != nil { - rt.TLS = rtConfig.Router.TLS - } - } - - return rt -} - func throttleEvents(ctx context.Context, throttleDuration time.Duration, pool *safe.Pool, eventsChan <-chan interface{}) chan interface{} { if throttleDuration == 0 { return nil diff --git a/pkg/provider/kubernetes/ingress/kubernetes_test.go b/pkg/provider/kubernetes/ingress/kubernetes_test.go index a47d76def..e389a67fa 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes_test.go +++ b/pkg/provider/kubernetes/ingress/kubernetes_test.go @@ -32,6 +32,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { allowEmptyServices bool disableIngressClassLookup bool disableClusterScopeResources bool + defaultRuleSyntax string }{ { desc: "Empty ingresses", @@ -1096,6 +1097,38 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, }, + { + desc: "Ingress with wildcard host syntax v2", + defaultRuleSyntax: "v2", + expected: &dynamic.Configuration{ + HTTP: &dynamic.HTTPConfiguration{ + Middlewares: map[string]*dynamic.Middleware{}, + Routers: map[string]*dynamic.Router{ + "testing-foobar-com-bar": { + Rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.foobar.com`) && PathPrefix(`/bar`)", + Service: "testing-service1-80", + }, + }, + Services: map[string]*dynamic.Service{ + "testing-service1-80": { + LoadBalancer: &dynamic.ServersLoadBalancer{ + PassHostHeader: pointer(true), + ResponseForwarding: &dynamic.ResponseForwarding{ + FlushInterval: ptypes.Duration(100 * time.Millisecond), + }, + Servers: []dynamic.Server{ + { + URL: "http://10.10.0.1:8080", + Scheme: "", + Port: "", + }, + }, + }, + }, + }, + }, + }, + }, { desc: "Ingress with multiple ingressClasses", expected: &dynamic.Configuration{ @@ -1505,6 +1538,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { AllowEmptyServices: test.allowEmptyServices, DisableIngressClassLookup: test.disableIngressClassLookup, DisableClusterScopeResources: test.disableClusterScopeResources, + DefaultRuleSyntax: test.defaultRuleSyntax, } conf := p.loadConfigurationFromIngresses(context.Background(), clientMock) From 5cfc11fe68f0371f2374bf07f0812b9b537e64c1 Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Wed, 20 Nov 2024 17:28:04 +0100 Subject: [PATCH 22/22] Prepare release v3.2.1 --- CHANGELOG.md | 59 ++++++++++++++++++++++------------ docs/content/migration/v3.md | 7 ++++ script/gcg/traefik-bugfix.toml | 10 +++--- 3 files changed, 51 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cfe49ca4..fb05b47b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,42 @@ +## [v3.2.1](https://github.com/traefik/traefik/tree/v3.2.1) (2024-11-20) +[All Commits](https://github.com/traefik/traefik/compare/v3.2.0...v3.2.1) + +**Bug fixes:** +- **[k8s/ingress,k8s]** Fix HostRegexp config for rule syntax v2 ([#11288](https://github.com/traefik/traefik/pull/11288) by [kevinpollet](https://github.com/kevinpollet)) +- **[logs]** Change level of peeking first byte error log to DEBUG for Postgres ([#11270](https://github.com/traefik/traefik/pull/11270) by [rtribotte](https://github.com/rtribotte)) +- **[service,fastproxy]** Fix case problem for websocket upgrade ([#11246](https://github.com/traefik/traefik/pull/11246) by [juliens](https://github.com/juliens)) + +**Documentation:** +- **[acme,tls]** Document how to use Certificates of cert-manager ([#11053](https://github.com/traefik/traefik/pull/11053) by [mloiseleur](https://github.com/mloiseleur)) +- **[docker/swarm]** Add tips about the use of docker in dynamic configuration for swarm provider ([#11207](https://github.com/traefik/traefik/pull/11207) by [webash](https://github.com/webash)) +- **[middleware]** Add Compress middleware to migration guide ([#11229](https://github.com/traefik/traefik/pull/11229) by [logica0419](https://github.com/logica0419)) + +**Misc:** +- Merge branch v2.11 into v3.2 ([#11290](https://github.com/traefik/traefik/pull/11290) by [kevinpollet](https://github.com/kevinpollet)) +- Merge branch v2.11 into v3.2 ([#11287](https://github.com/traefik/traefik/pull/11287) by [rtribotte](https://github.com/rtribotte)) +- Merge branch v2.11 into v3.2 ([#11285](https://github.com/traefik/traefik/pull/11285) by [juliens](https://github.com/juliens)) +- Merge branch v2.11 into v3.2 ([#11268](https://github.com/traefik/traefik/pull/11268) by [kevinpollet](https://github.com/kevinpollet)) + +## [v2.11.14](https://github.com/traefik/traefik/tree/v2.11.14) (2024-11-20) +[All Commits](https://github.com/traefik/traefik/compare/v2.11.13...v2.11.14) + +**Bug fixes:** +- **[acme]** Update go-acme/lego to v4.20.2 ([#11263](https://github.com/traefik/traefik/pull/11263) by [ldez](https://github.com/ldez)) +- **[logs,server]** Change level of peeking first byte error log to DEBUG ([#11254](https://github.com/traefik/traefik/pull/11254) by [rtribotte](https://github.com/rtribotte)) +- **[middleware,server]** Drop untrusted X-Forwarded-Prefix header ([#11253](https://github.com/traefik/traefik/pull/11253) by [rtribotte](https://github.com/rtribotte)) +- **[server]** Apply keepalive config to h2c entrypoints ([#11276](https://github.com/traefik/traefik/pull/11276) by [davefu113](https://github.com/davefu113)) +- **[service]** Fix internal handlers ServiceBuilder composition ([#11281](https://github.com/traefik/traefik/pull/11281) by [juliens](https://github.com/juliens)) + +**Documentation:** +- **[accesslogs]** Update access-logs.md, add examples for accesslog.format ([#11275](https://github.com/traefik/traefik/pull/11275) by [bluepuma77](https://github.com/bluepuma77)) +- Fix the defaultRule CLI examples ([#11282](https://github.com/traefik/traefik/pull/11282) by [kevinpollet](https://github.com/kevinpollet)) +- Fix spelling, grammar, and rephrase sections for clarity in some documentation pages ([#11280](https://github.com/traefik/traefik/pull/11280) by [AntoineDeveloper](https://github.com/AntoineDeveloper)) +- Fix absolute link in the migration guide ([#11269](https://github.com/traefik/traefik/pull/11269) by [kevinpollet](https://github.com/kevinpollet)) +- Add X-Forwarded-Prefix to the migration guide ([#11267](https://github.com/traefik/traefik/pull/11267) by [kevinpollet](https://github.com/kevinpollet)) +- Fix a small typo in entrypoints documentation ([#11261](https://github.com/traefik/traefik/pull/11261) by [quiode](https://github.com/quiode)) +- Add a warning about environment variables casing for static configuration ([#11226](https://github.com/traefik/traefik/pull/11226) by [anchal00](https://github.com/anchal00)) +- Improve documentation on dashboard ([#11220](https://github.com/traefik/traefik/pull/11220) by [mloiseleur](https://github.com/mloiseleur)) + ## [v3.2.0](https://github.com/traefik/traefik/tree/v3.2.0) (2024-10-28) [All Commits](https://github.com/traefik/traefik/compare/v3.2.0-rc1...v3.2.0) @@ -68,26 +107,6 @@ - Merge branch v2.11 into v3.1 ([#11232](https://github.com/traefik/traefik/pull/11232) by [kevinpollet](https://github.com/kevinpollet)) - Merge branch v2.11 into v3.1 ([#11218](https://github.com/traefik/traefik/pull/11218) by [kevinpollet](https://github.com/kevinpollet)) -## [v2.11.14](https://github.com/traefik/traefik/tree/v2.11.14) (2024-11-20) -[All Commits](https://github.com/traefik/traefik/compare/v2.11.13...v2.11.14) - -**Bug fixes:** -- **[acme]** Update go-acme/lego to v4.20.2 ([#11263](https://github.com/traefik/traefik/pull/11263) by [ldez](https://github.com/ldez)) -- **[logs,server]** Change level of peeking first byte error log to DEBUG ([#11254](https://github.com/traefik/traefik/pull/11254) by [rtribotte](https://github.com/rtribotte)) -- **[middleware,server]** Drop untrusted X-Forwarded-Prefix header ([#11253](https://github.com/traefik/traefik/pull/11253) by [rtribotte](https://github.com/rtribotte)) -- **[server]** Apply keepalive config to h2c entrypoints ([#11276](https://github.com/traefik/traefik/pull/11276) by [davefu113](https://github.com/davefu113)) -- **[service]** Fix internal handlers ServiceBuilder composition ([#11281](https://github.com/traefik/traefik/pull/11281) by [juliens](https://github.com/juliens)) - -**Documentation:** -- **[accesslogs]** Update access-logs.md, add examples for accesslog.format ([#11275](https://github.com/traefik/traefik/pull/11275) by [bluepuma77](https://github.com/bluepuma77)) -- Fix the defaultRule CLI examples ([#11282](https://github.com/traefik/traefik/pull/11282) by [kevinpollet](https://github.com/kevinpollet)) -- Fix spelling, grammar, and rephrase sections for clarity in some documentation pages ([#11280](https://github.com/traefik/traefik/pull/11280) by [AntoineDeveloper](https://github.com/AntoineDeveloper)) -- Fix absolute link in the migration guide ([#11269](https://github.com/traefik/traefik/pull/11269) by [kevinpollet](https://github.com/kevinpollet)) -- Add X-Forwarded-Prefix to the migration guide ([#11267](https://github.com/traefik/traefik/pull/11267) by [kevinpollet](https://github.com/kevinpollet)) -- Fix a small typo in entrypoints documentation ([#11261](https://github.com/traefik/traefik/pull/11261) by [quiode](https://github.com/quiode)) -- Add a warning about environment variables casing for static configuration ([#11226](https://github.com/traefik/traefik/pull/11226) by [anchal00](https://github.com/anchal00)) -- Improve documentation on dashboard ([#11220](https://github.com/traefik/traefik/pull/11220) by [mloiseleur](https://github.com/mloiseleur)) - ## [v2.11.13](https://github.com/traefik/traefik/tree/v2.11.13) (2024-10-28) [All Commits](https://github.com/traefik/traefik/compare/v2.11.12...v2.11.13) diff --git a/docs/content/migration/v3.md b/docs/content/migration/v3.md index de2e660b4..9f6aed502 100644 --- a/docs/content/migration/v3.md +++ b/docs/content/migration/v3.md @@ -153,3 +153,10 @@ the `configmaps`, `backendtlspolicies` and `backendtlspolicies/status` rights ha - update ... ``` + +## v3.2.1 + +### X-Forwarded-Prefix + +In `v3.2.1`, the `X-Forwarded-Prefix` header is now handled like the other `X-Forwarded-*` headers: Traefik removes it when it's sent from an untrusted source. +Please refer to the Forwarded headers [documentation](../routing/entrypoints.md#forwarded-headers) for more details. diff --git a/script/gcg/traefik-bugfix.toml b/script/gcg/traefik-bugfix.toml index 90dee22cf..36ccdecf2 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 v3.1.7 -CurrentRef = "v3.1" -PreviousRef = "v3.1.6" -BaseBranch = "v3.1" -FutureCurrentRefName = "v3.1.7" +# example new bugfix v3.2.1 +CurrentRef = "v3.2" +PreviousRef = "v3.2.0" +BaseBranch = "v3.2" +FutureCurrentRefName = "v3.2.1" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10