Commit Graph

71 Commits

Author SHA1 Message Date
Sergey Dudoladov a88416e6ea Include default service account for pods into README.md 2018-04-23 14:28:00 +02:00
Sergey Dudoladov 2f3d63a663 Document desired behaviour 2018-04-19 16:11:34 +02:00
Oleksii Kliukin c44cd9e4e6
Define the operator RBAC (#234)
Note that the account here is named zalando-postgres-operator and not
the 'operator' default that is created in the serviceaccount.yaml and
also used by the operator configmap to create new postgres clusters.

This is done intentionally, as to avoid breaking those setups that
already work. Ideally, the operator should be run under the
zalando-postgres-operator service account. However, the service account
used to run Postgres clusters does not require all those privileges and
is described at
https://github.com/zalando/patroni/blob/master/kubernetes/patroni_k8s.yaml

The service account defined here acquires some privileges not really
used by the operator (i.e. we only need list and watch on configmaps),
this is also done intentionally to avoid breaking things if someone
decides to configure the same service account in the operator's
configmap to run postgres clusters.

Documentation and further testing by @zerg-junior
2018-04-05 11:24:24 +02:00
Oleksii Kliukin 26db91c53e
Improve infrastructure role definitions (#208)
Enhance definitions of infrastructure roles by allowing membership in multiple roles, role options and per-role configuration to be specified in the infrastructure role configmap, which must have the same name as the infrastructure role secret. See manifests/infrastructure-roles-configmap.yaml for the examples and updated README for the description of different types of database roles supposed by the operator and their purposes.

Change the logic of merging infrastructure roles with the manifest roles when they have the same name, to return the infrastructure role unchanged instead of merging. Previously, we used to propagate flags from the manifest role to the resulting infrastructure one, as there were no way to define flags for the infrastructure role; however, this is not the case anymore.

Code review and tests by @erthalion
2018-04-04 17:21:36 +02:00
zerg-junior ff5793b584
Merge pull request #258 from zalando-incubator/always-create-replica-service
[WIP] Always create replica service
2018-03-29 14:42:26 +02:00
Sergey Dudoladov a8862aeee1 Enable backward compatibility for enable_load_balancer setting from operator configmap 2018-03-19 17:19:50 +01:00
Sergey Dudoladov 386d7b6bdb Implement backward compatibility with older load balancer settings 2018-03-16 13:27:38 +01:00
Sergey Dudoladov 27837e5672 Document usage of load balancers 2018-03-14 13:09:16 +01:00
Jan M 4f782314aa Add scope section to readme. 2018-03-12 17:34:15 +01:00
zerg-junior 2782e948e1
Update README.md 2018-02-22 12:17:04 +01:00
Sergey Dudoladov 50331bc50a Document behavior in the case of unaccessible namespaces 2018-02-22 11:31:08 +01:00
Sergey Dudoladov c47abed6ba Document usage of multiple namespaces 2018-02-20 14:51:18 +01:00
Sergey Dudoladov 0a9e6bd8d2 Clarify when a separate account for database pods may be needed 2018-02-15 16:40:07 +01:00
Sergey Dudoladov 44a2812f5a Update docs to clarify different service accounts 2018-02-15 15:48:35 +01:00
Sergey Dudoladov fab1e34182 Respond to code review comments 2018-02-15 10:43:06 +01:00
Sergey Dudoladov d5d15b7546 Look for secrets in the deployed namespace 2018-02-14 15:37:30 +01:00
Dmitry Dolgov 08e3d925e6
Merge pull request #227 from zalando-incubator/feature/unit-tests-doc
Add section about unit tests
2018-02-09 14:05:20 +01:00
Dmitrii Dolgov 36b363b3ce Don't forget about fish vs bash differences 2018-02-09 13:00:35 +01:00
Dmitrii Dolgov fa44674243 Add $ sign 2018-02-09 11:38:04 +01:00
zerg-junior d5af441fd9
Create separate Talks section in the README
Also adds a FOSDEM 2018 talk on the operator
2018-02-09 11:27:25 +01:00
Dmitrii Dolgov 305b77be90 Add section about unit tests 2018-02-09 11:26:37 +01:00
Dmitrii Dolgov 4e629ef7ca Update section to be more specific 2018-02-01 17:59:05 +01:00
Dmitrii Dolgov 53014ca28b Add a section about debugger
So far only delve is described in details
2018-02-01 17:21:37 +01:00
Oleksii Kliukin b90a36c909
Set node_readiness_label default to an empty value. (#204)
Previously, it was set to the lifecycle-status:ready, breaking a
lot of minikube deployments. Also it was not possible befor to run
with this label set to an empty value.

Document the effect of the label in the new section of the
documentation.
2018-01-16 15:43:03 +01:00
Jan Mussler 56359d23c9
Update README.md (#201) 2018-01-10 18:27:32 +01:00
Oleksii Kliukin 80d55c1072 Mention the talk by Josh Berkus and the blog post by Jan Mußler. 2017-12-18 16:25:50 +01:00
Jan Mussler 04024f91e4 Update README.md
Removed a bit about the staging only use case and describe our setup.
2017-12-17 16:19:22 +01:00
Oleksii Kliukin bf80f5225e
Introduce higher and lower bounds for the number of instances (#178)
* Introduce higher and lower bounds for the number of instances

Reduce the number of instances to the min_instances if it is lower and
to the max_instances if it is higher. -1 for either of those means there
is no lower or upper bound.

In addition, terminate the operator when there is a nonsense in the
configuration (i.e. max_instances < min_instances).

Reviewed by Jan Mußler and Sergey Dudoladov.
2017-12-15 16:02:50 +01:00
Oleksii Kliukin 0e255f82c6 Provide more information about variable conflicts.
They are mentioned in the documentation and the operator will emit a
warning each time the variable from the pod environment configmap is
ignored because the same variable is defined by the operator.

Some minor changes in the variable names to make the code more readable.

Per review from Sergey Dudoladov.
2017-12-14 14:39:33 +01:00
Georg Kunz e8d9c75949 Allow custom Postgres pod environment variables 2017-12-14 14:39:33 +01:00
Oleksii Kliukin 1fb8cf7ea0
Avoid overwriting critical users. (#172)
* Avoid overwriting critical users.

Disallow defining new users either in the cluster manifest, teams
API or infrastructure roles with the names mentioned in the new
protected_role_names parameter (list of comma-separated names)

Additionally, forbid defining a user with the name matching either
super_username or replication_username, so that we don't overwrite
system roles required for correct working of the operator itself.

Also, clear PostgreSQL roles on each sync first in order to avoid using
the old definitions that are no longer present in the current manifest,
infrastructure roles secret or the teams API.
2017-12-05 14:27:12 +01:00
Oleksii Kliukin 68bb3cd52d Add an example of the new parameter with multiple values. 2017-11-22 10:43:35 +01:00
Oleksii Kliukin f6a2225c38 rename the parameter in the README. 2017-11-22 10:43:35 +01:00
Oleksii Kliukin 71f57c9fe3 Fix escaping of parameter values and extra spaces.
- document the newly introduced option (for now in the main README)
- make query error output more readable.
2017-11-22 10:43:35 +01:00
András Váczi 8c185e407c Stackeblockenize the first section of the readme 2017-11-08 11:04:56 +01:00
Henning Jacobs 3cf68afeb5
link to Patroni 2017-11-07 22:54:50 +01:00
Georg Kunz 47dd766fa7 Add node toleration config to PodSpec (#151)
* Add node toleration config to PodSpec

This allows to taint nodes dedicated to Postgres and prevents other pods from running on these nodes.

* Document taint and toleration setup

And remove setting from default operator ConfigMap

* Allow to overwrite tolerations with Postgres manifest
2017-11-02 19:10:44 +01:00
zerg-junior d06415c6a5 Change cluster name to "acid-minimal" in readme
Cluster created via `minimal-postgres-manifest` has the name `acid-minimal-cluster`, not `acid-test-cluster`
2017-10-25 10:40:31 +02:00
Jan Mussler a98a7c95c2 Reorganize Readme (#142)
removing parts of config.

* chaning secret name pattern to make things shorter.

* Move section on self building docker image.

* Fix typo.

* Bump image.

* bump version for pdb fix.

* Changes in regards to review.

* Fix xhyve driver link.

* Move to new api, remove service account, not needed for minikube.

* Changed minimal manifest and example to use right file.

* Added service account for operator again, it is needed in pods anyways later.
2017-10-24 20:42:22 +02:00
Jan Mussler 959b483d11 Update README.md (#133) 2017-10-12 18:24:10 +02:00
Oleksii Kliukin 846d919235 Fix the endpoints (#121) 2017-10-10 10:03:07 +02:00
Oleksii Kliukin b8b13c569b Describe available endpoints. (#120) 2017-10-09 18:07:18 +02:00
Murat Kabilov 660d87039e fix readme 2017-10-09 00:48:55 +02:00
Oleksii Kliukin fe6c162e59 Add a few badges (#50)
#6
2017-06-12 18:10:23 +02:00
Henning Jacobs 1d2fb0091f how to connect via psql (#15) 2017-05-15 18:09:00 +02:00
Henning Jacobs 946f623cf8 Fix typo & .gitignore (#9)
* add scm-source.json to .gitignore

* fix minor typo
2017-05-14 17:52:51 +02:00
Jan Mussler a8440f9ee4 Update README.md
I leave it to you, but postgres vs postgresql is a bit confusing, espacially since the resource is again postgresql
2017-05-12 17:55:50 +02:00
Murat Kabilov 794ad96c88 move deploy Deploying the operator section in the end 2017-05-12 16:38:42 +02:00
Murat Kabilov ad8cea68cf create config map entry in the README file 2017-05-12 16:38:42 +02:00
Murat Kabilov 9ee9e286ec make use of the local fake teams api 2017-05-12 16:38:42 +02:00