Commit Graph

676 Commits

Author SHA1 Message Date
Maxim Ivanov 3544cc90fa Allow specifying init_containers in Postgres CRD (#445)
* Add support for init_containers
2019-01-29 11:08:44 +01:00
Armin Nesiren 6f6a599c90 Added possibility to add custom annotations to LoadBalancer service. (#461)
* Added possibility to add custom annotations to LoadBalancer service.
2019-01-25 11:35:27 +01:00
Sergey Dudoladov 9c7558816c
Update CODEOWNERS (#458)
add new team member
2019-01-18 15:00:48 +01:00
Maxim Ivanov 8330905ce7 Don't panic if Service for the role was not found (#451) 2019-01-18 13:38:47 +01:00
Maxim Ivanov 1109c861fb Report new Postgres CR error when previously incorrect one is being updated (#449) 2019-01-18 13:36:44 +01:00
Felix Kunde 38f7a3dac6 Minor changes to Admin doc (#455)
Fixing links and small errors
Some homogenization of naming things
Added line breaks in some paragraphs
2019-01-18 12:50:07 +01:00
Sergey Dudoladov 1ac279b8ad
Update CODEOWNERS (#457) 2019-01-18 12:48:44 +01:00
Felix Kunde 2422d72b76 Edited Roles section in User documentation (#454) 2019-01-16 10:59:32 +01:00
Felix Kunde 0921c065e8 Fixed endpoints description for debug API (#453) 2019-01-16 10:50:29 +01:00
Jan Mussler c70905ae8b Modifying some of the logging to be more descriptive. (#440)
* Modifying some of the logging to be more descriptive.
2019-01-08 13:07:36 +01:00
zerg-junior 4b5d3cd121
Fix golint failures
* Fix golint fails based on the original work from  the user u5surf

* Skip installing Docker as CDP now have one pre-installed (repairs builds on CDP)
2019-01-08 13:04:48 +01:00
Arve Knudsen f7058c754d Pass more variables to Spilo container (#437)
Pass KUBERNETES_SCOPE_LABEL, KUBERNETES_ROLE_LABEL and KUBERNETES_LABELS
to spilo container, so that they could be changed. Fix for #411
2019-01-04 13:42:52 +01:00
Jan Mussler 7445678261
bump spilo versions. (#439) 2019-01-04 12:25:38 +01:00
zerg-junior 5cfcc453a9
Update CRD configuration docs and fix the CDP build (#414)
* Update CRD configuration docs

* document resource consumption of the operator

* Add talks by Oleksii
2019-01-02 12:01:47 +01:00
Arve Knudsen 8d766e020c Fix reference to enable_database_access in operator_parameters.md (#435) 2019-01-02 10:31:28 +01:00
zerg-junior c0b0b9a832
[WIP] Add 'admin' option to create role (#425)
* Add 'admin' option to create role

* Fix run_locally_script
2018-12-27 10:14:33 +01:00
zerg-junior 26670408c4
Revert "Unify warnings about unmovable pods (#389)" (#430)
This reverts commit 4fa09e0dcb.

Reason: the reverted commit bloats the logs
2018-12-21 17:39:34 +01:00
zerg-junior 4fa09e0dcb
Unify warnings about unmovable pods (#389)
* Unify warnings about unmovable pods

* Log conditions that prevent master pod migration
2018-12-21 16:44:31 +01:00
Dmitry Dolgov d6e6b00770
Add shm_volume option (#427)
Add possibility to mount a tmpfs volume to /dev/shm to avoid issues like
[this](https://github.com/docker-library/postgres/issues/416). To achieve that
two new options were introduced:

* `enableShmVolume` to PostgreSQL manifest, to specify whether or not mount
this volume per database cluster

* `enable_shm_volume` to operator configuration, to specify whether or not mount
per operator.

The first one, `enableShmVolume` takes precedence to allow us to be more flexible.
2018-12-21 16:22:30 +01:00
Isaev Denis ff5c63ddf1 add .golangci.yml (#422) 2018-11-27 12:00:15 +01:00
Dmitry Dolgov a0e09cd6a6 Add golangci badge (#423)
Since we've connected it, it makes sense also to display the results.
2018-11-27 11:59:59 +01:00
zerg-junior 45c89b3da4
[WIP] Add set_memory_request_to_limit option (#406)
* Add set_memory_request_to_limit option
2018-11-15 14:00:08 +01:00
jens-totemic f25351c36a Make OperatorConfiguration work (#410)
* Fixes # 404
2018-11-13 11:22:07 +01:00
zerg-junior e39915c968
Restore .zappr.yaml (#405)
* Restore .zappr.yaml

* remove approvals as no longer used
2018-11-07 13:06:53 +01:00
zerg-junior 96e3ea9511
Properly overwrite empty allowed source ranges for load balancers (#392)
* Properly overwrite empty allowed source ranges for load balancers
2018-11-06 11:08:45 +01:00
zerg-junior ccaee94a35
Minor improvements (#381)
* Minor improvements

* Document empty list vs null for users without privileges

* Change the wording for null values

* Add talk by Oleksii in Atmosphere
2018-11-06 11:08:13 +01:00
zerg-junior 86ba92ad02
Rename 'permanent_slots' field to 'slots' (#401) 2018-10-31 16:11:28 +01:00
Dmitry Dolgov 78e83308fc API url regexps (#400)
* Make url regexp more flexible, to accept identifier with dashes

* Add few simple tests

* Check also numerics
2018-10-31 14:52:41 +01:00
zerg-junior 1b4181a724
[WIP] Add the ability to configure replications slots in Patroni (#398)
* Add the ability to configure replication slots in Patroni

* Add debugging  to Makefile for CDP builds
2018-10-31 13:10:56 +01:00
Dmitry Dolgov 83dfae2a6d
Editing documentation for cloning
Clear a bit the section about timestamp (from @zalandoAlex)
2018-10-31 11:08:49 +01:00
zerg-junior 9f4a73afb7
Update operator_parameters.md (#379) 2018-09-24 15:43:22 +02:00
zerg-junior 7907f95d2f
Improve reporting about rolling updates (#391) 2018-09-24 11:57:43 +02:00
Noah Kantrowitz 688d252752 Some tweaks to ensure compat with newer Go. (#383) 2018-09-17 10:13:07 +02:00
zerg-junior f9cbed9be9
Clarify what a default values is (#368)
Clarify what a default values is
2018-09-17 10:12:58 +02:00
Noah Kantrowitz 0b75a89920 Fix the casing of github.com/Sirupsen/logrus to match what the project itself uses. (#380)
Dep enforces this.
2018-09-06 10:26:48 +02:00
Noah Kantrowitz a4224f6063 Move CRD definitions into a formal API to allow access from other controllers. (#378) 2018-08-31 11:20:02 +02:00
zerg-junior 25fa45fd58 [WIP] Grant 'superuser' to the members of Postgres admin teams (#371)
Added support for superuser team in addition to the admin team that owns the postgres cluster.
2018-08-30 10:51:37 +02:00
zerg-junior 1e53e22773 Improve error reporting for short cluster names (#377)
* Improve error reporting for short cluster names

* Revert to clusterName
2018-08-29 17:08:59 +02:00
zerg-junior 75a1d782b0
Update CODEOWNERS (#376)
Add @Jan-M @CyberDem0n @avaczi as codeowners
2018-08-29 14:00:00 +02:00
zerg-junior 4543bfde96
Document code generation (#370)
* Document code generation
2018-08-22 11:34:15 +02:00
Valer Cara 5ed109678c Add GoDoc badge to readme (#372) 2018-08-22 11:33:17 +02:00
zerg-junior aeae0a6ef2
Use cluster's own namespace to patch the cluster manifest (#373) 2018-08-22 11:07:12 +02:00
Oleksii Kliukin e1ed4b847d
Use code-generation for CRD API and deepcopy methods (#369)
Client-go provides a https://github.com/kubernetes/code-generator package in order to provide the API to work with CRDs similar to the one available for built-in types, i.e. Pods, Statefulsets and so on.

Use this package to generate deepcopy methods (required for CRDs), instead of using an external deepcopy package; we also generate APIs used to manipulate both Postgres and OperatorConfiguration CRDs, as well as informers and listers for the Postgres CRD, instead of using generic informers and CRD REST API; by using generated code we can get rid of some custom and obscure CRD-related code and use a better API.

All generated code resides in /pkg/generated, with an exception of zz_deepcopy.go in apis/acid.zalan.do/v1

Rename postgres-operator-configuration CRD to OperatorConfiguration, since the former broke naming convention in the code-generator.

Moved Postgresql, PostgresqlList, OperatorConfiguration and OperatorConfigurationList and other types used by them into

Change the type of  the Error field in the Postgresql crd to a string, so that client-go could generate a deepcopy for it.

Use generated code to set status of CRD objects as well. Right now this is done with patch, however, Kubernetes 1.11 introduces the /status subresources, allowing us to set the status with
the special updateStatus call in the future. For now, we keep the code that is compatible with earlier versions of Kubernetes.

Rename postgresql.go to database.go and status.go to logs_and_api.go to reflect the purpose of each of those files.

Update client-go dependencies.

Minor reformatting and renaming.
2018-08-15 17:22:25 +02:00
Jan Mussler 6e8dcabac7
Update postgres-operator.yaml
Bump manifest to use v1.0.0 operator
2018-08-10 14:17:44 +02:00
Oleksii Kliukin e933908084
Configure pg_hba in the local postgresql configuration of Patroni. (#361)
Previously, the operator put pg_hba into the bootstrap/pg_hba key of
Patroni. That had 2 adverse effects:
 - pg_hba.conf was shadowed by Spilo default section in the local
   postgresql configuration
 - when updating pg_hba in the cluster manifest, the updated lines were
   not propagated to DCS, since the key was defined in the boostrap
   section of Patroni.

Include some minor refactoring, moving methods to unexported when
possible and commenting out usage of md5, so that gosec won't complain.

Per https://github.com/zalando-incubator/postgres-operator/issues/330

Review by @zerg-junior
2018-08-08 11:01:26 +02:00
Oleksii Kliukin 199aa6508c
Populate list of clusters in the controller at startup. (#364)
Assign the list of clusters in the controller with the up-to-date list
of Postgres manifests on Kubernetes during the startup.

Node migration routines launched asynchronously to the cluster
processing rely on an up-to-date list of clusters in the controller to
detect clusters affected by the migration of the node and lock them
when doing migration of master pods. Without the initial list the
operator was subject to race conditions like the one described at
https://github.com/zalando-incubator/postgres-operator/issues/363

Restructure the code to decouple list cluster function required by the
postgresql informer from the one that emits cluster sync events. No
extra work is introduced, since cluster sync already runs in a separate
goroutine (clusterResync).

Introduce explicit initial cluster sync at the end of
acquireInitialListOfClusters instead of relying on an implicit one
coming from list function of the PostgreSQL informer.

Some minor refactoring.

Review by @zerg-junior
2018-08-08 11:00:56 +02:00
Oleksii Kliukin acf46bfa62
Include CREATEROLE to the list of allowed flags. (#365)
Previously it has been supported by the operator, but the validity check
excluded it for no reason.
2018-08-08 10:53:08 +02:00
Oleksii Kliukin 14050588ee
Move to client-go 8. (#362)
Not much changes, except for one function that has been deprecated.
However, unless we find a way to use semantic version comparisons like
'^' on a branch name, we would have to update the apimachinery,
apiextensions-apiserver and code-generator dependencies manually.

Also, slash a linter warning about RoleOriginUnknown being not used.
2018-08-07 12:31:08 +02:00
Oleksii Kliukin b06186eb41
Linter-induced code refactoring, run round 2. (#360)
Run more linters in the gometalinter, i.e. deadcode, megacheck,
nakedret, dup.

More consistent code formatting, remove two dead functions, eliminate
naked a bunch of naked returns, refactor a few functions to avoid code
duplication.
2018-08-06 12:09:19 +02:00
zerg-junior 50f079c633 [WIP] Draft codeowners, update maintainers (#358)
* Draft codeowners, update maintainers

* Minor reformatting
2018-08-06 08:59:00 +02:00