Skip to content

Commit

Permalink
feature: add the possibilty to add extra env var and secrets to geose…
Browse files Browse the repository at this point in the history
…rver pod (#204)

* feat: refactor chart to make it compatible with GeoNode projects

* fix: the initial data path changes for geonode project

* fix: case for settings module were inverted

* Revert "fix: case for settings module were inverted"

This reverts commit aeb66af.

* feature: allow to provide custom secrets/env var to geoserver
  • Loading branch information
AlexGacon committed Aug 8, 2024
1 parent 4e87ad9 commit 0b6a91e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/geonode/templates/geoserver/geoserver-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ spec:
secretKeyRef:
name: {{ include "database_geodata_password_secret_key_ref" . }}
key: {{ include "database_geodata_password_key_ref" . }}
{{- with .Values.geoserver.extraPodEnv }}
{{- tpl . $ | nindent 10 }}
{{- end }}

volumeMounts:
- name: "{{ include "persistant_volume_name" . }}"
Expand Down
4 changes: 4 additions & 0 deletions charts/geonode/templates/geoserver/geoserver-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ data:
GEONODE_GEODATABASE: {{ .Values.postgres.geodata_databasename_and_username | quote }}
GEONODE_GEODATABASE_SCHEMA: {{ .Values.postgres.schema | quote }}
FORCE_REINIT: {{ .Values.geoserver.force_reinit | quote }}

{{- with .Values.geoserver.extraConfigMap }}
{{- tpl . $ | nindent 2 }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/geonode/templates/geoserver/geoserver-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ data:
OAUTH2_API_KEY: ""
OAUTH2_CLIENT_ID: {{ .Values.geonode.secret.oauth2.clientId | b64enc}}
OAUTH2_CLIENT_SECRET: {{ .Values.geonode.secret.oauth2.clientSecret | b64enc }}
{{- with .Values.geoserver.secret.extraSecrets }}
{{- tpl . $ | nindent 2 }}
{{- end }}
{{ end }}
16 changes: 16 additions & 0 deletions charts/geonode/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,22 @@ geoserver:
admin_username: admin
# -- geoserver admin password, respect admin_factory_password, if you gonna change the password from not factory password
admin_password: geoserver
# -- additional elements to include in the secret provided to GeoServer, if not using an existing secret
extraSecrets: |
# key_1: value_1

# -- additional elements to include in the config map provided to GeoServer
extraConfigMap: |
# file_1: conf content

# -- Define this for extra GeoServer environment variables
# Format:
# extraPodEnv: |
# - name: KEY_1
# value: "VALUE_1"
# - name: KEY_2
# value: "VALUE_2"
extraPodEnv: |
resources:
requests:
Expand Down

0 comments on commit 0b6a91e

Please sign in to comment.