new way of trafik redirect
This commit is contained in:
parent
581577ea2d
commit
09a471d5e5
4 changed files with 12 additions and 1 deletions
|
@ -11,7 +11,8 @@
|
||||||
[(yaml/load-resource "gitea/volumes.yaml")
|
[(yaml/load-resource "gitea/volumes.yaml")
|
||||||
(yaml/load-resource "gitea/appini-configmap.yaml")
|
(yaml/load-resource "gitea/appini-configmap.yaml")
|
||||||
(yaml/load-resource "gitea/deployment.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
|
(map yaml/to-string
|
||||||
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})
|
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
"gitea/certificate.yaml" (rc/inline "gitea/certificate.yaml")
|
"gitea/certificate.yaml" (rc/inline "gitea/certificate.yaml")
|
||||||
"gitea/ingress.yaml" (rc/inline "gitea/ingress.yaml")
|
"gitea/ingress.yaml" (rc/inline "gitea/ingress.yaml")
|
||||||
"gitea/services.yaml" (rc/inline "gitea/services.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")
|
"gitea/volumes.yaml" (rc/inline "gitea/volumes.yaml")
|
||||||
(throw (js/Error. "Undefined Resource!")))))
|
(throw (js/Error. "Undefined Resource!")))))
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ metadata:
|
||||||
namespace: default
|
namespace: default
|
||||||
annotations:
|
annotations:
|
||||||
ingress.kubernetes.io/ssl-redirect: "true"
|
ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
|
traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd
|
||||||
spec:
|
spec:
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
|
|
8
src/main/resources/gitea/traefik-middleware.yaml
Normal file
8
src/main/resources/gitea/traefik-middleware.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: redirect-https
|
||||||
|
spec:
|
||||||
|
redirectScheme:
|
||||||
|
scheme: https
|
||||||
|
permanent: true
|
Loading…
Reference in a new issue