Commit Graph

43 Commits

Author SHA1 Message Date
Felix Kunde 13022fd6ca merge with master and update image in e2e test 2020-04-28 17:28:56 +02:00
Sergey Dudoladov 496a5bf3b7 run unit tests before e2e 2020-04-28 11:55:28 +02:00
Sergey Dudoladov 0aee1e3148 fix e2e test 2020-04-27 11:47:11 +02:00
Sergey Dudoladov f6804fd4f6 Merge branch 'master' into lazy-update 2020-04-27 09:00:12 +02:00
Felix Kunde 632d50c904 add comma 2020-04-20 15:16:23 +02:00
Sergey Dudoladov 3c91bdeffa
Re-create pods only if all replicas are running (#903)
* adds a Get call to Patroni interface to fetch state of a Patroni member
* postpones re-creating pods if at least one replica is currently being created  

Co-authored-by: Sergey Dudoladov <sergey.dudoladov@zalando.de>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-04-20 15:14:11 +02:00
Felix Kunde 04a67641ab subsequent updates of config 2020-04-20 15:05:05 +02:00
Felix Kunde 2c194e7a74 raise timeout, comment other tests 2020-04-20 11:02:04 +02:00
Felix Kunde 487ebbb96e print pod name in error msg 2 2020-04-18 17:14:15 +02:00
Felix Kunde 77211e736a print pod name in error msg 2020-04-18 14:51:22 +02:00
Felix Kunde 5b18d23f64 lets wait for another 30m 2020-04-17 23:38:45 +02:00
Felix Kunde 356bc5fafc fix e2e with a vengeance 2020-04-17 22:22:20 +02:00
Felix Kunde eb8e8c3b79 fix e2e 2020-04-17 21:41:04 +02:00
Felix Kunde 7a1f16f9a8 delete replica pod for lazy update test 2020-04-17 15:32:50 +02:00
Felix Kunde 2ae6d34cbb use available spilo image 2020-04-17 10:19:24 +02:00
Felix Kunde 3548297188 load spilo test image 2020-04-17 10:06:21 +02:00
Felix Kunde 5b628e7e5f raise test timeout 2020-04-17 09:23:15 +02:00
Felix Kunde c48128cbcb fix cluster name label in e2e test 2020-04-16 12:43:23 +02:00
Sergey Dudoladov aa12d6cf04 fix bug in e2e tests 2020-04-08 10:24:29 +02:00
Sergey Dudoladov 19043a4072 Merge branch 'master' into lazy-update 2020-04-08 06:22:01 +02:00
Felix Kunde b43b22dfcc
Call me pooler, not pool (#883)
* rename pooler parts and add example to manifest
* update codegen
* fix manifest and add more details to docs
* reflect renaming also in e2e tests
2020-04-01 10:34:03 +02:00
Sergey Dudoladov 617c2a2191 address review 2020-03-31 17:54:41 +02:00
Sergey Dudoladov 901901fb05 Merge branch 'master' into lazy-update 2020-03-31 14:38:30 +02:00
Felix Kunde 64d816c556
add short sleep before redistributing pods (#891) 2020-03-31 11:47:39 +02:00
Felix Kunde 8f88fe7338
Merge branch 'master' into lazy-update 2020-03-27 09:41:52 +01:00
Dmitry Dolgov 9dfa433363
Connection pooler (#799)
Connection pooler support

Add support for a connection pooler. The idea is to make it generic enough to
be able to switch between different implementations (e.g. pgbouncer or
odyssey). Operator needs to create a deployment with pooler and a service for
it to access.

For connection pool to work properly, a database needs to be prepared by
operator, namely a separate user have to be created with an access to an
installed lookup function (to fetch credential for other users).

This setups is supposed to be used only by robot/application users. Usually a
connection pool implementation is more CPU bounded, so it makes sense to create
several pods for connection pool with more emphasize on cpu resources. At the
moment there are no special affinity or tolerations assigned to bring those
pods closer to the database. For availability purposes minimal number of
connection pool pods is 2, ideally they have to be distributed between
different nodes/AZ, but it's not enforced in the operator itself. Available
configuration supposed to be ergonomic and in the normal case require minimum
changes to a manifest to enable connection pool. To have more control over the
configuration and functionality on the pool side one can customize the
corresponding docker image.

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-03-25 12:57:26 +01:00
Felix Kunde 07c5da35e3
fix minor issues in docs and manifests (#866)
* fix minor issues in docs and manifests
* double retry_timeout_sec
2020-03-18 15:02:13 +01:00
Felix Kunde cde61f3f0b
e2e: wait for pods after disabling anti affinity (#862) 2020-03-11 14:08:54 +01:00
Sergey Dudoladov f782181fd4 make parameter name more descriptive 2020-03-10 13:29:31 +01:00
Sergey Dudoladov dd10127e5d merge commit 2020-03-10 12:17:13 +01:00
Sergey Dudoladov e9486f8325 initial implementation 2020-03-09 15:47:57 +01:00
Felix Kunde ae2a38d62a
add e2e test for node readiness label (#846)
* add e2e test for node readiness label
* refactoring and order tests alphabetically
* always wait for replica after failover
2020-03-06 12:55:34 +01:00
Felix Kunde 742d7334a1
use cluster-name as default label everywhere (#782)
* use cluster-name as default label everywhere
* fix e2e test
2020-02-19 15:01:01 +01:00
Felix Kunde 3b10dc645d
patch/update services on type change (#824)
* use Update when disabling LoadBalancer + added e2e test
2020-02-13 16:24:15 +01:00
Jonathan Juares Beber 744c71d16b
Allow services update when changing annotations (#818)
The current implementations for `pkg.util.k8sutil.SameService` considers
only service annotations change on the default annotations created by the
operator. Custom annotations are not compared and consequently not
applied after the first service creation.

This commit introduces a complete annotations comparison between the
current service created by the operator and the new one generated based on
the configs. Also, it adds tests on the above-mentioned function.
2020-02-13 10:55:30 +01:00
Felix Kunde be6c8cd573
specify cluster in e2e taint test (#823) 2020-02-10 16:41:51 +01:00
Jonathan Juares Beber ba60e15d07 Add ServiceAnnotations cluster config (#803)
The [operator parameters][1] already support the
`custom_service_annotations` config.With this parameter is possible to
define custom annotations that will be used on the services created by the
operator. The `custom_service_annotations` as all the other
[operator parameters][1] are defined on the operator level and do not allow
customization on the cluster level. A cluster may require different service
annotations, as for example, set up different cloud load balancers
timeouts, different ingress annotations, and/or enable more customizable
environments.

This commit introduces a new parameter on the cluster level, called
`serviceAnnotations`, responsible for defining custom annotations just for
the services created by the operator to the specifically defined cluster.
It allows a mix of configuration between `custom_service_annotations` and
`serviceAnnotations` where the latest one will have priority. In order to
allow custom service annotations to be used on services without
LoadBalancers (as for example, service mesh services annotations) both
`custom_service_annotations` and `serviceAnnotations` are applied
independently of load-balancing configuration. For retro-compatibility
purposes, `custom_service_annotations` is still under
[Load balancer related options][2]. The two default annotations when using
LoadBalancer services, `external-dns.alpha.kubernetes.io/hostname` and
`service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout` are
still defined by the operator.
`service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout` can
be overridden by `custom_service_annotations` or `serviceAnnotations`,
allowing a more customizable environment.
`external-dns.alpha.kubernetes.io/hostname` can not be overridden once
there is no differentiation between custom service annotations for
replicas and masters.

It updates the documentation and creates the necessary unit and e2e
tests to the above-described feature too.

[1]: https://github.com/zalando/postgres-operator/blob/master/docs/reference/operator_parameters.md
[2]: https://github.com/zalando/postgres-operator/blob/master/docs/reference/operator_parameters.md#load-balancer-related-options
2020-02-10 12:03:25 +01:00
Felix Kunde 1f0312a014
make minimum limits boundaries configurable (#808)
* make minimum limits boundaries configurable
* add e2e test
2020-02-03 11:43:18 +01:00
Felix Kunde 107334fe71
Add global option to enable/disable init containers and sidecars (#478)
* Add global option to enable/disable init containers and sidecars
* update dependencies
2019-12-10 15:45:54 +01:00
Felix Kunde 5515640111
install kind as GO module (#742)
* install kind as GO modules
* no need to set KIND_PATH
2019-11-28 17:39:25 +01:00
Sergey Dudoladov cf97ebb2b8 fix e2e tests (#672)
* fix e2e tests
* change Spilo version everywhere
2019-09-23 17:48:53 +02:00
Felix Kunde cd350a4bc1
make run.sh executable from within e2e (#619) 2019-07-24 15:07:32 +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