-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24a6bc4
commit 1737576
Showing
6 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: postgresql | ||
repository: file://../../external/postgresql | ||
version: 12.1.9 | ||
digest: sha256:e93cc220482fa3bc4716a91f198e34e2de2bb22e0d20655c061f019d12a20559 | ||
generated: "2024-12-16T09:05:31.66774333+01:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v2 | ||
name: radar-postgresql | ||
version: 0.1.0 | ||
appVersion: 11.16.0 | ||
description: PostgreSQL (Postgres) is an open source object-relational database known | ||
for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, | ||
views, triggers and stored procedures. | ||
maintainers: | ||
- email: [email protected] | ||
name: Pim van Nierop | ||
url: https://www.thehyve.nl/experts/pim-van-nierop | ||
dependencies: | ||
- name: postgresql | ||
version: 12.1.9 | ||
repository: file://../../external/postgresql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
|
||
# radar-postgresql | ||
|
||
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 11.16.0](https://img.shields.io/badge/AppVersion-11.16.0-informational?style=flat-square) | ||
|
||
PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures. | ||
|
||
## Maintainers | ||
|
||
| Name | Email | Url | | ||
| ---- | ------ | --- | | ||
| Pim van Nierop | <[email protected]> | <https://www.thehyve.nl/experts/pim-van-nierop> | | ||
|
||
## Requirements | ||
|
||
| Repository | Name | Version | | ||
|------------|------|---------| | ||
| file://../../external/postgresql | postgresql | 12.1.9 | | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| postgresql.image.repository | string | `"bitnami/postgresql"` | | | ||
| postgresql.image.tag | string | `"11.16.0"` | | | ||
| postgresql.global.postgresql.auth.postgresPassword | string | `""` | | | ||
| postgresql.auth.postgresPassword | string | `""` | | | ||
| postgresql.auth.username | string | `""` | | | ||
| postgresql.auth.password | string | `""` | | | ||
| postgresql.auth.database | string | `""` | | | ||
| postgresql.replication.applicationName | string | `"radar"` | | | ||
| postgresql.primary.initdb.scripts."multi-db-init.sh" | string | `"#!/bin/bash\nset -e\nset -u\nexport PGPASSWORD=\"$POSTGRESQL_PASSWORD\"\n\nfunction create_user_and_database() {\n export PGPASSWORD=\"$POSTGRESQL_PASSWORD\"\n local database=$1\n local database_exist=$(psql -U postgres -tAc \"SELECT 1 FROM pg_database WHERE datname='$database';\")\n if [[ \"$database_exist\" == 1 ]]; then\n echo \"Database $database already exists\"\n else\n echo \"Database $database does not exist\"\n echo \" Creating database '$database' for user postgres\"\n psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL\n CREATE DATABASE \"$database\";\n GRANT ALL PRIVILEGES ON DATABASE $database TO postgres;\nEOSQL\n fi\n}\n\nif [ -n \"$POSTGRES_MULTIPLE_DATABASES\" ]; then\n echo \"Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES\"\n for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do\n create_user_and_database $db\n done\n echo \"Databases created\"\nfi\n"` | | | ||
| postgresql.primary.extraEnvVars | list | `[]` | | | ||
| postgresql.primary.podAnnotations."backup.velero.io/backup-volumes" | string | `"data"` | | | ||
| postgresql.primary.podAnnotations."post.hook.backup.velero.io/command" | string | `"[\"/bin/fsfreeze\", \"--unfreeze\", \"/bitnami/postgresql\"]"` | | | ||
| postgresql.primary.podAnnotations."post.hook.backup.velero.io/container" | string | `"fsfreeze"` | | | ||
| postgresql.primary.podAnnotations."pre.hook.backup.velero.io/command" | string | `"[\"/bin/fsfreeze\", \"--freeze\", \"/bitnami/postgresql\"]"` | | | ||
| postgresql.primary.podAnnotations."pre.hook.backup.velero.io/container" | string | `"fsfreeze"` | | | ||
| postgresql.primary.sidecars[0].name | string | `"fsfreeze"` | | | ||
| postgresql.primary.sidecars[0].image | string | `"busybox"` | | | ||
| postgresql.primary.sidecars[0].securityContext.privileged | bool | `true` | | | ||
| postgresql.primary.sidecars[0].volumeMounts[0].mountPath | string | `"/bitnami/postgresql"` | | | ||
| postgresql.primary.sidecars[0].volumeMounts[0].name | string | `"data"` | | | ||
| postgresql.primary.sidecars[0].volumeMounts[0].readOnly | bool | `false` | | | ||
| postgresql.primary.sidecars[0].command[0] | string | `"/bin/sh"` | | | ||
| postgresql.primary.sidecars[0].command[1] | string | `"-c"` | | | ||
| postgresql.primary.sidecars[0].command[2] | string | `"sleep infinity"` | | | ||
| postgresql.primary.persistence.enabled | bool | `true` | | | ||
| postgresql.primary.persistence.existingClaim | string | `""` | | | ||
| postgresql.primary.persistence.mountPath | string | `"/bitnami/postgresql"` | | | ||
| postgresql.primary.persistence.size | string | `"8Gi"` | | | ||
| postgresql.volumePermissions.enabled | bool | `true` | | | ||
| postgresql.metrics.enabled | bool | `true` | | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
postgresql: | ||
image: | ||
repository: bitnami/postgresql | ||
tag: 11.16.0 | ||
global: | ||
postgresql: | ||
auth: | ||
postgresPassword: "" | ||
auth: | ||
postgresPassword: "" | ||
username: "" | ||
password: "" | ||
database: "" | ||
replication: | ||
applicationName: radar | ||
primary: | ||
initdb: | ||
scripts: | ||
multi-db-init.sh: | | ||
#!/bin/bash | ||
set -e | ||
set -u | ||
export PGPASSWORD="$POSTGRESQL_PASSWORD" | ||
function create_user_and_database() { | ||
export PGPASSWORD="$POSTGRESQL_PASSWORD" | ||
local database=$1 | ||
local database_exist=$(psql -U postgres -tAc "SELECT 1 FROM pg_database WHERE datname='$database';") | ||
if [[ "$database_exist" == 1 ]]; then | ||
echo "Database $database already exists" | ||
else | ||
echo "Database $database does not exist" | ||
echo " Creating database '$database' for user postgres" | ||
psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL | ||
CREATE DATABASE "$database"; | ||
GRANT ALL PRIVILEGES ON DATABASE $database TO postgres; | ||
EOSQL | ||
fi | ||
} | ||
if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then | ||
echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES" | ||
for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do | ||
create_user_and_database $db | ||
done | ||
echo "Databases created" | ||
fi | ||
extraEnvVars: [] | ||
podAnnotations: | ||
backup.velero.io/backup-volumes: data | ||
post.hook.backup.velero.io/command: '["/bin/fsfreeze", "--unfreeze", "/bitnami/postgresql"]' | ||
post.hook.backup.velero.io/container: fsfreeze | ||
pre.hook.backup.velero.io/command: '["/bin/fsfreeze", "--freeze", "/bitnami/postgresql"]' | ||
pre.hook.backup.velero.io/container: fsfreeze | ||
sidecars: | ||
- name: fsfreeze | ||
image: busybox | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- mountPath: "/bitnami/postgresql" | ||
name: data | ||
readOnly: false | ||
command: | ||
- "/bin/sh" | ||
- "-c" | ||
- "sleep infinity" | ||
persistence: | ||
enabled: true | ||
existingClaim: "" | ||
mountPath: /bitnami/postgresql | ||
size: 8Gi | ||
volumePermissions: | ||
enabled: true | ||
metrics: | ||
enabled: true |