Update to go1.23

This commit is contained in:
Michel Loiseleur 2024-08-28 15:00:06 +02:00 committed by GitHub
parent d2030a5835
commit e56ae1a766
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 113 additions and 119 deletions

View file

@ -10,7 +10,7 @@ on:
- 'script/gcg/**' - 'script/gcg/**'
env: env:
GO_VERSION: '1.22' GO_VERSION: '1.23'
CGO_ENABLED: 0 CGO_ENABLED: 0
jobs: jobs:

View file

@ -7,7 +7,7 @@ on:
- v* - v*
env: env:
GO_VERSION: '1.22' GO_VERSION: '1.23'
CGO_ENABLED: 0 CGO_ENABLED: 0
jobs: jobs:

View file

@ -10,7 +10,7 @@ on:
- 'script/gcg/**' - 'script/gcg/**'
env: env:
GO_VERSION: '1.22' GO_VERSION: '1.23'
CGO_ENABLED: 0 CGO_ENABLED: 0
jobs: jobs:

View file

@ -10,7 +10,7 @@ on:
- 'script/gcg/**' - 'script/gcg/**'
env: env:
GO_VERSION: '1.22' GO_VERSION: '1.23'
jobs: jobs:

View file

@ -6,8 +6,8 @@ on:
- '*' - '*'
env: env:
GO_VERSION: '1.22' GO_VERSION: '1.23'
GOLANGCI_LINT_VERSION: v1.59.0 GOLANGCI_LINT_VERSION: v1.60.3
MISSSPELL_VERSION: v0.6.0 MISSSPELL_VERSION: v0.6.0
jobs: jobs:

View file

@ -197,8 +197,7 @@ linters:
- maintidx # kind of duplicate of gocyclo - maintidx # kind of duplicate of gocyclo
- nonamedreturns # Too strict - nonamedreturns # Too strict
- gosmopolitan # not relevant - gosmopolitan # not relevant
- exportloopref # Useless with go1.22 - exportloopref # Not relevant since go1.22
- musttag
issues: issues:
exclude-use-default: false exclude-use-default: false
@ -271,3 +270,6 @@ issues:
text: 'unusedwrite: unused write to field' text: 'unusedwrite: unused write to field'
linters: linters:
- govet - govet
- path: pkg/provider/acme/local_store.go
linters:
- musttag

View file

