Skip to content

Commit

Permalink
Merge pull request #87 from cyberops7/traefik-3
Browse files Browse the repository at this point in the history
Traefik v3 requires updating the CRDs API group version
  • Loading branch information
JamesTurland authored May 3, 2024
2 parents 916df74 + d86eb06 commit 69bb566
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: default-headers
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/Create-manifest-helm/Portainer/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: portainer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: default-headers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: wg-easy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRouteUDP
metadata:
name: wg-easy
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/CrowdSec/Bouncer/bouncer-middleware.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: bouncer
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/GitOps/Gotify/default-headers.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: default-headers
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/GitOps/Gotify/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: gotify
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/Traefik-External-Service/default-headers.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: default-headers
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/Traefik-External-Service/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: proxmox
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: traefik-dashboard-basicauth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: default-headers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: default-headers
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/Traefik-PiHole/Manifest/PiHole/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: pihole
Expand Down
22 changes: 22 additions & 0 deletions Kubernetes/Traefik-PiHole/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,25 @@
Make sure that you watch the video instructions carefully as you need to amend the files correctly.
YOU CANNOT JUST RUN THIS SCRIPT!
Incorrect use can result in you being locked out of Lets Encrypt for a period of time.

# NOTE FOR TRAEFIK v3 #
Many guides out there (including, until recently, this repo) reference an older version of the Kubernetes CRDs API group.
This older version is [deprecated](https://doc.traefik.io/traefik/master/migration/v2-to-v3/#kubernetes-crds-api-group-traefikcontainous)
as of Traefik v3 (released [29 April 2024](https://github.com/traefik/traefik/releases/tag/v3.0.0)) and must be updated to the new version
in your IngressRoute, Middleware, ServersTransport, etc. yaml manifests for Traefik. Any resources with the deprecated version will not
be recognized by Traefik v3.

Old, deprecated version:
```yaml
apiVersion: traefik.containo.us/v1alpha1
```
New, supported version:
```yaml
apiVersion: traefik.io/v1alpha1
```
This new version is also supported in later releases of Traefik v2, so you can update your Traefik-related manifests
to the new version and apply the updated manifests before upgrading your Traefik deployment.
It may be worth reviewing other v2 to v3 migration notes provided by Traefik:
[Traefik v2 to v3 Migration](https://doc.traefik.io/traefik/master/migration/v2-to-v3/)
4 changes: 2 additions & 2 deletions Unifi-Controller/kubernetes/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: default-headers
Expand All @@ -16,7 +16,7 @@ spec:
customRequestHeaders:
X-Forwarded-Proto: https
---
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: unifi-controller
Expand Down

0 comments on commit 69bb566

Please sign in to comment.