You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,25 @@
6
6
7
7
The Postgres operator manages PostgreSQL clusters on Kubernetes using the [operator pattern](https://coreos.com/blog/introducing-operators.html).
8
8
During the initial run it registers the [Custom Resource Definition (CRD)](https://kubernetes.io/docs/concepts/api-extension/custom-resources/#customresourcedefinitions) for Postgres.
9
-
The PostgreSQL CRD is essentially the schema that describes the contents of the manifests for deploying individual
10
-
PostgreSQL clusters using StatefulSets and [Patroni](https://github.com/zalando/patroni).
9
+
The `postgresql` CRD is essentially the schema that describes the contents of the manifests for deploying individual
10
+
Postgres clusters using StatefulSets and [Patroni](https://github.com/zalando/patroni).
11
11
12
12
Once the operator is running, it performs the following actions:
13
13
14
-
* watches for new PostgreSQL cluster manifests and deploys corresponding clusters
14
+
* watches for new `postgresql`manifests and deploys new clusters
15
15
* watches for updates to existing manifests and changes corresponding properties of the running clusters
16
16
* watches for deletes of the existing manifests and deletes corresponding clusters
17
-
* acts on an update to the operator definition itself and changes the running clusters when necessary
18
-
(i.e. when the docker image inside the operator definition has been updated)
19
-
* periodically checks running clusters against the manifests and acts on the differences found
17
+
* acts on an update to the operator configuration itself and changes the running clusters when necessary
18
+
(i.e. the Docker image changes for a minor release update)
19
+
* periodically checks running clusters against the manifests and syncs changes
20
20
21
-
For instance, when the user creates a new custom object of type ``postgresql`` by submitting a new manifest with
22
-
``kubectl``, the operator fetches that object and creates the corresponding Kubernetes structures
23
-
(StatefulSets, Services, Secrets) according to its definition.
21
+
Example: When a user creates a new custom object of type ``postgresql`` by submitting a new manifest with
22
+
``kubectl``, the operator fetches that object and creates the required Kubernetes entities to spawn a new Postgres cluster
23
+
(StatefulSets, Services, Secrets).
24
24
25
-
Another example is changing the docker image inside the operator. In this case, the operator first goes to all StatefulSets
26
-
it manages and updates them with the new docker images; afterwards, all pods from each StatefulSet are killed one by one
27
-
(rolling upgrade) and the replacements are spawned automatically by each StatefulSet with the new docker image.
25
+
Update example: After changing the Docker image inside the operator's configuration, the operator first goes to all StatefulSets
26
+
it manages and updates them with the new Docker image; afterwards, all pods from each StatefulSet are killed one by one
27
+
and the replacements are spawned automatically by each StatefulSet with the new Docker image. This is called the rolling upgrade.
28
28
29
29
## Scope
30
30
@@ -147,9 +147,9 @@ We can use the generated secret of the `postgres` robot user to connect to our `
147
147
The `manifests/operator-rbac.yaml` defines cluster roles and bindings needed for the operator to function under access control restrictions. To deploy the operator with this RBAC policy use:
@@ -158,7 +158,7 @@ the `operator` default that is created in the `serviceaccount.yaml`. So you will
158
158
159
159
This is done intentionally, as to avoid breaking those setups that
160
160
already work with the default `operator` account. In the future the operator should ideally be run under the
161
-
`zalando-postgres-operator`service account.
161
+
`zalando-postgres-operator`service account.
162
162
163
163
The service account defined in `operator-rbac.yaml` acquires some privileges not really
164
164
used by the operator (i.e. we only need list and watch on configmaps),
@@ -274,7 +274,7 @@ As a preventive measure, one can restrict the minimum and the maximum number of
274
274
If either `min_instances` or `max_instances` is set to a non-zero value, the operator may adjust the number of instances specified in the cluster manifest to match either the min or the max boundary.
275
275
For instance, of a cluster manifest has 1 instance and the min_instances is set to 3, the cluster will be created with 3 instances. By default, both parameters are set to -1.
276
276
277
-
### Load balancers
277
+
### Load balancers
278
278
279
279
For any Postgresql/Spilo cluster an operator creates two separate k8s services: one for the master pod and one for replica pods. To expose these services to an outer network, one can attach load balancers to them by setting `enableMasterLoadBalancer` and/or `enableReplicaLoadBalancer` to `true` in the cluster manifest. In the case any of these variables is omitted from the manifest, the operator configmap's settings `enable_master_load_balancer` and `enable_replica_load_balancer` apply. Note that the operator settings affect all Postgresql services running in a namespace watched by the operator.
0 commit comments