Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update tutorials #287

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions WALKTHROUGH.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ helm repo add --force-update traefik https://traefik.github.io/charts
kubectl create namespace traefik
# Install the Helm chart
helm install traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--set ingressClass.enabled=false \
--set ingressRoute.dashboard.enabled=true \
--set ingressRoute.dashboard.matchRule='Host(`dashboard.docker.localhost`)' \
Expand Down Expand Up @@ -265,12 +265,12 @@ Then, upgrade Traefik Proxy to Traefik Hub using the same Helm chart:

```shell
helm upgrade traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--reuse-values \
--set hub.token=traefik-hub-license \
--set image.registry=ghcr.io \
--set image.repository=traefik/traefik-hub \
--set image.tag=v3.7.0 \
--set image.tag=v3.8.0 \
traefik/traefik
```

Expand Down Expand Up @@ -395,7 +395,7 @@ First, we enable API Management on Traefik Traefik Hub using the same Helm chart

```shell
helm upgrade traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--reuse-values \
--set hub.apimanagement.enabled=true \
traefik/traefik
Expand Down
8 changes: 4 additions & 4 deletions api-gateway/1-getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ Install Traefik Hub API Gateway using Helm:
helm repo add --force-update traefik https://traefik.github.io/charts
# Install the Helm chart
helm install traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--set hub.token=traefik-hub-license \
--set ingressClass.enabled=false \
--set ingressRoute.dashboard.enabled=true \
--set ingressRoute.dashboard.matchRule='Host(`dashboard.docker.localhost`)' \
--set ingressRoute.dashboard.entryPoints={web} \
--set image.registry=ghcr.io \
--set image.repository=traefik/traefik-hub \
--set image.tag=v3.7.0 \
--set image.tag=v3.8.0 \
--set ports.web.nodePort=30000 \
--set ports.websecure.nodePort=30001 \
traefik/traefik
Expand All @@ -112,15 +112,15 @@ kubectl apply --server-side --force-conflicts -k https://github.com/traefik/trae
helm repo update
# Upgrade the Helm chart
helm upgrade traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--set hub.token=traefik-hub-license \
--set ingressClass.enabled=false \
--set ingressRoute.dashboard.enabled=true \
--set ingressRoute.dashboard.matchRule='Host(`dashboard.docker.localhost`)' \
--set ingressRoute.dashboard.entryPoints={web} \
--set image.registry=ghcr.io \
--set image.repository=traefik/traefik-hub \
--set image.tag=v3.7.0 \
--set image.tag=v3.8.0 \
--set ports.web.nodePort=30000 \
--set ports.websecure.nodePort=30001 \
traefik/traefik
Expand Down
4 changes: 2 additions & 2 deletions api-gateway/2-expose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ We can enable it using helm:

```sh
helm upgrade traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--reuse-values \
--set providers.kubernetesCRD.allowExternalNameServices=true \
traefik/traefik
Expand Down Expand Up @@ -820,7 +820,7 @@ And configure Traefik Hub API Gateway to use it, with Kubernetes storage and Peb

