From d5af1291619496c348ab2230e967a4b96dfd6c2e Mon Sep 17 00:00:00 2001 From: mwallschlaeger Date: Sat, 29 Jun 2024 19:13:17 +0200 Subject: [PATCH 1/2] [Part of #177] Feature: refector nginx deployment --- .../geonode/templates/nginx/nginx-conf.yaml | 31 ++++++++++--------- .../templates/nginx/nginx-ingress.yaml | 20 ++++++++++-- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/charts/geonode/templates/nginx/nginx-conf.yaml b/charts/geonode/templates/nginx/nginx-conf.yaml index f23f726..53a38d9 100644 --- a/charts/geonode/templates/nginx/nginx-conf.yaml +++ b/charts/geonode/templates/nginx/nginx-conf.yaml @@ -51,19 +51,6 @@ data: alias /mnt/volumes/statics/static/img/favicon.ico; } - # GeoServer - location /geoserver { - client_max_body_size {{ .Values.nginx.maxClientBodySize }}; - -{{- if .Values.nginx.external_cors.enabled }} - proxy_set_header Access-Control-Allow-Origin {{ .Values.nginx.external_cors.domain }}; -{{ end }} - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://{{ include "geoserver_pod_name" . }}:{{ .Values.geoserver.port }}; - } # GeoNode location /static/ { @@ -119,6 +106,22 @@ data: proxy_http_version 1.1; } + + {{if (eq .Values.geonode.ingress.enabled false) }} + # GeoServer + location /geoserver { + client_max_body_size {{ .Values.nginx.maxClientBodySize }}; + +{{- if .Values.nginx.external_cors.enabled }} + proxy_set_header Access-Control-Allow-Origin {{ .Values.nginx.external_cors.domain }}; +{{ end }} + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://{{ include "geoserver_pod_name" . }}:{{ .Values.geoserver.port }}; + } + {{ if .Values.pycsw.enabled }} # external PYCSW forward location {{ .Values.pycsw.endpoint }} { @@ -143,7 +146,7 @@ data: proxy_set_header X-Forwarded-Proto $scheme; } {{ end }} - + {{ end }} location / { client_max_body_size {{ .Values.nginx.maxClientBodySize }}; diff --git a/charts/geonode/templates/nginx/nginx-ingress.yaml b/charts/geonode/templates/nginx/nginx-ingress.yaml index 4dd6676..e26accd 100644 --- a/charts/geonode/templates/nginx/nginx-ingress.yaml +++ b/charts/geonode/templates/nginx/nginx-ingress.yaml @@ -26,13 +26,29 @@ spec: - host: {{ .Values.geonode.general.externalDomain }} http: paths: - - pathType: Prefix - path: "/" + - path: "/" + pathType: Prefix backend: service: name: "{{ include "nginx_pod_name" . }}" port: number: 80 + - path: "/geoserver" + pathType: Prefix + backend: + service: + name: "{{ include "geoserver_pod_name" . }}" + port: + number: {{ .Values.geoserver.port }} + {{ if .Values.pycsw.enabled }} + - path: {{ .Values.pycsw.endpoint }} + pathType: Prefix + backend: + service: + name: "{{ include "pycsw_pod_name" . }}" + port: + number: 8000 + {{ end }} --- From 6e0fcaaede3998016b70a8b52ba9affd043e11e0 Mon Sep 17 00:00:00 2001 From: mwallschlaeger Date: Tue, 24 Sep 2024 11:47:28 +0200 Subject: [PATCH 2/2] [Fixes #177] Feature_refector_nginx_deployment_pycsw_geoserver --- charts/geonode/README.md | 2 +- charts/geonode/templates/nginx/nginx-conf.yaml | 8 ++++---- charts/geonode/values.yaml | 8 +++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/charts/geonode/README.md b/charts/geonode/README.md index 43acc04..5a056c2 100644 --- a/charts/geonode/README.md +++ b/charts/geonode/README.md @@ -240,4 +240,4 @@ Helm Chart for Geonode. Supported versions: Geonode: 4.3.0, Geoserver: 2.24.3-v1 | rabbitmq.requests.memory | string | `"1Gi"` | requested memory as in resource.requests.memory (https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/geonode/templates/nginx/nginx-conf.yaml b/charts/geonode/templates/nginx/nginx-conf.yaml index 53a38d9..fe0fd81 100644 --- a/charts/geonode/templates/nginx/nginx-conf.yaml +++ b/charts/geonode/templates/nginx/nginx-conf.yaml @@ -107,7 +107,7 @@ data: } - {{if (eq .Values.geonode.ingress.enabled false) }} +{{if (eq .Values.geonode.ingress.enabled false) }} # GeoServer location /geoserver { client_max_body_size {{ .Values.nginx.maxClientBodySize }}; @@ -122,7 +122,7 @@ data: proxy_pass http://{{ include "geoserver_pod_name" . }}:{{ .Values.geoserver.port }}; } - {{ if .Values.pycsw.enabled }} +{{ if .Values.pycsw.enabled }} # external PYCSW forward location {{ .Values.pycsw.endpoint }} { client_max_body_size {{ .Values.nginx.maxClientBodySize }}; @@ -145,8 +145,8 @@ data: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } - {{ end }} - {{ end }} +{{ end }} +{{ end }} location / { client_max_body_size {{ .Values.nginx.maxClientBodySize }}; diff --git a/charts/geonode/values.yaml b/charts/geonode/values.yaml index 158eebc..9dd4c38 100644 --- a/charts/geonode/values.yaml +++ b/charts/geonode/values.yaml @@ -366,12 +366,10 @@ geoserver: admin_password: geoserver # -- additional elements to include in the secret provided to GeoServer, if not using an existing secret extraSecrets: | -# key_1: value_1 - + # key_1: value_1 # -- additional elements to include in the config map provided to GeoServer extraConfigMap: | -# file_1: conf content - + # file_1: conf content # -- Define this for extra GeoServer environment variables # Format: # extraPodEnv: | @@ -564,7 +562,7 @@ pycsw: # ogc_schemas_base= # federatedcatalogues= # pretty_print= - gzip_compresslevel=1 + gzip_compresslevel=0 # domainquerytype= # domaincounts= # spatial_ranking=