2019-12-12 16:06:05 +00:00
|
|
|
# Migration: Steps needed between the versions
|
|
|
|
|
|
|
|
## v2.0 to v2.1
|
|
|
|
|
2020-02-26 15:38:06 +00:00
|
|
|
### Kubernetes CRD
|
|
|
|
|
|
|
|
In v2.1, a new Kubernetes CRD called `TraefikService` was added.
|
|
|
|
While updating an installation to v2.1,
|
|
|
|
one should apply that CRD, and update the existing `ClusterRole` definition to allow Traefik to use that CRD.
|
2019-12-12 16:06:05 +00:00
|
|
|
|
|
|
|
To add that CRD and enhance the permissions, following definitions need to be applied to the cluster.
|
|
|
|
|
|
|
|
```yaml tab="TraefikService"
|
|
|
|
apiVersion: apiextensions.k8s.io/v1beta1
|
|
|
|
kind: CustomResourceDefinition
|
|
|
|
metadata:
|
|
|
|
name: traefikservices.traefik.containo.us
|
|
|
|
|
|
|
|
spec:
|
|
|
|
group: traefik.containo.us
|
|
|
|
version: v1alpha1
|
|
|
|
names:
|
|
|
|
kind: TraefikService
|
|
|
|
plural: traefikservices
|
|
|
|
singular: traefikservice
|
|
|
|
scope: Namespaced
|
|
|
|
```
|
|
|
|
|
|
|
|
```yaml tab="ClusterRole"
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
|
|
metadata:
|
|
|
|
name: traefik-ingress-controller
|
|
|
|
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- services
|
|
|
|
- endpoints
|
|
|
|
- secrets
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- extensions
|
|
|
|
resources:
|
|
|
|
- ingresses
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- extensions
|
|
|
|
resources:
|
|
|
|
- ingresses/status
|
|
|
|
verbs:
|
|
|
|
- update
|
|
|
|
- apiGroups:
|
|
|
|
- traefik.containo.us
|
|
|
|
resources:
|
|
|
|
- middlewares
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- traefik.containo.us
|
|
|
|
resources:
|
|
|
|
- ingressroutes
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- traefik.containo.us
|
|
|
|
resources:
|
|
|
|
- ingressroutetcps
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- traefik.containo.us
|
|
|
|
resources:
|
|
|
|
- tlsoptions
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- traefik.containo.us
|
|
|
|
resources:
|
|
|
|
- traefikservices
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
```
|
|
|
|
|
|
|
|
After having both resources applied, Traefik will work properly.
|
2020-03-05 07:18:04 +00:00
|
|
|
|
|
|
|
## v2.1 to v2.2
|
|
|
|
|
|
|
|
### Headers middleware: accessControlAllowOrigin
|
|
|
|
|
|
|
|
`accessControlAllowOrigin` is deprecated.
|
|
|
|
This field will be removed in future 2.x releases.
|
|
|
|
Please configure your allowed origins in `accessControlAllowOriginList` instead.
|