diff --git a/README.md b/README.md index aa910196a..550856e56 100644 --- a/README.md +++ b/README.md @@ -39,15 +39,22 @@ kubectl create -f manifests/postgres-operator.yaml # deployment # create a Postgres cluster kubectl create -f manifests/minimal-postgres-manifest.yaml +# connect to the Postgres master via psql +# operator creates the relevant k8s secret +export HOST_PORT=$(minikube service acid-minimal-cluster --url | sed 's,.*/,,') +export PGHOST=$(echo $HOST_PORT | cut -d: -f 1) +export PGPORT=$(echo $HOST_PORT | cut -d: -f 2) +export PGPASSWORD=$(kubectl get secret postgres.acid-minimal-cluster.credentials -o 'jsonpath={.data.password}' | base64 -d) +psql -U postgres + # tear down cleanly minikube delete ``` -We have automated these steps for you: +We have automated starting the operator and submitting the `acid-minimal-cluster` for you: ```bash cd postgres-operator ./run_operator_locally.sh -minikube delete ``` ## Scope diff --git a/manifests/configmap.yaml b/manifests/configmap.yaml index dc39936fb..c0295f4ca 100644 --- a/manifests/configmap.yaml +++ b/manifests/configmap.yaml @@ -11,9 +11,9 @@ data: debug_logging: "true" workers: "4" - docker_image: registry.opensource.zalan.do/acid/demospilo-10:1.3-p3 + docker_image: registry.opensource.zalan.do/acid/spilo-cdp-10:1.4-p8 + pod_service_account_name: "zalando-postgres-operator" secret_name_template: '{username}.{cluster}.credentials' - # etcd_host: "" super_username: postgres enable_teams_api: "false" # enable_team_superuser: "false" @@ -28,7 +28,7 @@ data: db_hosted_zone: db.example.com master_dns_name_format: '{cluster}.{team}.staging.{hostedzone}' replica_dns_name_format: '{cluster}-repl.{team}.staging.{hostedzone}' - enable_master_load_balancer: "false" + enable_master_load_balancer: "true" enable_replica_load_balancer: "false" pdb_name_format: "postgres-{cluster}-pdb" diff --git a/manifests/operator-service-account-rbac.yaml b/manifests/operator-service-account-rbac.yaml index e20a2ecd4..2be3cc4d2 100644 --- a/manifests/operator-service-account-rbac.yaml +++ b/manifests/operator-service-account-rbac.yaml @@ -37,6 +37,9 @@ rules: - create - delete - get + - list + - patch + - watch # needed if zalando-postgres-operator account is used for pods as well - apiGroups: - "" resources: @@ -79,6 +82,7 @@ rules: - get - list - watch + - patch - apiGroups: - "" resources: diff --git a/manifests/postgres-operator.yaml b/manifests/postgres-operator.yaml index 54e65210f..e2064a7a5 100644 --- a/manifests/postgres-operator.yaml +++ b/manifests/postgres-operator.yaml @@ -12,7 +12,7 @@ spec: serviceAccountName: zalando-postgres-operator containers: - name: postgres-operator - image: registry.opensource.zalan.do/acid/postgres-operator:4c8dfd7 + image: registry.opensource.zalan.do/acid/postgres-operator:1352c4a5e2f5 imagePullPolicy: IfNotPresent env: # provided additional ENV vars can overwrite individual config map entries diff --git a/run_operator_locally.sh b/run_operator_locally.sh index 8e020c76d..a4cf5f45b 100755 --- a/run_operator_locally.sh +++ b/run_operator_locally.sh @@ -149,7 +149,7 @@ function start_operator(){ local -r cmd="kubectl get crd | grep --quiet 'postgresqls.acid.zalan.do'" retry "$cmd" "$msg " - kubectl create -f manifests/complete-postgres-manifest.yaml + kubectl create -f manifests/minimal-postgres-manifest.yaml }