Skip to content
Snippets Groups Projects
Commit 20f3ae3f authored by Tim Kreuzer's avatar Tim Kreuzer
Browse files

Merge branch 'postgres' of gitlab.jsc.fz-juelich.de:kaas/fleet-deployments into postgres

parents 56c114ea d8b51af4
Branches
Tags
No related merge requests found
# Requirements
```
PASSWD1=$(uuidgen)
PASSWD2=$(uuidgen)
PASSWD3=$(uuidgen)
kubectl -n database create secret generic --from-literal=password=${PASSWD1} --from-literal=postgres-password=${PASSWD2} --from-literal=repmgr-password=${PASSWD3} postgresql-auth
```
# Create User + Database
```
$ NEWUSERNAME="newuser"
$ NEWPASSWORD=$(uuidgen)
$ NEWDATABASE="newdatabase"
$ kubectl -n database create secret generic --from-literal=username=${NEWUSERNAME} --from-literal=password=${NEWPASSWORD} --from-literal=database=${NEWDATABASE} user-${NEWUSERNAME}
$ kubectl -n database run postgresql-client --rm -i --tty --image alpine:3.18 --env="PGPASSWORD=${PASSWD2}" --env="NEWUSERNAME=${NEWUSERNAME}" --env="NEWDATABASE=${NEWDATABASE}" --env="NEWPASSWORD=${NEWPASSWORD}" -- /bin/sh
# / apk add postgresql12-client
# / psql -h postgresql.database.svc -U postgres -c "CREATE USER \"${NEWUSERNAME}\" WITH ENCRYPTED PASSWORD '${NEWPASSWORD}';"
# / psql -h postgresql.database.svc -U postgres -c "CREATE DATABASE \"${NEWDATABASE}\" OWNER \"${NEWUSERNAME}\";"
```
......@@ -7,7 +7,5 @@ helm:
values:
service:
type: ClusterIP
nodeSelector:
worker: "true"
dependsOn:
- name: postgres
......@@ -3,13 +3,10 @@ helm:
releaseName: postgresql
repo: https://charts.bitnami.com/bitnami
chart: postgresql
version: 12.11.1
version: 12.12.4
values:
auth:
existingSecret: "postgresql-auth"
primary:
nodeSelector:
worker: "true"
targetCustomizations:
- name: istio
clusterSelector:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment