From c891aa054df534e1d687f218ddf04ceb703363bc Mon Sep 17 00:00:00 2001 From: Michael Polidori Date: Thu, 24 Oct 2024 08:15:52 -0400 Subject: [PATCH 1/3] Add API version compatibility to subpath --- .../wri-prod-ingress-fe-internal-admin.yaml | 49 +++++++++++++++++ .../wri-prod-ingress-fe-internal-api.yaml | 52 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml create mode 100644 deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml diff --git a/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml new file mode 100644 index 000000000..99a91ae49 --- /dev/null +++ b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml @@ -0,0 +1,49 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: cert-manager + kubernetes.io/ingress.class: nginx + meta.helm.sh/release-name: dx-helm-wri-prod-release + meta.helm.sh/release-namespace: wri-odp-prod + nginx.ingress.kubernetes.io/configuration-snippet: | + more_set_headers "server: hide"; + more_set_headers "X-Content-Type-Options: nosniff"; + more_set_headers "X-Xss-Protection: 1"; + more_set_headers "Referrer-Policy: origin"; + more_set_headers "Expect-CT: max-age=86400, enforce, report-uri='[reportURL]'"; + more_set_headers "X-Permitted-Cross-Domain-Policies: none"; + nginx.ingress.kubernetes.io/limit-connections: "50" + nginx.ingress.kubernetes.io/limit-rps: "50" + nginx.ingress.kubernetes.io/proxy-body-size: 1000M + nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" + nginx.ingress.kubernetes.io/proxy-read-timeout: "60" + nginx.ingress.kubernetes.io/rewrite-target: /$1 + nginx.ingress.kubernetes.io/use-regex: "true" + labels: + app.kubernetes.io/managed-by: Helm + name: wri-prod-ingress-fe-internal-admin + namespace: wri-odp-prod +spec: + rules: + - host: wri.prod.frontend.datopian.com + http: + paths: + - backend: + service: + name: wri-prod-ckan-svc + port: + number: 80 + path: /private-admin/(.*) + pathType: ImplementationSpecific + - backend: + service: + name: wri-prod-ckan-svc + port: + number: 80 + path: /private-admin + pathType: ImplementationSpecific + tls: + - hosts: + - wri.prod.frontend.datopian.com + secretName: wri.prod.frontend.datopian.com diff --git a/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml new file mode 100644 index 000000000..d41dcb2d9 --- /dev/null +++ b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml @@ -0,0 +1,52 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: cert-manager + kubernetes.io/ingress.class: nginx + meta.helm.sh/release-name: dx-helm-wri-prod-release + meta.helm.sh/release-namespace: wri-odp-prod + nginx.ingress.kubernetes.io/configuration-snippet: | + more_set_headers "server: hide"; + more_set_headers "X-Content-Type-Options: nosniff"; + more_set_headers "X-Xss-Protection: 1"; + more_set_headers "Referrer-Policy: origin"; + more_set_headers "Expect-CT: max-age=86400, enforce, report-uri='[reportURL]'"; + more_set_headers "X-Permitted-Cross-Domain-Policies: none"; + nginx.ingress.kubernetes.io/limit-connections: "50" + nginx.ingress.kubernetes.io/limit-rps: "50" + nginx.ingress.kubernetes.io/proxy-body-size: 1000M + nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" + nginx.ingress.kubernetes.io/proxy-read-timeout: "60" + nginx.ingress.kubernetes.io/rewrite-target: /api/action/$1 + nginx.ingress.kubernetes.io/use-regex: "true" + labels: + app.kubernetes.io/managed-by: Helm + name: wri-prod-ingress-fe-internal-api + namespace: wri-odp-prod +spec: + rules: + - host: wri.prod.frontend.datopian.com + http: + paths: + - backend: + service: + name: wri-prod-ckan-svc + port: + number: 80 + path: /api/action/(.*) + pathType: ImplementationSpecific + - host: wri.prod.frontend.datopian.com + http: + paths: + - backend: + service: + name: wri-prod-ckan-svc + port: + number: 80 + path: /api/3/action/(.*) + pathType: ImplementationSpecific + tls: + - hosts: + - wri.prod.frontend.datopian.com + secretName: wri.prod.frontend.datopian.com From db0c925228c0c8b995707798f171aa4d8e777173 Mon Sep 17 00:00:00 2001 From: Michael Polidori Date: Thu, 24 Oct 2024 08:25:41 -0400 Subject: [PATCH 2/3] Update host name to new domain --- .../templates/wri-prod-ingress-fe-internal-admin.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml index 99a91ae49..a04d6788f 100644 --- a/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml +++ b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-admin.yaml @@ -26,7 +26,7 @@ metadata: namespace: wri-odp-prod spec: rules: - - host: wri.prod.frontend.datopian.com + - host: datasets.wri.org http: paths: - backend: @@ -45,5 +45,5 @@ spec: pathType: ImplementationSpecific tls: - hosts: - - wri.prod.frontend.datopian.com - secretName: wri.prod.frontend.datopian.com + - datasets.wri.org + secretName: datasets.wri.org From 4babd173f2490907aadf8e572c69a6efb1e9fbd9 Mon Sep 17 00:00:00 2001 From: Michael Polidori Date: Thu, 24 Oct 2024 09:15:01 -0400 Subject: [PATCH 3/3] Update host name to new domain --- .../templates/wri-prod-ingress-fe-internal-api.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml index d41dcb2d9..6e9c2adb4 100644 --- a/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml +++ b/deployment/helm-templates/templates/wri-prod-ingress-fe-internal-api.yaml @@ -26,7 +26,7 @@ metadata: namespace: wri-odp-prod spec: rules: - - host: wri.prod.frontend.datopian.com + - host: datasets.wri.org http: paths: - backend: @@ -36,7 +36,7 @@ spec: number: 80 path: /api/action/(.*) pathType: ImplementationSpecific - - host: wri.prod.frontend.datopian.com + - host: datasets.wri.org http: paths: - backend: @@ -48,5 +48,5 @@ spec: pathType: ImplementationSpecific tls: - hosts: - - wri.prod.frontend.datopian.com - secretName: wri.prod.frontend.datopian.com + - datasets.wri.org + secretName: datasets.wri.org