Skip to content

Commit

Permalink
[Part of #177] Feature: refector nginx deployment (#195)
Browse files Browse the repository at this point in the history
* [Part of #177] Feature: refector nginx deployment
  • Loading branch information
mwallschlaeger authored Oct 17, 2024
1 parent 2a1131d commit daff4b9
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion charts/geonode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
35 changes: 19 additions & 16 deletions charts/geonode/templates/nginx/nginx-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/ {
Expand Down Expand Up @@ -119,7 +106,23 @@ data:
proxy_http_version 1.1;
}

{{ if .Values.pycsw.enabled }}

{{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 }} {
client_max_body_size {{ .Values.nginx.maxClientBodySize }};
Expand All @@ -142,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 }}
location / {
client_max_body_size {{ .Values.nginx.maxClientBodySize }};

Expand Down
20 changes: 18 additions & 2 deletions charts/geonode/templates/nginx/nginx-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

---

Expand Down
8 changes: 3 additions & 5 deletions charts/geonode/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -564,7 +562,7 @@ pycsw:
# ogc_schemas_base=
# federatedcatalogues=
# pretty_print=
gzip_compresslevel=1
gzip_compresslevel=0
# domainquerytype=
# domaincounts=
# spatial_ranking=
Expand Down

0 comments on commit daff4b9

Please sign in to comment.