From 247195deab4e050dd5d94d884e68f310b5dbfca3 Mon Sep 17 00:00:00 2001 From: Rido Akbar Ibrahim Date: Wed, 26 Jan 2022 21:35:05 +0700 Subject: [PATCH] add deployment --- k8s/production/ingress.yaml | 7 ++++--- k8s/production/middleware.yaml | 9 +++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 k8s/production/middleware.yaml diff --git a/k8s/production/ingress.yaml b/k8s/production/ingress.yaml index dcd95d9..e1da8de 100644 --- a/k8s/production/ingress.yaml +++ b/k8s/production/ingress.yaml @@ -6,9 +6,10 @@ metadata: annotations: kubernetes.io/ingress.class: "traefik" cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.middlewares: empatnusabangsa-production-redirect-https@kubernetescrd spec: rules: - - host: "ppob-backend.k3s.bangun-kreatif.com" + - host: "api.wndsolutions.id" http: paths: - pathType: Prefix @@ -20,5 +21,5 @@ spec: number: 5000 tls: - hosts: - - "ppob-backend.k3s.bangun-kreatif.com" - secretName: ppob-backend-k3s-bangun-kreatif-com-tls + - "api.wndsolutions.id" + secretName: api-wndsolutions-id-tls diff --git a/k8s/production/middleware.yaml b/k8s/production/middleware.yaml new file mode 100644 index 0000000..84327d6 --- /dev/null +++ b/k8s/production/middleware.yaml @@ -0,0 +1,9 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: redirect-https + namespace: empatnusabangsa-production +spec: + redirectScheme: + scheme: https + permanent: true \ No newline at end of file