Commit Graph

594 Commits

Author SHA1 Message Date
Oleksii Kliukin 04b660519a Fix exec into pods to resize volumes for multi-container pods.
The original code assumed only one container per pod.
2018-06-04 14:51:39 +02:00
Dmitry Dolgov 6ee0349536
Merge pull request #309 from zalando-incubator/feature/split-documentation
Split already existing documentation into parts
2018-06-01 15:49:21 +02:00
erthalion 69c8d3784a Use PostgreSQL specifically 2018-06-01 13:29:09 +02:00
erthalion f356225c04 Change to user/admin/developer 2018-06-01 11:32:50 +02:00
Oleksii Kliukin 16a710a99a Avoid possible skipping SYNC events.
OB1 bug in the condition deciding whether to sync.
2018-05-31 18:29:15 +02:00
erthalion 86f87ac31e Add links to subdocuments 2018-05-31 14:03:01 +02:00
erthalion 749085b29a Split already existing documentation into parts
To improve the documentation we need to split it into smaller parts:

* quickstart (in the readme)
* general concepts
* tutorials
* how to
* references

And then add the missing information. So far I just split the existing
documentation and left references almost empty. I assume that references
may duplicate the rest of the documentation in a way that the doc will
have references to this section, that contains all the formal details.
2018-05-31 11:23:29 +02:00
Oleksii Kliukin 48a5744314
Use Patroni API to set bootstrap-only options. (#299)
Call Patroni API /config in order to set special options that are
ignored when set in the configuration file, such as max_connections.
Per https://github.com/zalando-incubator/postgres-operator/issues/297

* Some minor refacoring:

Rename Cluster ManualFailover to Swithover
Rename Patroni Failover to Switchover
Add more details to error messages and comments introduced in this PR.

Review by @zerg-junior
2018-05-29 12:35:25 +02:00
zerg-junior 24df918dda
Merge pull request #306 from zalando-incubator/update-default-spilo
Bump up default Spilo image
2018-05-28 17:02:38 +02:00
Sergey Dudoladov 2e041c50e6 Bump up default Spilo image 2018-05-28 16:54:27 +02:00
zerg-junior 844a55ab4a
Merge pull request #305 from zalando-incubator/zerg-junior-patch-3
Update postgres-operator.yaml
2018-05-25 14:07:41 +02:00
zerg-junior 69e4ae2d95
Update postgres-operator.yaml
Tags are of fixed length (not arbitrary long prefixes of commit hashes)
2018-05-25 12:59:12 +02:00
zerg-junior 9c86f8bd96
Fix conf for minikube (#301)
* Bump up a Spilo version to use Patroni >= v1.4.4 ; this fixes issues with k8s 1.10 API changes

* Bump up an operator version to use the new 'etcd_host' default value

* Re-use 'zalando-postgres-operator' as a pod service account and add extra RBAC permissions to make it work

* Document in quickstart connecting to Postgres via psql
2018-05-25 12:25:42 +02:00
zerg-junior 1352c4a5e2
Merge pull request #302 from zalando-incubator/fix-etcd-host-default
Fix etcd_host default
2018-05-24 17:17:20 +02:00
Manuel Gómez 32a1456a68
Update config.go 2018-05-24 16:58:46 +02:00
Sergey Dudoladov 749d723f55 Shorten the commen 2018-05-24 16:22:13 +02:00
Sergey Dudoladov 9824ddae5e Fix etcd_host default 2018-05-24 16:05:45 +02:00
Oleksii Kliukin 97d1bde5b6
Merge pull request #300 from zalando-incubator/fix_crash_on_node_migration
Fix a crash on node migration.
2018-05-24 11:40:33 +02:00
Oleksii Kliukin 76ea754fc3 Be lenient when asked to shrink a persisten volume.
Do not hard error, emit a warning instead. The cluster is not going
to be broken because of our refusal to shrink a volume.
2018-05-24 11:17:42 +02:00
Oleksii Kliukin 1ea8b3bbe6 Fix a crash on node migration.
After an unsuccessful initial cluster sync it may happen that the
cluster statefulset is empty. This has been made more likely since
88d6a7be3, since it has introduced syncing volumes before statefulsets,
and the volume sync mail fail for different reasons (i.e. the volume has
been shrinked, or too many calls to Amazon).
2018-05-24 11:05:19 +02:00
zerg-junior e09e62f259
Merge pull request #298 from zalando-incubator/fix_max_connections
Put special patroni parameters to the bootstrap.
2018-05-23 12:24:30 +02:00
Oleksii Kliukin e84ecb1d03 Address code review by @zerg-junior 2018-05-23 11:36:38 +02:00
Oleksii Kliukin f5550c337b Put special patroni parameters to the bootstrap.
Some special patroni postgresql parameters, like max_connections,
should reside in the bootstrap.dcs.postgresql.parameters section
to come into effect.
2018-05-22 18:27:12 +02:00
zerg-junior e6d12b3480
Merge pull request #295 from zalando-incubator/continue_on_delete_errors
Avoid terminating delete on errors.
2018-05-22 10:44:43 +02:00
Oleksii Kliukin 27c7245fed Avoid terminating delete on errors.
When there is an error happening upon deletion of the Kubernetes object
belonging to the cluster being removed, it makes no sense to abort the
deletion: the manifest will be removed anyway, therefore all the objects
after the one we aborted at will stay forever.
2018-05-18 18:10:37 +02:00
zerg-junior f5d61a5f46
Merge pull request #294 from zalando-incubator/sync_volumes_before_statefulset
Fix crash during sync.
2018-05-18 15:03:50 +02:00
Oleksii Kliukin f474a46b2f Merge branch 'master' into sync_volumes_before_statefulset 2018-05-18 14:44:50 +02:00
Oleksii Kliukin a8fdd3f2db Fix crash during sync.
Do not use statefulset number of pods to figure out running ones
for volume resizing, since the statefulset pointer could be nil.
Instead, look at the actual running pods.
2018-05-18 14:42:20 +02:00
Oleksii Kliukin 88d6a7be3f
Sync persistent volumes before statefulsets. (#293)
Avoid the condition of waiting for the pod that cannot start
PostgreSQL because it ran out of disk space.
2018-05-18 12:01:43 +02:00
Oleksii Kliukin 52ddcd25cc Sync persistent volumes before statefulsets.
Avoid the condition of waiting for the pod that cannot start
PostgreSQL because it ran out of disk space.
2018-05-18 11:43:45 +02:00
zerg-junior 922b3fa408
Merge pull request #291 from zalando-incubator/deepcopy_spec
Use deepcopy to propagate the spec to clusters.
2018-05-17 17:56:15 +02:00
zerg-junior eb98b5ec6c
Merge pull request #289 from zalando-incubator/quick-start-doc
Create Quickstart section for the docs
2018-05-17 16:45:42 +02:00
Sergey Dudoladov d6438bf54b Insert line breaks in Introduction 2018-05-17 16:10:02 +02:00
Oleksii Kliukin da4cc2705b Use deepcopy to propagate the spec to clusters.
Avoid sharing pointers to the same spec data between the informer
and the clusters. The only catch is that the error field is cleared
during deepcopy, since it is an interface that may contain private
fields that cannot be copied, however, the error is only used when
the manifest is parsed and before it is queued, therefore, we never
refer to that field in the cluster structure.
2018-05-17 16:05:12 +02:00
Sergey Dudoladov 8b4dc02b2b Remove further mentions of service account 2018-05-17 15:51:29 +02:00
Sergey Dudoladov cbbbd69157 Respond to review 2018-05-17 15:46:21 +02:00
Sergey Dudoladov 83a26fb78b Rename RBAC file 2018-05-17 12:05:31 +02:00
Sergey Dudoladov 08919fed57 Fix links and typos 2018-05-17 10:56:54 +02:00
Oleksii Kliukin ebe50abccb
Make sure we never modify informer cached manifest. (#290)
987b434 introduced a new function that modifies the cluster spec in
memory before the cluster processes it. Unfortunately, the instance
being modified appeared to be the one stored internally in the
PostgresInformer, resulting in those modifications to be propagated with
futher cluster events and producing update loops in some occasions.

This commit makes sure we copy the spec before putting it into the
clusterEventQueues.
2018-05-16 18:23:31 +02:00
Sergey Dudoladov bfc1950df8 Shorten the introduction 2018-05-16 17:25:03 +02:00
Sergey Dudoladov 631748cd59 Simplify layout 2018-05-16 16:10:49 +02:00
Sergey Dudoladov b067ec788a Minor edits 2018-05-16 16:01:16 +02:00
Sergey Dudoladov a926515530 Employ RBAC when run on minikube 2018-05-16 15:28:45 +02:00
Sergey Dudoladov ca8542185a Add RBAC to Quickstart guide 2018-05-16 11:01:16 +02:00
Sergey Dudoladov 9575c9d35e Create Quickstart section for the docs 2018-05-15 17:39:47 +02:00
zerg-junior c99cdd7915
Merge pull request #286 from zalando-incubator/rolling_updates_with_statefulset_annotations
Annotate StatefulSets with pending rolling update status flag
2018-05-15 17:16:16 +02:00
Oleksii Kliukin cf800aef90 Minor import fix 2018-05-15 16:53:12 +02:00
Oleksii Kliukin 11d568bf65 Address code review by @zerg-junior
- new info messages, rename the annotation flag.
2018-05-15 16:50:03 +02:00
Oleksii Kliukin 0c616a802f Merge branch 'master' into rolling_updates_with_statefulset_annotations
# Conflicts:
#	pkg/cluster/k8sres.go
2018-05-15 15:33:34 +02:00
Oleksii Kliukin 987b43456b
Deprecate old LB options, fix endpoint sync. (#287)
* Depreate old LB options, fix endpoint sync.

- deprecate useLoadBalancer, replicaLoadBalancer from the manifest
  and enable_load_balancer from the operator configuration. The old
  operator configuration options become no-op with this commit. For
  the old manifest options, `useLoadBalancer` and `replicaLoadBalancer`
  are still consulted,  but only in the absense of the new ones
  (enableMasterLoadBalancer and enableReplicaLoadBalancer).

- Make sure the endpoint being created during the sync receives proper
  addresses subset. This is more critical for the replicas, as for the
  masters Patroni will normally re-create the endpoint before the
  operator.

- Avoid creating the replica endpoint, since it will be created automatically
  by the corresponding service.
- Update the README and unit tests.

Code review by @mgomezch and @zerg-junior
2018-05-15 15:19:18 +02:00