NG: added http -> https redir
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 17s
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 17s
This commit is contained in:
1 parent
99e1818572
commit
690ff2a19c
4 files changed
+55
No files matched your search
@@ -20,6 +20,10 @@ apps:
|
||||
path: k8s-ng/core/cnpg
|
||||
namespace: cnpg-system
|
||||
wave: 1
|
||||
- name: traefik-config
|
||||
path: k8s-ng/core/traefik-config
|
||||
namespace: kube-system
|
||||
wave: 1
|
||||
- name: cert-manager
|
||||
path: k8s-ng/core/cert-manager
|
||||
namespace: cert-manager
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Configuration of the Traefik that ships with k3s.
|
||||
# Ingresses without a router.entrypoints annotation now use only "websecure", so
|
||||
# plain HTTP is redirected to HTTPS by default (see http-redirect.yaml).
|
||||
# To publish an Ingress over plain HTTP add the annotation
|
||||
# traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||
# (or "web,websecure" to serve both without a redirect).
|
||||
apiVersion: helm.cattle.io/v1
|
||||
kind: HelmChartConfig
|
||||
metadata:
|
||||
name: traefik
|
||||
namespace: kube-system
|
||||
spec:
|
||||
valuesContent: |-
|
||||
ports:
|
||||
websecure:
|
||||
asDefault: true
|
||||
@@ -0,0 +1,29 @@
|
||||
# Catch-all on the "web" entrypoint with the lowest priority: every host that has
|
||||
# no explicit HTTP router of its own is redirected to HTTPS.
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: redirect-https
|
||||
namespace: kube-system
|
||||
spec:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: http-redirect
|
||||
namespace: kube-system
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: HostRegexp(`.+`)
|
||||
kind: Rule
|
||||
priority: 1
|
||||
middlewares:
|
||||
- name: redirect-https
|
||||
services:
|
||||
- name: noop@internal
|
||||
kind: TraefikService
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- helmchartconfig.yaml
|
||||
- http-redirect.yaml
|
||||
Reference in new issue
Block a user