Skip to content

Commit

Permalink
fixed postgresql-ha initDBScript
Browse files Browse the repository at this point in the history
  • Loading branch information
BWibo committed Feb 16, 2023
1 parent 68c12a5 commit 6dfdc39
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
4 changes: 0 additions & 4 deletions helm/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ Kubernetes: `>= 1.23.0`
| nameOverride | string | `""` | Override name |
| nodered.enabled | bool | `true` | Enable/disable Node-RED. |
| postgresql-ha.enabled | bool | `false` | Enable/disable Bitnami PostgreSQL HA database backend. |
| postgresql-ha.postgresql.extraVolumes[0].emptyDir.medium | string | `"Memory"` | |
| postgresql-ha.postgresql.extraVolumes[0].emptyDir.sizeLimit | string | `"512Mi"` | |
| postgresql-ha.postgresql.extraVolumes[0].name | string | `"dshm"` | |
| postgresql-ha.postgresql.initdbScripts."01_installPostgis.sql" | string | `"CREATE EXTENSION if not exists postgis;\nCREATE EXTENSION if not exists postgis_raster;\n"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
16 changes: 13 additions & 3 deletions helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,24 @@ postgresql-ha:
# -- Enable/disable Bitnami PostgreSQL HA database backend.
enabled: false

# @ignored
postgresql:
extraVolumes:
- name: dshm
emptyDir:
medium: Memory
sizeLimit: 512Mi

# @ignored
initdbScripts:
01_installPostgis.sql: |
CREATE EXTENSION if not exists postgis;
CREATE EXTENSION if not exists postgis_raster;
01_createExtensionPostGIS.sh: |
#!/bin/bash
set -e
echo "Initialize FROST-Server database..."
export PGPASSWORD=$POSTGRESQL_POSTGRES_PASSWORD
psql -v ON_ERROR_STOP=1 --dbname "$POSTGRESQL_DATABASE" <<-EOSQL
CREATE EXTENSION if not exists postgis;
CREATE EXTENSION if not exists postgis_raster;
EOSQL
echo "Initialize FROST-Server database...done!"

0 comments on commit 6dfdc39

Please sign in to comment.