From 4444a525d172270550dcd65c4ef2ad40dca14109 Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Fri, 7 Aug 2020 17:21:25 -0500 Subject: [PATCH] Add forced redirect from HTTP to HTTPS --- admin/README.md | 11 ++++++++++- ci_geosphere-test/values-mapcache.yaml | 2 ++ ci_geosphere-test/values-mapserver.yaml | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/admin/README.md b/admin/README.md index 9d6a451..8607060 100644 --- a/admin/README.md +++ b/admin/README.md @@ -206,4 +206,13 @@ Then we need to make sure our Service definition includes something like: ``` Once this is deployed the certificate should now be used when requesting -the HTTPS version of your service. +the HTTPS version of your service. You may also want to add the following +to force users to be redirected to HTTPS from HTTP requests. This is what +it looks like in the `values.yaml` file, but shows up in the `metadata` +section of the `Ingress` definition. + +```yaml +ingress: + annotations: + ingress.kubernetes.io/force-ssl-redirect: "true" +``` diff --git a/ci_geosphere-test/values-mapcache.yaml b/ci_geosphere-test/values-mapcache.yaml index 9276c0b..35d1d4e 100644 --- a/ci_geosphere-test/values-mapcache.yaml +++ b/ci_geosphere-test/values-mapcache.yaml @@ -14,6 +14,8 @@ seed: overlays: true ingress: enabled: true + annotations: + ingress.kubernetes.io/force-ssl-redirect: "true" hosts: - host: geosphere-test.ssec.wisc.edu paths: ["/mapcache"] diff --git a/ci_geosphere-test/values-mapserver.yaml b/ci_geosphere-test/values-mapserver.yaml index 4b233c8..7d0fafa 100644 --- a/ci_geosphere-test/values-mapserver.yaml +++ b/ci_geosphere-test/values-mapserver.yaml @@ -12,6 +12,8 @@ source: existingClaim: "cspp-geo-geo2grid" ingress: enabled: true + annotations: + ingress.kubernetes.io/force-ssl-redirect: "true" hosts: - host: geosphere-test.ssec.wisc.edu paths: ["/wms", "/wms_times"] -- GitLab