refactor: migrate from ingress-nginx to Traefik v3
Replace ingress-nginx 4.15.1 with Traefik v3 (Helm chart 39.0.7) as the ingress controller for the local kind cluster. - Replace k8s/nginx/ with k8s/traefik/ (Helm chart, values, namespace) - Update setup script selectors and namespace references - Convert nginx upstream-vhost annotations to Traefik Middleware CRDs - Update ingressClassName from nginx to traefik Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,9 +24,9 @@ kind: Ingress
|
||||
metadata:
|
||||
name: frontend
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/upstream-vhost: "localhost:3300"
|
||||
traefik.ingress.kubernetes.io/router.middlewares: default-frontend-host@kubernetescrd
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
ingressClassName: traefik
|
||||
tls:
|
||||
- hosts:
|
||||
- staging-shiny.unbound.se
|
||||
@@ -59,9 +59,9 @@ kind: Ingress
|
||||
metadata:
|
||||
name: api
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/upstream-vhost: "localhost:4444"
|
||||
traefik.ingress.kubernetes.io/router.middlewares: default-api-host@kubernetescrd
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
ingressClassName: traefik
|
||||
tls:
|
||||
- hosts:
|
||||
- staging-shiny-api.unbound.se
|
||||
@@ -77,3 +77,21 @@ spec:
|
||||
name: api-external
|
||||
port:
|
||||
number: 4444
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: frontend-host
|
||||
spec:
|
||||
headers:
|
||||
customRequestHeaders:
|
||||
Host: "localhost:3300"
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: api-host
|
||||
spec:
|
||||
headers:
|
||||
customRequestHeaders:
|
||||
Host: "localhost:4444"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespaces.yaml
|
||||
helmCharts:
|
||||
- name: ingress-nginx
|
||||
namespace: ingress-nginx
|
||||
includeCRDs: true
|
||||
releaseName: ingress-nginx
|
||||
repo: https://kubernetes.github.io/ingress-nginx
|
||||
version: 4.15.1
|
||||
valuesFile: https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/hack/manifest-templates/provider/kind/values.yaml
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespaces.yaml
|
||||
helmCharts:
|
||||
- name: traefik
|
||||
namespace: traefik
|
||||
includeCRDs: true
|
||||
releaseName: traefik
|
||||
repo: https://traefik.github.io/charts
|
||||
version: 39.0.7
|
||||
valuesFile: values.yaml
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: traefik
|
||||
Reference in New Issue
Block a user