Commit Graph

893 Commits

Author SHA1 Message Date
Sergey Dudoladov 57deeef7b1 Revert "improve cdp build"
This reverts commit e2a8fa12aa.
2020-04-29 09:20:20 +02:00
Sergey Dudoladov ac56e7426f dont run unit before e2e tests 2020-04-29 08:38:11 +02:00
Sergey Dudoladov e2a8fa12aa improve cdp build 2020-04-29 08:30:37 +02:00
Sergey Dudoladov 93ee2cee58 Revert "remove conflicting dependency"
This reverts commit 65fc09054b.
2020-04-29 07:44:22 +02:00
Felix Kunde 13022fd6ca merge with master and update image in e2e test 2020-04-28 17:28:56 +02:00
Felix Kunde 1d009d9595
bump spilo and pooler version + update docs (#945) 2020-04-28 16:01:13 +02:00
Sergey Dudoladov 65fc09054b remove conflicting dependency 2020-04-28 12:02:28 +02:00
Sergey Dudoladov 496a5bf3b7 run unit tests before e2e 2020-04-28 11:55:28 +02:00
Sergey Dudoladov d965854121 Merge branch 'master' into lazy-update 2020-04-28 11:50:17 +02:00
Sergey Dudoladov 0ca30ba3d9
fix params in function call (#939)
Co-authored-by: Sergey Dudoladov <sergey.dudoladov@zalando.de>
2020-04-28 09:31:41 +02:00
Sergey Dudoladov 9d64f6d644 resolve conflicts 2020-04-28 08:12:19 +02:00
Björn Fischer 168abfe37b
Fully speced global sidecars (#890)
* implement fully speced global sidecars

* fix issue #924
2020-04-27 17:40:22 +02:00
siku4 f32c615a53
fix typo in additionalVolume struct (#933)
* fix typo in additionalVolume struct

Co-authored-by: siku4 <sk@sik-net.de>
2020-04-27 12:22:42 +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
Christian Rohmann 21b9b6fcbe
Emit K8S events to the postgresql CR as feedback to the requestor / user (#896)
* Add EventsGetter to KubeClient to enable to sending K8S events

* Add eventRecorder to the controller, initialize it and hand it down to cluster via its constructor to enable it to emit events this way

* Add first set of events which then go to the postgresql custom resource the user interacts with to provide some feedback

* Add right to "create" events to operator cluster role

* Adapt cluster tests to new function sigurature with eventRecord (via NewFakeRecorder)

* Get a proper reference before sending events to a resource

Co-authored-by: Christian Rohmann <christian.rohmann@inovex.de>
2020-04-27 08:22:07 +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
ReSearchITEng 5014eebfb2
when kubernetes_use_configmaps -> skip further endpoints actions even delete (#921)
* further compatibility with k8sUseConfigMaps - skip further endpoints related actions

* Update pkg/cluster/cluster.go

thanks!

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Update pkg/cluster/cluster.go

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Update pkg/cluster/cluster.go

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-04-16 16:47:59 +02:00
Dmitry Dolgov 6a689cdc1c
Prevent empty syncs (#922)
There is a possibility to pass nil as one of the specs and an empty spec
into syncConnectionPooler. In this case it will perfom a syncronization
because nil != empty struct. Avoid such cases and make it testable by
returning list of syncronization reasons on top together with the final
error.
2020-04-16 15:14:31 +02:00
Felix Kunde c48128cbcb fix cluster name label in e2e test 2020-04-16 12:43:23 +02:00
ReSearchITEng 7e8f6687eb
make tls pr798 use additionalVolumes capability from pr736 (#920)
* make tls pr798 use additionalVolumes capability from pr736

* move the volume* sections lower

* update helm chart crds and docs

* fix user.md typos
2020-04-15 15:24:55 +02:00
Thierry Sallé ea3eef45d9
Additional volumes capability (#736)
* Allow additional Volumes to be mounted

* added TargetContainers option to determine if additional volume need to be mounter or not

* fixed dependencies

* updated manifest additional volume example

* More validation

Check that there are no volume mount path clashes or "all" vs ["a", "b"]
mixtures. Also change the default behaviour to mount to "postgres"
container.

* More documentation / example about additional volumes

* Revert go.sum and go.mod from origin/master

* Declare addictionalVolume specs in CRDs

* fixed k8sres after rebase

* resolv conflict

Co-authored-by: Dmitrii Dolgov <9erthalion6@gmail.com>
Co-authored-by: Thierry <thierry@malt.com>
2020-04-15 09:13:35 +02:00
Dmitry Dolgov a1f2bd05b9
Prevent superuser from being a connection pool user (#906)
* Protected and system users can't be a connection pool user

It's not supported, neither it's a best practice. Also fix potential null
pointer access. For protected users it makes sense by intent of protecting this
users (e.g. from being overriden or used as something else than supposed). For
system users the reason is the same as for superuser, it's about replicastion
user and it's under patroni control.

This is implemented on both levels, operator config and postgresql manifest.
For the latter we just use default name in this case, assuming that operator
config is always correct. For the former, since it's a serious
misconfiguration, operator panics.
2020-04-09 09:21:45 +02:00
ReSearchITEng 7232326159
Fix val docs (#901)
* missing quotes in pooler configmap in values.yaml

* missing quotes in pooler configmap in values-crd.yaml

* docs clarifications

* helm3 --skip-crds

* Update docs/user.md

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* details moved in docs

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-04-09 09:16:45 +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
Leon Albers 4dee8918bd
Allow configuration of patroni's replication mode (#869)
* Add patroni parameters for `synchronous_mode`

* Update complete-postgres-manifest.yaml, removed quotation marks

* Update k8sres_test.go, adjust result for `Patroni configured`

* Update k8sres_test.go, adjust result for `Patroni configured`

* Update complete-postgres-manifest.yaml, set synchronous mode to false in this example

* Update pkg/cluster/k8sres.go

Does the same but is shorter. So we fix that it if you like.

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Update docs/reference/cluster_manifest.md

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Add patroni's `synchronous_mode_strict`

* Extend `TestGenerateSpiloConfig` with `SynchronousModeStrict`

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-04-06 14:27:17 +02:00
Felix Kunde 64389b8bad
update image and docs for connection pooler (#898) 2020-04-03 16:28:36 +02:00
ReSearchITEng 1249626a60
kubernetes_use_configmap (#887)
* kubernetes_use_configmap

* Update manifests/postgresql-operator-default-configuration.yaml

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Update manifests/configmap.yaml

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Update charts/postgres-operator/values.yaml

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* go.fmt

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-04-02 13:20:45 +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
Felix Kunde e6eb10d28a
fix TestTLS (#894) 2020-04-01 10:31:31 +02:00
ReSearchITEng 6ed1030838
TLS - add OpenShift compatibility (#885)
* solves https://github.com/zalando/postgres-operator/pull/798#issuecomment-605201260
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-04-01 09:39:54 +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 66f2cda87f
Move operator to go 1.14 (#882)
* update go modules march 2020
* update to GO 1.14
* reflect k8s client API changes
2020-03-30 15:50:17 +02:00
Felix Kunde 8f88fe7338
Merge branch 'master' into lazy-update 2020-03-27 09:41:52 +01:00
Felix Kunde ba9cf68650
Change type of pod environment config map to NamespacedName (#870)
* allow PodEnvironmentConfigMap in other namespaces
* update codegen
* update docs and comments
2020-03-25 15:59:31 +01:00