new way of trafik redirect

This commit is contained in:
jerger 2022-07-06 18:25:02 +02:00
parent 581577ea2d
commit 09a471d5e5
4 changed files with 12 additions and 1 deletions

View file

@ -11,7 +11,8 @@
[(yaml/load-resource "gitea/volumes.yaml")
(yaml/load-resource "gitea/appini-configmap.yaml")
(yaml/load-resource "gitea/deployment.yaml")
(yaml/load-resource "gitea/services.yaml")]
(yaml/load-resource "gitea/services.yaml")
(yaml/load-resource "gitea/traefik-middleware.yaml")]
(map yaml/to-string
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})

View file

@ -28,6 +28,7 @@
"gitea/certificate.yaml" (rc/inline "gitea/certificate.yaml")
"gitea/ingress.yaml" (rc/inline "gitea/ingress.yaml")
"gitea/services.yaml" (rc/inline "gitea/services.yaml")
"gitea/traefik-middleware.yaml" (rc/inline "gitea/traefik-middleware.yaml")
"gitea/volumes.yaml" (rc/inline "gitea/volumes.yaml")
(throw (js/Error. "Undefined Resource!")))))

View file

@ -5,6 +5,7 @@ metadata:
namespace: default
annotations:
ingress.kubernetes.io/ssl-redirect: "true"
traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd
spec:
tls:
- hosts:

View file

@ -0,0 +1,8 @@
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: redirect-https
spec:
redirectScheme:
scheme: https
permanent: true