Commit Graph

583 Commits

Author SHA1 Message Date
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
zerg-junior 545d5d92ff
Merge pull request #285 from zalando-incubator/readme-changes-1
README and deployment manifest updates
2018-05-14 10:40:40 +02:00
Oleksii Kliukin 40163677c7
Remove Kubernetes upgrade-related labels
The node_eol_label is obsolete and not used.

The node_readiness_label, if set, will prevent scheduling pods on the node without that label, by default minikube doesn't set any label on the node.
2018-05-08 15:50:10 +02:00
Oleksii Kliukin 288242d021
Change rolling upgrades to rolling updates.
Terminology change.
2018-05-08 15:45:01 +02:00
Oleksii Kliukin 332dab5237 Merge branch 'rolling_updates_with_statefulset_annotations' of github.com:zalando-incubator/postgres-operator into rolling_updates_with_statefulset_annotations 2018-05-08 14:51:10 +02:00
Oleksii Kliukin f41a42f922 Merge branch 'rolling_updates_with_statefulset_annotations' of github.com:zalando-incubator/postgres-operator into rolling_updates_with_statefulset_annotations 2018-05-07 10:16:30 +02:00
Oleksii Kliukin e25f3b9a18 Merge branch 'rolling_updates_with_statefulset_annotations' of github.com:zalando-incubator/postgres-operator into rolling_updates_with_statefulset_annotations 2018-05-07 08:10:35 +02:00
Oleksii Kliukin ce0d4af91c Initial implementation for the statefulset annotations indicating rolling updates. 2018-05-07 08:07:37 +02:00
Oleksii Kliukin 1a20362c5b Initial implementation for the statefulset annotations indicating rolling updates. 2018-05-04 18:59:23 +02:00
Jan M 2bb3bdeeb4 Slimming out README and config map, targeting easy first time deployers to minicube. 2018-05-04 12:20:54 +02:00
Oleksii Kliukin 43a1db2128 Merge branch 'master' into pending_rolling_updates 2018-05-03 11:27:16 +02:00
Oleksii Kliukin 4c8dfd7e20
Remove the check for the clone cluster name. (#270)
* Sanity checks for the cluster name, improve tests.

- check that the normal and clone cluster name complies with the valid
  service name. For clone cluster, only do it if clone timestamp is not
  set; with a clone timestamp set, the clone name points to the S3 bucket

 - add tests and improve existing ones, making sure we don't call Error()
   method for an empty error, as well as that we don't miss cases where
   expected error is not empty, but actual call to be tested does not
   return an error.

Code review by @zerg-junior and @Jan-M
2018-05-03 10:21:37 +02:00