@ -19,13 +19,13 @@ global_job_config:
prologue: prologue:
commands: commands:
- curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin" - curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin"
- sudo semgo go1.22 - sudo semgo go1.23
- export "GOPATH=$(go env GOPATH)" - export "GOPATH=$(go env GOPATH)"
- export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}" - export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}"
- export "PATH=${GOPATH}/bin:${PATH}" - export "PATH=${GOPATH}/bin:${PATH}"
- mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin" - mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin"
- export GOPROXY=https://proxy.golang.org,direct - 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.59.0 - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.60.3
- curl -sSfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin" - curl -sSfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin"
- checkout - checkout
- cache restore traefik-$(checksum go.sum) - cache restore traefik-$(checksum go.sum)

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutes.traefik.io name: ingressroutes.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -290,7 +290,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutetcps.traefik.io name: ingressroutetcps.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -514,7 +514,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressrouteudps.traefik.io name: ingressrouteudps.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -618,7 +618,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewares.traefik.io name: middlewares.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1598,7 +1598,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewaretcps.traefik.io name: middlewaretcps.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1685,7 +1685,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: serverstransports.traefik.io name: serverstransports.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1811,7 +1811,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsoptions.traefik.io name: tlsoptions.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1925,7 +1925,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsstores.traefik.io name: tlsstores.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -2022,7 +2022,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: traefikservices.traefik.io name: traefikservices.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -2433,7 +2433,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutes.traefik.containo.us name: ingressroutes.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -2720,7 +2720,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutetcps.traefik.containo.us name: ingressroutetcps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -2944,7 +2944,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressrouteudps.traefik.containo.us name: ingressrouteudps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -3048,7 +3048,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewares.traefik.containo.us name: middlewares.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4028,7 +4028,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewaretcps.traefik.containo.us name: middlewaretcps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4115,7 +4115,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: serverstransports.traefik.containo.us name: serverstransports.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4241,7 +4241,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsoptions.traefik.containo.us name: tlsoptions.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4355,7 +4355,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsstores.traefik.containo.us name: tlsstores.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4452,7 +4452,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: traefikservices.traefik.containo.us name: traefikservices.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutes.traefik.containo.us name: ingressroutes.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutetcps.traefik.containo.us name: ingressroutetcps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressrouteudps.traefik.containo.us name: ingressrouteudps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewares.traefik.containo.us name: middlewares.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewaretcps.traefik.containo.us name: middlewaretcps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: serverstransports.traefik.containo.us name: serverstransports.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsoptions.traefik.containo.us name: tlsoptions.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsstores.traefik.containo.us name: tlsstores.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: traefikservices.traefik.containo.us name: traefikservices.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutes.traefik.io name: ingressroutes.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutetcps.traefik.io name: ingressroutetcps.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressrouteudps.traefik.io name: ingressrouteudps.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewares.traefik.io name: middlewares.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewaretcps.traefik.io name: middlewaretcps.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: serverstransports.traefik.io name: serverstransports.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsoptions.traefik.io name: tlsoptions.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsstores.traefik.io name: tlsstores.traefik.io
spec: spec:
group: traefik.io group: traefik.io

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: traefikservices.traefik.io name: traefikservices.traefik.io
spec: spec:
group: traefik.io group: traefik.io

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/traefik/traefik/v2 module github.com/traefik/traefik/v2
go 1.22 go 1.23.0
require ( require (
github.com/BurntSushi/toml v1.4.0 github.com/BurntSushi/toml v1.4.0

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutes.traefik.io name: ingressroutes.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -290,7 +290,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutetcps.traefik.io name: ingressroutetcps.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -514,7 +514,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressrouteudps.traefik.io name: ingressrouteudps.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -618,7 +618,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewares.traefik.io name: middlewares.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1598,7 +1598,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewaretcps.traefik.io name: middlewaretcps.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1685,7 +1685,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: serverstransports.traefik.io name: serverstransports.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1811,7 +1811,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsoptions.traefik.io name: tlsoptions.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -1925,7 +1925,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsstores.traefik.io name: tlsstores.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -2022,7 +2022,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: traefikservices.traefik.io name: traefikservices.traefik.io
spec: spec:
group: traefik.io group: traefik.io
@ -2433,7 +2433,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutes.traefik.containo.us name: ingressroutes.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -2720,7 +2720,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressroutetcps.traefik.containo.us name: ingressroutetcps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -2944,7 +2944,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: ingressrouteudps.traefik.containo.us name: ingressrouteudps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -3048,7 +3048,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewares.traefik.containo.us name: middlewares.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4028,7 +4028,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: middlewaretcps.traefik.containo.us name: middlewaretcps.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4115,7 +4115,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: serverstransports.traefik.containo.us name: serverstransports.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4241,7 +4241,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsoptions.traefik.containo.us name: tlsoptions.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4355,7 +4355,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: tlsstores.traefik.containo.us name: tlsstores.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us
@ -4452,7 +4452,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.1
name: traefikservices.traefik.containo.us name: traefikservices.traefik.containo.us
spec: spec:
group: traefik.containo.us group: traefik.containo.us

View file

@ -56,7 +56,7 @@ func (c *searchCriterion) searchIn(values ...string) bool {
}) })
} }
func pagination(request *http.Request, max int) (pageInfo, error) { func pagination(request *http.Request, maximum int) (pageInfo, error) {
perPage, err := getIntParam(request, "per_page", defaultPerPage) perPage, err := getIntParam(request, "per_page", defaultPerPage)
if err != nil { if err != nil {
return pageInfo{}, err return pageInfo{}, err
@ -68,17 +68,17 @@ func pagination(request *http.Request, max int) (pageInfo, error) {
} }
startIndex := (page - 1) * perPage startIndex := (page - 1) * perPage
if startIndex != 0 && startIndex >= max { if startIndex != 0 && startIndex >= maximum {
return pageInfo{}, fmt.Errorf("invalid request: page: %d, per_page: %d", page, perPage) return pageInfo{}, fmt.Errorf("invalid request: page: %d, per_page: %d", page, perPage)
} }
endIndex := startIndex + perPage endIndex := startIndex + perPage
if endIndex >= max { if endIndex >= maximum {
endIndex = max endIndex = maximum
} }
nextPage := 1 nextPage := 1
if page*perPage < max { if page*perPage < maximum {
nextPage = page + 1 nextPage = page + 1
} }

View file

@ -21,11 +21,11 @@ const collectorURL = "https://collect.traefik.io/9vxmmkcdmalbdi635d4jgc5p5rx0h7h
// Collected data. // Collected data.
type data struct { type data struct {
Version string Version string `json:"version"`
Codename string Codename string `json:"codename"`
BuildDate string BuildDate string `json:"buildDate"`
Configuration string Configuration string `json:"configuration"`
Hash string Hash string `json:"hash"`
} }
// Collect anonymous data. // Collect anonymous data.

View file

@ -197,7 +197,7 @@ func TestLoggerHeaderFields(t *testing.T) {
if config.FilePath != "" { if config.FilePath != "" {
_, err = os.Stat(config.FilePath) _, err = os.Stat(config.FilePath)
require.NoError(t, err, fmt.Sprintf("logger should create %s", config.FilePath)) require.NoErrorf(t, err, "logger should create %s", config.FilePath)
} }
req := &http.Request{ req := &http.Request{
@ -701,7 +701,7 @@ func assertValidLogData(t *testing.T, expected string, logData []byte) {
t.Helper() t.Helper()
if len(expected) == 0 { if len(expected) == 0 {
assert.Zero(t, len(logData)) assert.Empty(t, logData)
t.Log(string(logData)) t.Log(string(logData))
return return
} }
@ -758,7 +758,7 @@ func doLoggingTLSOpt(t *testing.T, config *types.AccessLog, enableTLS bool) {
if config.FilePath != "" { if config.FilePath != "" {
_, err = os.Stat(config.FilePath) _, err = os.Stat(config.FilePath)
require.NoError(t, err, fmt.Sprintf("logger should create %s", config.FilePath)) require.NoErrorf(t, err, "logger should create %s", config.FilePath)
} }
req := &http.Request{ req := &http.Request{

View file

@ -103,9 +103,8 @@ func (fa *forwardAuth) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
forwardReq, err := http.NewRequest(http.MethodGet, fa.address, nil) forwardReq, err := http.NewRequest(http.MethodGet, fa.address, nil)
tracing.LogRequest(tracing.GetSpan(req), forwardReq) tracing.LogRequest(tracing.GetSpan(req), forwardReq)
if err != nil { if err != nil {
logMessage := fmt.Sprintf("Error calling %s. Cause %s", fa.address, err) logger.Debugf("Error calling %s. Cause %s", fa.address, err)
logger.Debug(logMessage) tracing.SetErrorWithEvent(req, "Error calling %s. Cause %s", fa.address, err)
tracing.SetErrorWithEvent(req, logMessage)
rw.WriteHeader(http.StatusInternalServerError) rw.WriteHeader(http.StatusInternalServerError)
return return
@ -119,9 +118,8 @@ func (fa *forwardAuth) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
forwardResponse, forwardErr := fa.client.Do(forwardReq) forwardResponse, forwardErr := fa.client.Do(forwardReq)
if forwardErr != nil { if forwardErr != nil {
logMessage := fmt.Sprintf("Error calling %s. Cause: %s", fa.address, forwardErr) logger.Debugf("Error calling %s. Cause: %s", fa.address, forwardErr)
logger.Debug(logMessage) tracing.SetErrorWithEvent(req, "Error calling %s. Cause: %s", fa.address, forwardErr)
tracing.SetErrorWithEvent(req, logMessage)
rw.WriteHeader(http.StatusInternalServerError) rw.WriteHeader(http.StatusInternalServerError)
return return
@ -130,9 +128,8 @@ func (fa *forwardAuth) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
body, readError := io.ReadAll(forwardResponse.Body) body, readError := io.ReadAll(forwardResponse.Body)
if readError != nil { if readError != nil {
logMessage := fmt.Sprintf("Error reading body %s. Cause: %s", fa.address, readError) logger.Debugf("Error reading body %s. Cause: %s", fa.address, readError)
logger.Debug(logMessage) tracing.SetErrorWithEvent(req, "Error reading body %s. Cause: %s", fa.address, readError)
tracing.SetErrorWithEvent(req, logMessage)
rw.WriteHeader(http.StatusInternalServerError) rw.WriteHeader(http.StatusInternalServerError)
return return
@ -151,9 +148,8 @@ func (fa *forwardAuth) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
if err != nil { if err != nil {
if !errors.Is(err, http.ErrNoLocation) { if !errors.Is(err, http.ErrNoLocation) {
logMessage := fmt.Sprintf("Error reading response location header %s. Cause: %s", fa.address, err) logger.Debugf("Error reading response location header %s. Cause: %s", fa.address, err)
logger.Debug(logMessage) tracing.SetErrorWithEvent(req, "Error reading response location header %s. Cause: %s", fa.address, err)
tracing.SetErrorWithEvent(req, logMessage)
rw.WriteHeader(http.StatusInternalServerError) rw.WriteHeader(http.StatusInternalServerError)
return return

View file

@ -66,9 +66,8 @@ func (al *ipAllowLister) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
clientIP := al.strategy.GetIP(req) clientIP := al.strategy.GetIP(req)
err := al.allowLister.IsAuthorized(clientIP) err := al.allowLister.IsAuthorized(clientIP)
if err != nil { if err != nil {
msg := fmt.Sprintf("Rejecting IP %s: %v", clientIP, err) logger.Debugf("Rejecting IP %s: %v", clientIP, err)
logger.Debug(msg) tracing.SetErrorWithEvent(req, "Rejecting IP %s: %v", clientIP, err)
tracing.SetErrorWithEvent(req, msg)
reject(ctx, rw) reject(ctx, rw)
return return
} }

View file

@ -66,9 +66,8 @@ func (wl *ipWhiteLister) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
clientIP := wl.strategy.GetIP(req) clientIP := wl.strategy.GetIP(req)
err := wl.whiteLister.IsAuthorized(clientIP) err := wl.whiteLister.IsAuthorized(clientIP)
if err != nil { if err != nil {
msg := fmt.Sprintf("Rejecting IP %s: %v", clientIP, err) logger.Debugf("Rejecting IP %s: %v", clientIP, err)
logger.Debug(msg) tracing.SetErrorWithEvent(req, "Rejecting IP %s: %v", clientIP, err)
tracing.SetErrorWithEvent(req, msg)
reject(ctx, rw) reject(ctx, rw)
return return
} }

View file

@ -319,7 +319,7 @@ func TestPassTLSClientCert_PEM(t *testing.T) {
res := httptest.NewRecorder() res := httptest.NewRecorder()
req := testhelpers.MustNewRequest(http.MethodGet, "http://example.com/foo", nil) req := testhelpers.MustNewRequest(http.MethodGet, "http://example.com/foo", nil)
if test.certContents != nil && len(test.certContents) > 0 { if len(test.certContents) > 0 {
req.TLS = buildTLSWith(test.certContents) req.TLS = buildTLSWith(test.certContents)
} }
@ -541,7 +541,7 @@ func TestPassTLSClientCert_certInfo(t *testing.T) {
res := httptest.NewRecorder() res := httptest.NewRecorder()
req := testhelpers.MustNewRequest(http.MethodGet, "http://example.com/foo", nil) req := testhelpers.MustNewRequest(http.MethodGet, "http://example.com/foo", nil)
if test.certContents != nil && len(test.certContents) > 0 { if len(test.certContents) > 0 {
req.TLS = buildTLSWith(test.certContents) req.TLS = buildTLSWith(test.certContents)
} }

View file

@ -408,8 +408,7 @@ func getPort(container dockerData, serverPort string) string {
nat.Sort(ports, less) nat.Sort(ports, less)
if len(ports) > 0 { if len(ports) > 0 {
min := ports[0] return ports[0].Port()
return min.Port()
} }
return "" return ""

View file

@ -318,8 +318,7 @@ func getPort(instance ecsInstance, serverPort string) string {
nat.Sort(ports, less) nat.Sort(ports, less)
if len(ports) > 0 { if len(ports) > 0 {
min := ports[0] return ports[0].Port()
return min.Port()
} }
return "" return ""

View file

@ -65,13 +65,13 @@ func (b *WRRLoadBalancer) AddWeightServer(serverHandler Handler, weight *int) {
} }
func (b *WRRLoadBalancer) maxWeight() int { func (b *WRRLoadBalancer) maxWeight() int {
max := -1 maximum := -1
for _, s := range b.servers { for _, s := range b.servers {
if s.weight > max { if s.weight > maximum {
max = s.weight maximum = s.weight
} }
} }
return max return maximum
} }
func (b *WRRLoadBalancer) weightGcd() int { func (b *WRRLoadBalancer) weightGcd() int {
@ -103,8 +103,8 @@ func (b *WRRLoadBalancer) next() (Handler, error) {
// and allows us not to build an iterator every time we readjust weights // and allows us not to build an iterator every time we readjust weights
// Maximum weight across all enabled servers // Maximum weight across all enabled servers
max := b.maxWeight() maximum := b.maxWeight()
if max == 0 { if maximum == 0 {
return nil, errors.New("all servers have 0 weight") return nil, errors.New("all servers have 0 weight")
} }
@ -116,7 +116,7 @@ func (b *WRRLoadBalancer) next() (Handler, error) {
if b.index == 0 { if b.index == 0 {
b.currentWeight -= gcd b.currentWeight -= gcd
if b.currentWeight <= 0 { if b.currentWeight <= 0 {
b.currentWeight = max b.currentWeight = maximum
} }
} }
srv := b.servers[b.index] srv := b.servers[b.index]

View file

@ -61,13 +61,13 @@ func (b *WRRLoadBalancer) AddWeightedServer(serverHandler Handler, weight *int)
} }
func (b *WRRLoadBalancer) maxWeight() int { func (b *WRRLoadBalancer) maxWeight() int {
max := -1 maximum := -1
for _, s := range b.servers { for _, s := range b.servers {
if s.weight > max { if s.weight > maximum {
max = s.weight maximum = s.weight
} }
} }
return max return maximum
} }
func (b *WRRLoadBalancer) weightGcd() int { func (b *WRRLoadBalancer) weightGcd() int {
@ -99,8 +99,8 @@ func (b *WRRLoadBalancer) next() (Handler, error) {
// what interleaves servers and allows us not to build an iterator every time we readjust weights. // what interleaves servers and allows us not to build an iterator every time we readjust weights.
// Maximum weight across all enabled servers // Maximum weight across all enabled servers
max := b.maxWeight() maximum := b.maxWeight()
if max == 0 { if maximum == 0 {
return nil, errors.New("all servers have 0 weight") return nil, errors.New("all servers have 0 weight")
} }
@ -112,7 +112,7 @@ func (b *WRRLoadBalancer) next() (Handler, error) {
if b.index == 0 { if b.index == 0 {
b.currentWeight -= gcd b.currentWeight -= gcd
if b.currentWeight <= 0 { if b.currentWeight <= 0 {
b.currentWeight = max b.currentWeight = maximum
} }
} }
srv := b.servers[b.index] srv := b.servers[b.index]

View file

@ -9,7 +9,7 @@ IMAGE_NAME="kubernetes-codegen:latest"
CURRENT_DIR="$(pwd)" CURRENT_DIR="$(pwd)"
echo "Building codegen Docker image..." echo "Building codegen Docker image..."
docker build --build-arg KUBE_VERSION=v0.29.1 \ docker build --build-arg KUBE_VERSION=v0.29.8 \
--build-arg USER="${USER}" \ --build-arg USER="${USER}" \
--build-arg UID="$(id -u)" \ --build-arg UID="$(id -u)" \
--build-arg GID="$(id -g)" \ --build-arg GID="$(id -g)" \

View file

@ -1,4 +1,4 @@
FROM golang:1.22 FROM golang:1.23
ARG USER=$USER ARG USER=$USER
ARG UID=$UID ARG UID=$UID
@ -13,7 +13,7 @@ RUN go install k8s.io/code-generator/cmd/client-gen@$KUBE_VERSION
RUN go install k8s.io/code-generator/cmd/lister-gen@$KUBE_VERSION RUN go install k8s.io/code-generator/cmd/lister-gen@$KUBE_VERSION
RUN go install k8s.io/code-generator/cmd/informer-gen@$KUBE_VERSION RUN go install k8s.io/code-generator/cmd/informer-gen@$KUBE_VERSION
RUN go install k8s.io/code-generator/cmd/deepcopy-gen@$KUBE_VERSION RUN go install k8s.io/code-generator/cmd/deepcopy-gen@$KUBE_VERSION
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.1
RUN mkdir -p $GOPATH/src/k8s.io/code-generator RUN mkdir -p $GOPATH/src/k8s.io/code-generator
RUN cp -R $GOPATH/pkg/mod/k8s.io/code-generator@$KUBE_VERSION/* $GOPATH/src/k8s.io/code-generator/ RUN cp -R $GOPATH/pkg/mod/k8s.io/code-generator@$KUBE_VERSION/* $GOPATH/src/k8s.io/code-generator/