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