postgres-operator/pkg/util/config
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
..
config.go Allow configuring pod priority globally and per cluster. (#353) 2018-08-03 14:03:37 +02:00
config_test.go Warn about attempts to use escape quotes. 2017-11-22 10:43:35 +01:00
crd_config.go Linter-induced code refactoring, run round 2. (#360) 2018-08-06 12:09:19 +02:00
util.go Populate list of clusters in the controller at startup. (#364) 2018-08-08 11:00:56 +02:00