```sh
helm upgrade traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--reuse-values \
--set certificatesResolvers.pebble.distributedAcme.caServer=https://pebble.pebble.svc:14000/dir \
--set certificatesResolvers.pebble.distributedAcme.email=test@example.com \
Expand Down
8 changes: 4 additions & 4 deletions api-management/1-getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Now, install Traefik Hub with Helm:
helm repo add --force-update traefik https://traefik.github.io/charts
# Install the Helm chart
helm install traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--set hub.token=traefik-hub-license \
--set hub.apimanagement.enabled=true \
--set ingressClass.enabled=false \
Expand All @@ -91,7 +91,7 @@ helm install traefik -n traefik --wait \
--set ingressRoute.dashboard.entryPoints={web} \
--set image.registry=ghcr.io \
--set image.repository=traefik/traefik-hub \
--set image.tag=v3.7.0 \
--set image.tag=v3.8.0 \
--set ports.web.nodePort=30000 \
--set ports.websecure.nodePort=30001 \
traefik/traefik
Expand All @@ -106,7 +106,7 @@ kubectl apply --server-side --force-conflicts -k https://github.com/traefik/trae
helm repo add --force-update traefik https://traefik.github.io/charts
# Upgrade the Helm chart
helm upgrade traefik -n traefik --wait \
--version v33.0.0 \
--version v33.1.0 \
--set hub.token=traefik-hub-license \
--set hub.apimanagement.enabled=true \
--set ingressClass.enabled=false \
Expand All @@ -115,7 +115,7 @@ helm upgrade traefik -n traefik --wait \
--set ingressRoute.dashboard.entryPoints={web} \
--set image.registry=ghcr.io \
--set image.repository=traefik/traefik-hub \
--set image.tag=v3.7.0 \
--set image.tag=v3.8.0 \
--set ports.web.nodePort=30000 \
--set ports.websecure.nodePort=30001 \
traefik/traefik
Expand Down
2 changes: 1 addition & 1 deletion src/api-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.11
# syntax=docker/dockerfile:1.12

# golang builder
FROM golang:1.23 AS builder
Expand Down
2 changes: 1 addition & 1 deletion src/api-server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/go-chi/chi/v5 v5.1.0
github.com/go-openapi/loads v0.22.0
github.com/google/uuid v1.6.0
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
4 changes: 2 additions & 2 deletions src/api-server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.mongodb.org/mongo-driver v1.16.1 h1:rIVLL3q0IHM39dvE+z2ulZLp9ENZKThVfuvN/IiN4l8=
go.mongodb.org/mongo-driver v1.16.1/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
4 changes: 2 additions & 2 deletions tests/apigateway/apigateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (s *APIGatewayTestSuite) TestExpose() {
)

s.apply("api-gateway/2-expose/manifests/webapp-ingressroute-https-auto.yaml")
time.Sleep(25 * time.Second)
time.Sleep(30 * time.Second)

s.apply("api-gateway/2-expose/manifests/pebble-ingressroute.yaml")
time.Sleep(5 * time.Second)
Expand All @@ -412,7 +412,7 @@ func (s *APIGatewayTestSuite) TestExpose() {
// Check with dynamic CA Chain from pebble
req, err = http.NewRequest(http.MethodGet, "https://expose.apigateway.docker.localhost/", nil)
s.Require().NoError(err)
err = try.RequestWithTransport(req, 15*time.Second, s.tr, try.StatusCodeIs(http.StatusOK))
err = try.RequestWithTransport(req, 30*time.Second, s.tr, try.StatusCodeIs(http.StatusOK))
s.Assert().NoError(err)
}

Expand Down
12 changes: 6 additions & 6 deletions tests/testhelpers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func LaunchHelmCommand(t *testing.T, arg ...string) {

// LaunchHelmUpgradeCommand execute `helm` CLI with arg and display stdout+stder with testcontainer logger
func LaunchHelmUpgradeCommand(t *testing.T, arg ...string) {
upgradeArgs := []string{"upgrade", "traefik", "-n", traefikNamespace, "--wait", "--version", "v33.0.0", "--reuse-values", "traefik/traefik"}
upgradeArgs := []string{"upgrade", "traefik", "-n", traefikNamespace, "--wait", "--version", "v33.1.0", "--reuse-values", "traefik/traefik"}
upgradeArgs = append(upgradeArgs, arg...)
LaunchHelmCommand(t, upgradeArgs...)
}
Expand All @@ -101,7 +101,7 @@ func InstallTraefikProxy(ctx context.Context, t *testing.T, k8s client.Client) (
assert.NoError(t, err)

LaunchHelmCommand(t, "install", "traefik", "-n", traefikNamespace, "--wait",
"--version", "v33.0.0",
"--version", "v33.1.0",
"--set", "ingressClass.enabled=false",
"--set", "ingressRoute.dashboard.enabled=true",
"--set", "ingressRoute.dashboard.matchRule='Host(`dashboard.docker.localhost`)'",
Expand All @@ -125,15 +125,15 @@ func InstallTraefikHubAPIGW(ctx context.Context, t *testing.T, k8s client.Client

CreateSecretForTraefikHub(ctx, t, k8s)
LaunchHelmCommand(t, "install", "traefik", "-n", traefikNamespace, "--wait",
"--version", "v33.0.0",
"--version", "v33.1.0",
"--set", "hub.token=traefik-hub-license",
"--set", "ingressClass.enabled=false",
"--set", "ingressRoute.dashboard.enabled=true",
"--set", "ingressRoute.dashboard.matchRule='Host(`dashboard.docker.localhost`)'",
"--set", "ingressRoute.dashboard.entryPoints={web}",
"--set", "image.registry=ghcr.io",
"--set", "image.repository=traefik/traefik-hub",
"--set", "image.tag=v3.7.0",
"--set", "image.tag=v3.8.0",
"--set", "ports.web.nodePort=30000",
"--set", "ports.websecure.nodePort=30001",
"traefik/traefik")
Expand All @@ -153,7 +153,7 @@ func InstallTraefikHubAPIM(ctx context.Context, t *testing.T, k8s client.Client)

CreateSecretForTraefikHub(ctx, t, k8s)
LaunchHelmCommand(t, "install", "traefik", "-n", traefikNamespace, "--wait",
"--version", "v33.0.0",
"--version", "v33.1.0",
"--set", "hub.token=traefik-hub-license",
"--set", "hub.apimanagement.enabled=true",
"--set", "ingressClass.enabled=false",
Expand All @@ -162,7 +162,7 @@ func InstallTraefikHubAPIM(ctx context.Context, t *testing.T, k8s client.Client)
"--set", "ingressRoute.dashboard.entryPoints={web}",
"--set", "image.registry=ghcr.io",
"--set", "image.repository=traefik/traefik-hub",
"--set", "image.tag=v3.7.0",
"--set", "image.tag=v3.8.0",
"--set", "ports.web.nodePort=30000",
"--set", "ports.websecure.nodePort=30001",
"traefik/traefik")
Expand Down
6 changes: 3 additions & 3 deletions tests/walkthrough/walkthrough_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ func (s *WalkthroughTestSuite) TestWalkthrough() {
// STEP 2
testhelpers.CreateSecretForTraefikHub(s.ctx, s.T(), s.k8s)
testhelpers.LaunchHelmCommand(s.T(), "upgrade", "traefik", "-n", "traefik", "--wait",
"--version", "v33.0.0",
"--version", "v33.1.0",
"--reuse-values",
"--set", "hub.token=traefik-hub-license",
"--set", "image.registry=ghcr.io",
"--set", "image.repository=traefik/traefik-hub",
"--set", "image.tag=v3.7.0",
"--set", "image.tag=v3.8.0",
"traefik/traefik")

req, err = http.NewRequest(http.MethodGet, "http://walkthrough.docker.localhost/basic-auth/weather", nil)
Expand All @@ -150,7 +150,7 @@ func (s *WalkthroughTestSuite) TestWalkthrough() {

// STEP 3
testhelpers.LaunchHelmCommand(s.T(), "upgrade", "traefik", "-n", "traefik", "--wait",
"--version", "v33.0.0",
"--version", "v33.1.0",
"--reuse-values",
"--set", "hub.apimanagement.enabled=true",
"traefik/traefik")
Expand Down