save
This commit is contained in:
parent
17c75e160b
commit
4e09c951c2
5 changed files with 16 additions and 17 deletions
3
.github/workflows/k8s_traefik_init_setup.yml
vendored
3
.github/workflows/k8s_traefik_init_setup.yml
vendored
|
|
@ -84,10 +84,9 @@ jobs:
|
||||||
# Install Traefik CRDs (idempotent)
|
# Install Traefik CRDs (idempotent)
|
||||||
- name: Install Traefik CRDs
|
- name: Install Traefik CRDs
|
||||||
run: |
|
run: |
|
||||||
if ! kubectl get crd ingressroutes.traefik.containo.us >/dev/null 2>&1; then
|
if ! kubectl get crd ingressroutes.traefik.io >/dev/null 2>&1; then
|
||||||
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/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
|
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/user-guides/crd-acme/05-tlsoption.yml
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deploy Traefik
|
# Deploy Traefik
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,4 @@ metadata:
|
||||||
name: test-auth
|
name: test-auth
|
||||||
spec:
|
spec:
|
||||||
basicAuth:
|
basicAuth:
|
||||||
secret: authsecret
|
secret: authsecret
|
||||||
namespace: default
|
|
||||||
|
|
@ -46,8 +46,9 @@ spec:
|
||||||
- "--certificatesresolvers.myresolver.acme.httpChallenge.entryPoint=web"
|
- "--certificatesresolvers.myresolver.acme.httpChallenge.entryPoint=web"
|
||||||
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
|
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
|
||||||
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
|
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
|
||||||
- "--entrypoints.websecure.address=:443"
|
|
||||||
- "--providers.kubernetescrd.allowexternalnameservices=true"
|
- "--providers.kubernetescrd.allowexternalnameservices=true"
|
||||||
|
- "--providers.kubernetescrd.allowcrossnamespace=false"
|
||||||
|
- "--providers.kubernetescrd.legacyCRDDisabled=true
|
||||||
env:
|
env:
|
||||||
- name: AWS_ACCESS_KEY_ID
|
- name: AWS_ACCESS_KEY_ID
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ spec:
|
||||||
kind: Rule
|
kind: Rule
|
||||||
middlewares:
|
middlewares:
|
||||||
- name: test-auth
|
- name: test-auth
|
||||||
|
namespace: default
|
||||||
services:
|
services:
|
||||||
- name: traefik
|
- name: traefik
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,17 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: traefik
|
name: traefik
|
||||||
namespace: default
|
namespace: default
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
name: web
|
|
||||||
port: 80
|
|
||||||
- protocol: TCP
|
|
||||||
name: websecure
|
|
||||||
port: 443
|
|
||||||
- protocol: TCP
|
|
||||||
name: admin
|
|
||||||
port: 8080
|
|
||||||
selector:
|
selector:
|
||||||
app: traefik
|
app: traefik
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: web
|
||||||
|
- name: websecure
|
||||||
|
port: 443
|
||||||
|
targetPort: websecure
|
||||||
|
- name: admin
|
||||||
|
port: 8080
|
||||||
|
targetPort: admin
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue