Skip to content

Commit

Permalink
Update traefik to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Apr 30, 2024
1 parent 783c802 commit de5c3d1
Show file tree
Hide file tree
Showing 19 changed files with 283 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -127,7 +127,7 @@ jobs:
run: kubectl create ns neoshowcase-apps
- name: Install CRDs
run: |
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
- name: Run tests
run: go test ./pkg/infrastructure/backend/k8simpl -v ${{ matrix.race }} -coverprofile=coverage.out -covermode=atomic -vet=off
- name: Upload coverage to Codecov
Expand Down
4 changes: 2 additions & 2 deletions .local-dev/config/ns-auth.ini
Expand Up @@ -18,8 +18,8 @@ providers.generic-oauth.client-id = RFOhjMbt3VsR75uaMwhWH21pUkhfE8DqVeXT
providers.generic-oauth.client-secret = N4rzl3JlQJprKNNi2EYl2biifjKprB9HS9PO
providers.generic-oauth.scope = read

rule.soft.rule = Headers(`X-Forward-Auth-Type`, `soft`)
rule.soft.rule = Header(`X-Forward-Auth-Type`, `soft`)
rule.soft.action = soft-auth

rule.hard.rule = Headers(`X-Forward-Auth-Type`, `hard`)
rule.hard.rule = Header(`X-Forward-Auth-Type`, `hard`)
rule.hard.action = auth
2 changes: 1 addition & 1 deletion .local-manifest/auth/deployment.yaml
Expand Up @@ -25,7 +25,7 @@ spec:

containers:
- name: ns-auth
image: ghcr.io/traptitech/traefik-forward-auth:2.8.0
image: ghcr.io/traptitech/traefik-forward-auth:3.0.0
args:
- --config=/config.ini
ports:
Expand Down
2 changes: 1 addition & 1 deletion .local-manifest/crd/kustomization.yaml
@@ -1,2 +1,2 @@
resources:
- https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
- https://raw.githubusercontent.com/traefik/traefik/v3.0.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -96,7 +96,7 @@ test-down-docker:
test-up-k8s:
@k3d cluster list ns-test > /dev/null \
|| k3d cluster create ns-test --no-lb --k3s-arg "--disable=traefik,servicelb,metrics-server" \
&& kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
&& kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml

.PHONY: test-down-k8s
test-down-k8s:
Expand Down
2 changes: 1 addition & 1 deletion cmd/providers.go
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/friendsofgo/errors"
"github.com/google/wire"
buildkit "github.com/moby/buildkit/client"
traefikv1alpha1 "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1"
traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"

Expand Down
2 changes: 1 addition & 1 deletion cmd/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions compose.yaml
Expand Up @@ -98,7 +98,7 @@ services:
# - default

ns-auth:
image: ghcr.io/traptitech/traefik-forward-auth:2.8.0
image: ghcr.io/traptitech/traefik-forward-auth:3.0.0
restart: always
command:
- --config=/config.ini
Expand Down Expand Up @@ -390,7 +390,7 @@ services:
- /dev/disk/:/dev/disk:ro

traefik:
image: traefik:2.10
image: traefik:3.0.0
restart: always
command:
- --api.insecure=true
Expand Down
52 changes: 28 additions & 24 deletions go.mod
Expand Up @@ -10,7 +10,7 @@ require (
github.com/aws/aws-sdk-go v1.51.11
github.com/cert-manager/cert-manager v1.14.4
github.com/docker/cli v25.0.3+incompatible
github.com/docker/docker v25.0.3+incompatible // should be in sync with requirements of github.com/moby/buildkit
github.com/docker/docker v25.0.5+incompatible // should be in sync with requirements of github.com/moby/buildkit
github.com/docker/go-connections v0.5.0
github.com/friendsofgo/errors v0.9.2
github.com/gliderlabs/ssh v0.3.7
Expand All @@ -22,9 +22,10 @@ require (
github.com/google/wire v0.6.0
github.com/labstack/echo/v4 v4.11.4
github.com/lukesampson/figlet v0.0.0-20190211215653-8a3ef4a6ac42
github.com/moby/buildkit v0.13.1
github.com/moby/buildkit v0.13.2
github.com/motoki317/sc v1.8.0
github.com/ncw/swift v1.0.53
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/common v0.51.1
github.com/regclient/regclient v0.6.0
Expand All @@ -36,17 +37,17 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
github.com/traefik/traefik/v2 v2.11.0
github.com/traefik/traefik/v3 v3.0.0
github.com/volatiletech/null/v8 v8.1.2
github.com/volatiletech/sqlboiler/v4 v4.16.2
github.com/volatiletech/strmangle v0.0.6
github.com/zeebo/xxh3 v1.0.2
go.mongodb.org/mongo-driver v1.14.0
golang.org/x/crypto v0.21.0
golang.org/x/crypto v0.22.0
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
golang.org/x/net v0.22.0
golang.org/x/sync v0.6.0
google.golang.org/grpc v1.62.1
golang.org/x/net v0.24.0
golang.org/x/sync v0.7.0
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.29.3
Expand Down Expand Up @@ -85,11 +86,13 @@ require (
github.com/emirpasic/gods v1.18.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-acme/lego/v4 v4.15.0 // indirect
github.com/go-acme/lego/v4 v4.16.1 // indirect
github.com/go-fed/httpsig v1.1.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
github.com/go-jose/go-jose/v4 v4.0.1 // indirect
github.com/go-kit/kit v0.10.1-0.20200915143503-439c4d2ed3ea // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
Expand All @@ -111,10 +114,11 @@ require (
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/http-wasm/http-wasm-host-go v0.6.0 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/in-toto/in-toto-golang v0.9.0 // indirect
Expand Down Expand Up @@ -147,13 +151,13 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/rs/zerolog v1.29.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect
Expand All @@ -164,7 +168,7 @@ require (
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tonistiigi/fsutil v0.0.0-20240301111122-7525a1af2bb5 // indirect
github.com/tonistiigi/fsutil v0.0.0-20240424095704-91a3fc46842c // indirect
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect
github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect
github.com/traefik/paerser v0.2.0 // indirect
Expand All @@ -179,21 +183,21 @@ require (
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/sdk v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
Expand Down

0 comments on commit de5c3d1

Please sign in to comment.