diff --git a/postgresql_cluster/README.md b/postgresql_cluster/README.md new file mode 100644 index 0000000..747a61d --- /dev/null +++ b/postgresql_cluster/README.md @@ -0,0 +1,20 @@ +# Project + +## Install Operator + +1. Add the repository + +```console +helm repo add postgres-operator-charts https://opensource.zalando.com/postgres-operator/charts/postgres-operator +``` + +2. Install operator + +```console +helm install postgres-operator postgres-operator-charts/postgres-operator -f values.yaml +``` + +3. Others + +https://postgres-operator.readthedocs.io/en/latest/quickstart/#helm-chart + diff --git a/postgresql_cluster/k8s-psql.yaml b/postgresql_cluster/k8s-psql.yaml new file mode 100644 index 0000000..f2f4d15 --- /dev/null +++ b/postgresql_cluster/k8s-psql.yaml @@ -0,0 +1,17 @@ +apiVersion: "acid.zalan.do/v1" +kind: postgresql +metadata: + name: myapp-psql-cluster +spec: + volume: + size: 1Gi + numberOfInstances: 2 + users: + psql_admin: # database owner + - superuser + - createdb + psql_user: [] # role for application psql_test + databases: + psql_test: psql_admin # dbname: owner + postgresql: + version: "17" diff --git a/postgresql_cluster/values.yaml b/postgresql_cluster/values.yaml new file mode 100644 index 0000000..e69de29