Fix conf for minikube (#301)
* Bump up a Spilo version to use Patroni >= v1.4.4 ; this fixes issues with k8s 1.10 API changes * Bump up an operator version to use the new 'etcd_host' default value * Re-use 'zalando-postgres-operator' as a pod service account and add extra RBAC permissions to make it work * Document in quickstart connecting to Postgres via psql
This commit is contained in:
parent
1352c4a5e2
commit
9c86f8bd96
11
README.md
11
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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue