Commit Graph

751 Commits

Author SHA1 Message Date
Rafia Sabih 4d1c594570 Removing standby from tests
After a dedicated test-case for standby it is not required
in other test cases.
2019-06-20 16:54:14 +02:00
Rafia Sabih 966d21c4b6 Cosmetic changes 2019-06-20 16:35:15 +02:00
Rafia Sabih 147e89797c Adding a separate manifest fro standby cluster 2019-06-20 16:03:31 +02:00
Rafia Sabih e90679c1c7 Avoid error messages in operator logs for syncing
users and databases
2019-06-20 15:21:34 +02:00
Rafia Sabih 6daecf10e4 Merge branch 'master' of https://github.com/zalando/postgres-operator into standby 2019-06-20 15:03:27 +02:00
Rafia Sabih 326b306283 Minor formatiing updates 2019-06-20 14:02:25 +02:00
Rafia Sabih 12458f2d32 Do not sync roles for standby
Standby cluster is streaming from the master and does not require
to create or use databases of it's own. Hence, bypass the creation
of users or databases.

Though the standby cluster would work without this also, but will have
errors in logs, this is to avoid that.
2019-06-20 12:19:00 +02:00
Markus 93bfed3e75 Add secret mount to operator (#535)
* add secret mount to operator
2019-06-19 12:40:49 +02:00
Taehyun Kim 0ed92ed04e add deletecollection verb (#589)
Fixing privileges to execute `patronictl remove`.

You could/should have also just used the operator delete cluster flow (remove manifest). It is not really the plan to use patroni inside a pod to remove a existing cluster.
2019-06-19 10:47:27 +02:00
Felix Kunde 6918394562
Add PDB configuration toggle (#583)
* Don't create an impossible disruption budget for smaller clusters.
* sync PDB also on update
2019-06-18 10:48:21 +02:00
Maxim Ivanov 3553144cda Support subPath in generated container (#452)
* mounted volumes now provide a subPath
2019-06-17 15:49:01 +02:00
Erik Inge Bolsø c65a9baedf specify ReadOnlyRootFilesystem: false for pod security policies (#560)
Explicitly specify ReadOnlyRootFilesystem: false so kubernetes can pick
a less restrictive policy the operator has access to.
2019-06-17 14:03:33 +02:00
Rafia Sabih cd2a713a97 Merge branch 'master' of https://github.com/zalando/postgres-operator into standby 2019-06-17 10:54:21 +02:00
Maxim Ivanov 44acd7e4db Not being able to register CRD is not a fatal error (#444)
Operator proceeds to checking if CRD is present and ready,
and if not, only then it is a fatal error.
2019-06-14 16:08:29 +02:00
Rafia Sabih 9af13ed0df Minor updates
- Remove extra warning message while creating standby
- Limit the number of pods to 1 for standby cluster
2019-06-14 16:01:23 +02:00
Erik Inge Bolsø e1d9395338 rbac: add user-facing clusterroles (#585)
* rbac: add user-facing clusterroles
2019-06-14 15:59:51 +02:00
Erik Inge Bolsø 028b834ea6 postgres-operator deployment template: run operator as non-root, and with readonly filesystem (#582) 2019-06-14 15:47:08 +02:00
Felix Kunde 35a1f2cff8 Add Rafia to code owners (#588) 2019-06-14 14:56:40 +02:00
Erik Inge Bolsø 6fbfee3903 decouple clusterrole name and serviceaccount name (#581)
Decouple clusterrole name and service account name.
2019-06-14 14:24:23 +02:00
teuto.net Netzdienste GmbH bbf28c4df7 Add additional S3 settings for cloning (#497) 2019-06-14 12:28:00 +02:00
Rafia Sabih 14570dbc02 Merge branch 'master' of https://github.com/zalando/postgres-operator into standby 2019-06-14 12:14:17 +02:00
Rafia Sabih 70c0e59cdb Rebase 2019-06-13 16:40:15 +02:00
Rafia Sabih f16f24d3b4 Multiple fixes
- update docs to be more decriptive and cosistent with terminology
- Remove name and uid for the standby cluster
- Error out in case empty wal-path is provided for standby cluster
2019-06-13 12:27:19 +02:00
Erik Inge Bolsø ad5fec9bee docs: add storageclass to complete-postgres-manifest example (#586) 2019-06-11 16:25:02 +02:00
Rafia Sabih 742a43a879 Adding docs and tests 2019-06-07 12:10:07 +02:00
Rafia Sabih 2886027516
Some typos/spelling mistakes fix (#580)
Harmless typos fix.
2019-06-06 14:20:15 +02:00
Sergey Dudoladov 69af2d60e5
Implement runner for e2e tests (#548)
* implement a runner for e2e tests

* move e2e tests to a Docker container

* integrate e2e tests into build pipelines

* add tests for multi-namespace support and logical backup jobs

* @FxKu implement the first e2e test for failovers
2019-06-05 17:07:27 +02:00
Aaron Miller ec5b1d4d58 StatefulSet fsGroup config option to allow non-root spilo (#531)
* StatefulSet fsGroup config option to allow non-root spilo

* Allow Postgres CRD to overide SpiloFSGroup of the Operator.

* Document FSGroup of a Pod cannot be changed after creation.
2019-06-04 16:38:26 +02:00
Felix Kunde 5a0e95ac45
Add CRD configuration to Helm chart values.yaml (#559)
* add templates for CRDs incl. crd-install hooks
* support both config styles in values.yaml
* fix ServiceAccount naming in values.yaml
2019-06-03 14:48:32 +02:00
Erik Inge Bolsø ebda39368e database.go: remove hardcoded .svc.cluster.local dns suffix (#561)
* database.go: substitute hardcoded .svc.cluster.local dns suffix with config parameter

Use the pod's configured dns search path, for clusters where .svc.cluster.local is not correct.
2019-05-31 16:32:00 +02:00
Sergey Dudoladov 3ffc8ac5fa
Sample logical backup image. (#572)
* Sample logical backup image.

Based on the earlier work by Dmitry Dolgov @erthalion
2019-05-31 15:51:58 +02:00
Rafia Sabih e5849873df Cosmetic changes 2019-05-31 10:45:10 +02:00
Erik Inge Bolsø b619569e28 Improve cluster sidecar documentation (#573) 2019-05-27 15:31:52 +02:00
Felix Kunde 24d412a562
generate spilo config can return error (with test) (#570)
* fix: raise explicit error when failing to generate spilo config
Signed-off-by: Stephane Tang <hi@stang.sh>
2019-05-22 17:35:03 +02:00
Rafia Sabih cd829f07f0 Minor fix 2019-05-22 15:21:42 +02:00
Rafia Sabih b36bdbc8ef Function to create required environment variables for standby 2019-05-22 14:43:36 +02:00
Stephane T 1f4267eb05 fix: remove headless service config when deleting cluster (#567)
see: https://github.com/zalando/postgres-operator/issues/566

Signed-off-by: Stephane Tang <hi@stang.sh>
2019-05-21 13:49:34 +02:00
Rafia Sabih 76ce1004ca Rethinking standby cluster
Instead of having a full-fledged standby cluster as in Patroni,
here we need lesser information, viz, S3 path, cluster name and uid.
It is more closer to clone now.
2019-05-20 09:53:42 +02:00
Sergey Dudoladov f3e1e80aaf
Add logical backup (#442)
* Add k8s cron job to spawn logical backups

* Minor doc updates
2019-05-16 15:52:01 +02:00
Rafia Sabih b449dd2429 Bug fix 2019-05-15 09:44:38 +02:00
Sergey Dudoladov 2c02b371e2
fix statefulset sync (#563) 2019-05-14 11:15:47 +02:00
Felix Kunde 4b9e6058e1 add update for CRD to RBAC (#564) 2019-05-13 17:36:15 +02:00
Rafia Sabih 892b2c330e Adding the support for standby cluster 2019-05-10 16:45:47 +02:00
Dmitry Dolgov f29bdaf96a
Override clone s3 bucket path (#487)
Override clone s3 bucket path

Add possibility to use a custom s3 bucket path for cloning a cluster
from an arbitrary bucket (e.g. from another k8s cluster). For that
a new config options is introduced `s3_wal_path`, that should point
to a location that spilo would understand.
2019-05-10 12:52:42 +02:00
Felix Kunde ad0b250b5b
patch CRD on operator update (#558)
* patch existing CRD each time there is an operator update
2019-05-09 12:35:15 +02:00
Felix Kunde 0fbfbb23bb
Use /status subresource instead of plain manifest field (#534)
* turns PostgresStatus type into a struct with field PostgresClusterStatus
* setStatus patch target is now /status subresource
* unmarshalling PostgresStatus takes care of previous status field convention
* new simple bool functions status.Running(), status.Creating()
2019-05-07 12:01:45 +02:00
Felix Kunde 25e02ad755
Minor change to helm section in quickstart guide (#549)
* updated helm section in quickstart
2019-04-24 18:25:57 +02:00
Sergey Dudoladov c1d108a832
Fix CRD-based operator configuration (#541)
* Fix CRD-based operator configuration

* add inherited labels, update docker image
2019-04-15 13:52:38 +02:00
Sergey Dudoladov 32f106990a Fix build (#542)
* bump up golang version
* gcc fix
2019-04-15 11:52:07 +02:00
Felix Kunde 433bd8f500 Add paragraph on how to extend operator configuration in dev docs (#538)
* add paragraph on how to extend operator configuration in dev docs
2019-04-09 11:23:07 +02:00