Skip to content

Commit

Permalink
Parameterize Proxy Base URL (#12)
Browse files Browse the repository at this point in the history
This adds `geoserver_proxy_base_url` in values.yaml, allowing to inject
the GeoServer Proxy Base URL.
  • Loading branch information
camuffo authored Sep 20, 2023
1 parent 9cf8b74 commit 0d20bd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion geoserver/latest/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
- name: PLUGIN_DYNAMIC_URLS
value: "{{ .Values.geoserver.plugins }}"
{{- end }}
{{- if .Values.geoserver.geoserver_proxy_base_url }}
- name: PROXY_BASE_URL
value: "{{ .Values.geoserver.geoserver_proxy_base_url }}"
{{- end }}
{{- if .Values.geoserver.geoserver_log_location }}
- name: GEOSERVER_LOG_LOCATION
value: "{{ .Values.geoserver.geoserver_log_location }}"
Expand Down Expand Up @@ -137,7 +141,8 @@ spec:
\ -Dorg.geotools.coverage.jaiext.enabled=\"$(JAI_EXT_ENABLED)\" -DGEOSERVER_LOG_LOCATION=\"$(GEOSERVER_LOG_LOCATION)\" -DGEOWEBCACHE_CONFIG_DIR=\"$(GEOWEBCACHE_CONFIG_DIR)\"
\ -DGEOWEBCACHE_CACHE_DIR=$(GEOWEBCACHE_CACHE_DIR) -DNETCDF_DATA_DIR=$(NETCDF_DATA_DIR) -DGRIB_CACHE_DIR=$(GRIB_CACHE_DIR) -DGEOSERVER_CSRF_DISABLED=$(GEOSERVER_CSRF_DISABLED)\"
\ -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$(GEOSERVER_HEAP_DUMP_DIR)/$(POD_HOSTNAME).hprof -DGEOSERVER_DATA_DIR=$(GEOSERVER_DATA_DIR)\"
\ -DGEOSERVER_AUDIT_PATH=$\"(GEOSERVER_AUDIT_PATH)\" -Dpod.hostname=\"$(POD_HOSTNAME)\""
\ -DGEOSERVER_AUDIT_PATH=$\"(GEOSERVER_AUDIT_PATH)\" -Dpod.hostname=\"$(POD_HOSTNAME)\"
\ -DALLOW_ENV_PARAMETRIZATION=true -DPROXY_BASE_URL='$(PROXY_BASE_URL)'"
ports:
- name: http
containerPort: 8080
Expand Down
1 change: 1 addition & 0 deletions geoserver/latest/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ geoserver:
# to enable audit logging once the pod is deployed go inside the geoserver pod and configure it in the datadir according to doc:
# https://docs.geoserver.org/latest/en/user/extensions/monitoring/audit.html
plugins: ""
geoserver_proxy_base_url: "${X-Forwarded-Proto}://${X-Forwarded-Host}/geoserver"
geoserver_log_location: "/var/geoserver/logs/$(POD_HOSTNAME).log"
geoserver_audit_path: "/var/geoserver/audits"
geoserver_heap_dump_dir: "/var/geoserver/memory_dumps"
Expand Down

0 comments on commit 0d20bd1

Please sign in to comment.