mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 04:57:13 +02:00
merge with master
This commit is contained in:
@@ -65,6 +65,20 @@ These parameters are grouped directly under the `spec` key in the manifest.
|
||||
custom Docker image that overrides the **docker_image** operator parameter.
|
||||
It should be a [Spilo](https://github.com/zalando/spilo) image. Optional.
|
||||
|
||||
* **schedulerName**
|
||||
specifies the scheduling profile for database pods. If no value is provided
|
||||
K8s' `default-scheduler` will be used. Optional.
|
||||
|
||||
* **spiloRunAsUser**
|
||||
sets the user ID which should be used in the container to run the process.
|
||||
This must be set to run the container without root. By default the container
|
||||
runs with root. This option only works for Spilo versions >= 1.6-p3.
|
||||
|
||||
* **spiloRunAsGroup**
|
||||
sets the group ID which should be used in the container to run the process.
|
||||
This must be set to run the container without root. By default the container
|
||||
runs with root. This option only works for Spilo versions >= 1.6-p3.
|
||||
|
||||
* **spiloFSGroup**
|
||||
the Persistent Volumes for the Spilo pods in the StatefulSet will be owned and
|
||||
writable by the group ID specified. This will override the **spilo_fsgroup**
|
||||
@@ -111,12 +125,12 @@ These parameters are grouped directly under the `spec` key in the manifest.
|
||||
value overrides the `pod_toleration` setting from the operator. Optional.
|
||||
|
||||
* **podPriorityClassName**
|
||||
a name of the [priority
|
||||
class](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass)
|
||||
that should be assigned to the cluster pods. When not specified, the value
|
||||
is taken from the `pod_priority_class_name` operator parameter, if not set
|
||||
then the default priority class is taken. The priority class itself must be
|
||||
defined in advance. Optional.
|
||||
a name of the [priority
|
||||
class](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass)
|
||||
that should be assigned to the cluster pods. When not specified, the value
|
||||
is taken from the `pod_priority_class_name` operator parameter, if not set
|
||||
then the default priority class is taken. The priority class itself must be
|
||||
defined in advance. Optional.
|
||||
|
||||
* **podAnnotations**
|
||||
A map of key value pairs that gets attached as [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
|
||||
@@ -140,6 +154,16 @@ These parameters are grouped directly under the `spec` key in the manifest.
|
||||
is `false`, then no volume will be mounted no matter how operator was
|
||||
configured (so you can override the operator configuration). Optional.
|
||||
|
||||
* **enableConnectionPooler**
|
||||
Tells the operator to create a connection pooler with a database for the master
|
||||
service. If this field is true, a connection pooler deployment will be created even if
|
||||
`connectionPooler` section is empty. Optional, not set by default.
|
||||
|
||||
* **enableReplicaConnectionPooler**
|
||||
Tells the operator to create a connection pooler with a database for the replica
|
||||
service. If this field is true, a connection pooler deployment for replica
|
||||
will be created even if `connectionPooler` section is empty. Optional, not set by default.
|
||||
|
||||
* **enableLogicalBackup**
|
||||
Determines if the logical backup of this cluster should be taken and uploaded
|
||||
to S3. Default: false. Optional.
|
||||
@@ -149,6 +173,18 @@ These parameters are grouped directly under the `spec` key in the manifest.
|
||||
[the reference schedule format](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#schedule)
|
||||
into account. Optional. Default is: "30 00 \* \* \*"
|
||||
|
||||
* **additionalVolumes**
|
||||
List of additional volumes to mount in each container of the statefulset pod.
|
||||
Each item must contain a `name`, `mountPath`, and `volumeSource` which is a
|
||||
[kubernetes volumeSource](https://godoc.org/k8s.io/api/core/v1#VolumeSource).
|
||||
It allows you to mount existing PersistentVolumeClaims, ConfigMaps and Secrets inside the StatefulSet.
|
||||
Also an `emptyDir` volume can be shared between initContainer and statefulSet.
|
||||
Additionaly, you can provide a `SubPath` for volume mount (a file in a configMap source volume, for example).
|
||||
You can also specify in which container the additional Volumes will be mounted with the `targetContainers` array option.
|
||||
If `targetContainers` is empty, additional volumes will be mounted only in the `postgres` container.
|
||||
If you set the `all` special item, it will be mounted in all containers (postgres + sidecars).
|
||||
Else you can set the list of target containers in which the additional volumes will be mounted (eg : postgres, telegraf)
|
||||
|
||||
## Postgres parameters
|
||||
|
||||
Those parameters are grouped under the `postgresql` top-level key, which is
|
||||
@@ -184,9 +220,9 @@ explanation of `ttl` and `loop_wait` parameters.
|
||||
```
|
||||
hostssl all +pamrole all pam
|
||||
```
|
||||
, where pamrole is the name of the role for the pam authentication; any
|
||||
custom `pg_hba` should include the pam line to avoid breaking pam
|
||||
authentication. Optional.
|
||||
where pamrole is the name of the role for the pam authentication; any
|
||||
custom `pg_hba` should include the pam line to avoid breaking pam
|
||||
authentication. Optional.
|
||||
|
||||
* **ttl**
|
||||
Patroni `ttl` parameter value, optional. The default is set by the Spilo
|
||||
@@ -212,6 +248,12 @@ explanation of `ttl` and `loop_wait` parameters.
|
||||
automatically created by Patroni for cluster members and permanent replication
|
||||
slots. Optional.
|
||||
|
||||
* **synchronous_mode**
|
||||
Patroni `synchronous_mode` parameter value. The default is set to `false`. Optional.
|
||||
|
||||
* **synchronous_mode_strict**
|
||||
Patroni `synchronous_mode_strict` parameter value. Can be used in addition to `synchronous_mode`. The default is set to `false`. Optional.
|
||||
|
||||
## Postgres container resources
|
||||
|
||||
Those parameters define [CPU and memory requests and limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/)
|
||||
@@ -296,13 +338,13 @@ archive is supported.
|
||||
the url to S3 bucket containing the WAL archive of the remote primary.
|
||||
Required when the `standby` section is present.
|
||||
|
||||
## EBS volume resizing
|
||||
## Volume properties
|
||||
|
||||
Those parameters are grouped under the `volume` top-level key and define the
|
||||
properties of the persistent storage that stores Postgres data.
|
||||
|
||||
* **size**
|
||||
the size of the target EBS volume. Usual Kubernetes size modifiers, i.e. `Gi`
|
||||
the size of the target volume. Usual Kubernetes size modifiers, i.e. `Gi`
|
||||
or `Mi`, apply. Required.
|
||||
|
||||
* **storageClass**
|
||||
@@ -314,6 +356,14 @@ properties of the persistent storage that stores Postgres data.
|
||||
* **subPath**
|
||||
Subpath to use when mounting volume into Spilo container. Optional.
|
||||
|
||||
* **iops**
|
||||
When running the operator on AWS the latest generation of EBS volumes (`gp3`)
|
||||
allows for configuring the number of IOPS. Maximum is 16000. Optional.
|
||||
|
||||
* **throughput**
|
||||
When running the operator on AWS the latest generation of EBS volumes (`gp3`)
|
||||
allows for configuring the throughput in MB/s. Maximum is 1000. Optional.
|
||||
|
||||
## Sidecar definitions
|
||||
|
||||
Those parameters are defined under the `sidecars` key. They consist of a list
|
||||
@@ -359,3 +409,67 @@ CPU and memory limits for the sidecar container.
|
||||
* **memory**
|
||||
memory limits for the sidecar container. Optional, overrides the
|
||||
`default_memory_limits` operator configuration parameter. Optional.
|
||||
|
||||
## Connection pooler
|
||||
|
||||
Parameters are grouped under the `connectionPooler` top-level key and specify
|
||||
configuration for connection pooler. If this section is not empty, a connection
|
||||
pooler will be created for master service only even if `enableConnectionPooler`
|
||||
is not present. But if this section is present then it defines the configuration
|
||||
for both master and replica pooler services (if `enableReplicaConnectionPooler`
|
||||
is enabled).
|
||||
|
||||
* **numberOfInstances**
|
||||
How many instances of connection pooler to create.
|
||||
|
||||
* **schema**
|
||||
Database schema to create for credentials lookup function.
|
||||
|
||||
* **user**
|
||||
User to create for connection pooler to be able to connect to a database.
|
||||
You can also choose a role from the `users` section or a system user role.
|
||||
|
||||
* **dockerImage**
|
||||
Which docker image to use for connection pooler deployment.
|
||||
|
||||
* **maxDBConnections**
|
||||
How many connections the pooler can max hold. This value is divided among the
|
||||
pooler pods.
|
||||
|
||||
* **mode**
|
||||
In which mode to run connection pooler, transaction or session.
|
||||
|
||||
* **resources**
|
||||
Resource configuration for connection pooler deployment.
|
||||
|
||||
## Custom TLS certificates
|
||||
|
||||
Those parameters are grouped under the `tls` top-level key.
|
||||
|
||||
* **secretName**
|
||||
By setting the `secretName` value, the cluster will switch to load the given
|
||||
Kubernetes Secret into the container as a volume and uses that as the
|
||||
certificate instead. It is up to the user to create and manage the
|
||||
Kubernetes Secret either by hand or using a tool like the CertManager
|
||||
operator.
|
||||
|
||||
* **certificateFile**
|
||||
Filename of the certificate. Defaults to "tls.crt".
|
||||
|
||||
* **privateKeyFile**
|
||||
Filename of the private key. Defaults to "tls.key".
|
||||
|
||||
* **caFile**
|
||||
Optional filename to the CA certificate (e.g. "ca.crt"). Useful when the
|
||||
client connects with `sslmode=verify-ca` or `sslmode=verify-full`.
|
||||
Default is empty.
|
||||
|
||||
* **caSecretName**
|
||||
By setting the `caSecretName` value, the ca certificate file defined by the
|
||||
`caFile` will be fetched from this secret instead of `secretName` above.
|
||||
This secret has to hold a file with that name in its root.
|
||||
|
||||
Optionally one can provide full path for any of them. By default it is
|
||||
relative to the "/tls/", which is mount path of the tls secret.
|
||||
If `caSecretName` is defined, the ca.crt path is relative to "/tlsca/",
|
||||
otherwise to the same "/tls/".
|
||||
|
||||
@@ -45,7 +45,7 @@ The following environment variables are accepted by the operator:
|
||||
all namespaces. Empty value defaults to the operator namespace. Overrides the
|
||||
`watched_namespace` operator parameter.
|
||||
|
||||
* **SCALYR_API_KEY**
|
||||
* **SCALYR_API_KEY** (*deprecated*)
|
||||
the value of the Scalyr API key to supply to the pods. Overrides the
|
||||
`scalyr_api_key` operator parameter.
|
||||
|
||||
@@ -56,3 +56,7 @@ The following environment variables are accepted by the operator:
|
||||
* **CRD_READY_WAIT_INTERVAL**
|
||||
defines the interval between consecutive attempts waiting for the
|
||||
`postgresql` CRD to be created. The default is 5s.
|
||||
|
||||
* **ENABLE_JSON_LOGGING**
|
||||
Set to `true` for JSON formatted logging output.
|
||||
The default is false.
|
||||
|
||||
@@ -75,11 +75,27 @@ Those are top-level keys, containing both leaf keys and groups.
|
||||
[OpenAPI v3 schema validation](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#validation)
|
||||
The default is `true`.
|
||||
|
||||
* **enable_lazy_spilo_upgrade**
|
||||
Instruct operator to update only the statefulsets with new images (Spilo and InitContainers) without immediately doing the rolling update. The assumption is pods will be re-started later with new images, for example due to the node rotation.
|
||||
The default is `false`.
|
||||
|
||||
* **enable_pgversion_env_var**
|
||||
With newer versions of Spilo, it is preferable to use `PGVERSION` pod environment variable instead of the setting `postgresql.bin_dir` in the `SPILO_CONFIGURATION` env variable. When this option is true, the operator sets `PGVERSION` and omits `postgresql.bin_dir` from `SPILO_CONFIGURATION`. When false, the `postgresql.bin_dir` is set. This setting takes precedence over `PGVERSION`; see PR 222 in Spilo. The default is `true`.
|
||||
|
||||
* **enable_spilo_wal_path_compat**
|
||||
enables backwards compatible path between Spilo 12 and Spilo 13 images. The default is `false`.
|
||||
|
||||
* **etcd_host**
|
||||
Etcd connection string for Patroni defined as `host:port`. Not required when
|
||||
Patroni native Kubernetes support is used. The default is empty (use
|
||||
Kubernetes-native DCS).
|
||||
|
||||
* **kubernetes_use_configmaps**
|
||||
Select if setup uses endpoints (default), or configmaps to manage leader when
|
||||
DCS is kubernetes (not etcd or similar). In OpenShift it is not possible to
|
||||
use endpoints option, and configmaps is required. By default,
|
||||
`kubernetes_use_configmaps: false`, meaning endpoints will be used.
|
||||
|
||||
* **docker_image**
|
||||
Spilo Docker image for Postgres instances. For production, don't rely on the
|
||||
default image, as it might be not the most up-to-date one. Instead, build
|
||||
@@ -87,9 +103,18 @@ Those are top-level keys, containing both leaf keys and groups.
|
||||
repository](https://github.com/zalando/spilo).
|
||||
|
||||
* **sidecar_docker_images**
|
||||
a map of sidecar names to Docker images to run with Spilo. In case of the name
|
||||
conflict with the definition in the cluster manifest the cluster-specific one
|
||||
is preferred.
|
||||
*deprecated*: use **sidecars** instead. A map of sidecar names to Docker
|
||||
images to run with Spilo. In case of the name conflict with the definition in
|
||||
the cluster manifest the cluster-specific one is preferred.
|
||||
|
||||
* **sidecars**
|
||||
a list of sidecars to run with Spilo, for any cluster (i.e. globally defined
|
||||
sidecars). Each item in the list is of type
|
||||
[Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
|
||||
Globally defined sidecars can be overwritten by specifying a sidecar in the
|
||||
Postgres manifest with the same name.
|
||||
Note: This field is not part of the schema validation. If the container
|
||||
specification is invalid, then the operator fails to create the statefulset.
|
||||
|
||||
* **enable_shm_volume**
|
||||
Instruct operator to start any new database pod without limitations on shm
|
||||
@@ -101,7 +126,7 @@ Those are top-level keys, containing both leaf keys and groups.
|
||||
|
||||
* **workers**
|
||||
number of working routines the operator spawns to process requests to
|
||||
create/update/delete/sync clusters concurrently. The default is `4`.
|
||||
create/update/delete/sync clusters concurrently. The default is `8`.
|
||||
|
||||
* **max_instances**
|
||||
operator will cap the number of instances in any managed Postgres cluster up
|
||||
@@ -127,8 +152,9 @@ Those are top-level keys, containing both leaf keys and groups.
|
||||
at the cost of overprovisioning memory and potential scheduling problems for
|
||||
containers with high memory limits due to the lack of memory on Kubernetes
|
||||
cluster nodes. This affects all containers created by the operator (Postgres,
|
||||
Scalyr sidecar, and other sidecars); to set resources for the operator's own
|
||||
container, change the [operator deployment manually](../../manifests/postgres-operator.yaml#L20).
|
||||
Scalyr sidecar, and other sidecars except **sidecars** defined in the operator
|
||||
configuration); to set resources for the operator's own container, change the
|
||||
[operator deployment manually](../../manifests/postgres-operator.yaml#L20).
|
||||
The default is `false`.
|
||||
|
||||
## Postgres users
|
||||
@@ -187,6 +213,22 @@ configuration they are grouped under the `kubernetes` key.
|
||||
of a database created by the operator. If the annotation key is also provided
|
||||
by the database definition, the database definition value is used.
|
||||
|
||||
* **delete_annotation_date_key**
|
||||
key name for annotation that compares manifest value with current date in the
|
||||
YYYY-MM-DD format. Allowed pattern: `'([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]'`.
|
||||
The default is empty which also disables this delete protection check.
|
||||
|
||||
* **delete_annotation_name_key**
|
||||
key name for annotation that compares manifest value with Postgres cluster name.
|
||||
Allowed pattern: `'([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]'`. The default is
|
||||
empty which also disables this delete protection check.
|
||||
|
||||
* **downscaler_annotations**
|
||||
An array of annotations that should be passed from Postgres CRD on to the
|
||||
statefulset and, if exists, to the connection pooler deployment as well.
|
||||
Regular expressions like `downscaler/*` etc. are also accepted. Can be used
|
||||
with [kube-downscaler](https://github.com/hjacobs/kube-downscaler).
|
||||
|
||||
* **watched_namespace**
|
||||
The operator watches for Postgres objects in the given namespace. If not
|
||||
specified, the value is taken from the operator namespace. A special `*`
|
||||
@@ -207,12 +249,13 @@ configuration they are grouped under the `kubernetes` key.
|
||||
Default is true.
|
||||
|
||||
* **enable_init_containers**
|
||||
global option to allow for creating init containers to run actions before
|
||||
Spilo is started. Default is true.
|
||||
global option to allow for creating init containers in the cluster manifest to
|
||||
run actions before Spilo is started. Default is true.
|
||||
|
||||
* **enable_sidecars**
|
||||
global option to allow for creating sidecar containers to run alongside Spilo
|
||||
on the same pod. Default is true.
|
||||
global option to allow for creating sidecar containers in the cluster manifest
|
||||
to run alongside Spilo on the same pod. Globally defined sidecars are always
|
||||
enabled. Default is true.
|
||||
|
||||
* **secret_name_template**
|
||||
a template for the name of the database user secrets generated by the
|
||||
@@ -228,11 +271,24 @@ configuration they are grouped under the `kubernetes` key.
|
||||
to the Postgres clusters after creation.
|
||||
|
||||
* **oauth_token_secret_name**
|
||||
a name of the secret containing the `OAuth2` token to pass to the teams API.
|
||||
The default is `postgresql-operator`.
|
||||
namespaced name of the secret containing the `OAuth2` token to pass to the
|
||||
teams API. The default is `postgresql-operator`.
|
||||
|
||||
* **infrastructure_roles_secret_name**
|
||||
name of the secret containing infrastructure roles names and passwords.
|
||||
*deprecated*: namespaced name of the secret containing infrastructure roles
|
||||
with user names, passwords and role membership.
|
||||
|
||||
* **infrastructure_roles_secrets**
|
||||
array of infrastructure role definitions which reference existing secrets
|
||||
and specify the key names from which user name, password and role membership
|
||||
are extracted. For the ConfigMap this has to be a string which allows
|
||||
referencing only one infrastructure roles secret. The default is empty.
|
||||
|
||||
* **inherited_annotations**
|
||||
list of annotation keys that can be inherited from the cluster manifest, and
|
||||
added to each child objects (`Deployment`, `StatefulSet`, `Pod`, `PDB` and
|
||||
`Services`) created by the operator incl. the ones from the connection
|
||||
pooler deployment. The default is empty.
|
||||
|
||||
* **pod_role_label**
|
||||
name of the label assigned to the Postgres pods (and services/endpoints) by
|
||||
@@ -243,15 +299,16 @@ configuration they are grouped under the `kubernetes` key.
|
||||
objects. The default is `application:spilo`.
|
||||
|
||||
* **inherited_labels**
|
||||
list of labels that can be inherited from the cluster manifest, and added to
|
||||
each child objects (`StatefulSet`, `Pod`, `Service` and `Endpoints`) created
|
||||
by the operator. Typical use case is to dynamically pass labels that are
|
||||
specific to a given Postgres cluster, in order to implement `NetworkPolicy`.
|
||||
The default is empty.
|
||||
list of label keys that can be inherited from the cluster manifest, and
|
||||
added to each child objects (`Deployment`, `StatefulSet`, `Pod`, `PVCs`,
|
||||
`PDB`, `Service`, `Endpoints` and `Secrets`) created by the operator.
|
||||
Typical use case is to dynamically pass labels that are specific to a
|
||||
given Postgres cluster, in order to implement `NetworkPolicy`. The default
|
||||
is empty.
|
||||
|
||||
* **cluster_name_label**
|
||||
name of the label assigned to Kubernetes objects created by the operator that
|
||||
indicates which cluster a given object belongs to. The default is
|
||||
name of the label assigned to Kubernetes objects created by the operator
|
||||
that indicates which cluster a given object belongs to. The default is
|
||||
`cluster-name`.
|
||||
|
||||
* **node_readiness_label**
|
||||
@@ -269,17 +326,27 @@ configuration they are grouped under the `kubernetes` key.
|
||||
for details on taints and tolerations. The default is empty.
|
||||
|
||||
* **pod_environment_configmap**
|
||||
a name of the ConfigMap with environment variables to populate on every pod.
|
||||
Right now this ConfigMap is searched in the namespace of the Postgres cluster.
|
||||
All variables from that ConfigMap are injected to the pod's environment, on
|
||||
conflicts they are overridden by the environment variables generated by the
|
||||
operator. The default is empty.
|
||||
namespaced name of the ConfigMap with environment variables to populate on
|
||||
every pod. Right now this ConfigMap is searched in the namespace of the
|
||||
Postgres cluster. All variables from that ConfigMap are injected to the pod's
|
||||
environment, on conflicts they are overridden by the environment variables
|
||||
generated by the operator. The default is empty.
|
||||
|
||||
* **pod_priority_class_name**
|
||||
a name of the [priority class](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass)
|
||||
that should be assigned to the Postgres pods. The priority class itself must
|
||||
be defined in advance. Default is empty (use the default priority class).
|
||||
|
||||
* **spilo_runasuser**
|
||||
sets the user ID which should be used in the container to run the process.
|
||||
This must be set to run the container without root. By default the container
|
||||
runs with root. This option only works for Spilo versions >= 1.6-p3.
|
||||
|
||||
* **spilo_runasgroup**
|
||||
sets the group ID which should be used in the container to run the process.
|
||||
This must be set to run the container without root. By default the container
|
||||
runs with root. This option only works for Spilo versions >= 1.6-p3.
|
||||
|
||||
* **spilo_fsgroup**
|
||||
the Persistent Volumes for the Spilo pods in the StatefulSet will be owned and
|
||||
writable by the group ID specified. This is required to run Spilo as a
|
||||
@@ -291,12 +358,12 @@ configuration they are grouped under the `kubernetes` key.
|
||||
used for AWS volume resizing and not required if you don't need that
|
||||
capability. The default is `false`.
|
||||
|
||||
* **master_pod_move_timeout**
|
||||
The period of time to wait for the success of migration of master pods from
|
||||
an unschedulable node. The migration includes Patroni switchovers to
|
||||
respective replicas on healthy nodes. The situation where master pods still
|
||||
exist on the old node after this timeout expires has to be fixed manually.
|
||||
The default is 20 minutes.
|
||||
* **master_pod_move_timeout**
|
||||
The period of time to wait for the success of migration of master pods from
|
||||
an unschedulable node. The migration includes Patroni switchovers to
|
||||
respective replicas on healthy nodes. The situation where master pods still
|
||||
exist on the old node after this timeout expires has to be fixed manually.
|
||||
The default is 20 minutes.
|
||||
|
||||
* **enable_pod_antiaffinity**
|
||||
toggles [pod anti affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
|
||||
@@ -312,6 +379,15 @@ configuration they are grouped under the `kubernetes` key.
|
||||
of stateful sets of PG clusters. The default is `ordered_ready`, the second
|
||||
possible value is `parallel`.
|
||||
|
||||
* **storage_resize_mode**
|
||||
defines how operator handles the difference between the requested volume size and
|
||||
the actual size. Available options are:
|
||||
1. `ebs` : operator resizes EBS volumes directly and executes `resizefs` within a pod
|
||||
2. `pvc` : operator only changes PVC definition
|
||||
3. `off` : disables resize of the volumes.
|
||||
4. `mixed` :operator uses AWS API to adjust size, throughput, and IOPS, and calls pvc change for file system resize
|
||||
Default is "pvc".
|
||||
|
||||
## Kubernetes resource requests
|
||||
|
||||
This group allows you to configure resource requests for the Postgres pods.
|
||||
@@ -381,6 +457,12 @@ CRD-based configuration.
|
||||
Those options affect the behavior of load balancers created by the operator.
|
||||
In the CRD-based configuration they are grouped under the `load_balancer` key.
|
||||
|
||||
* **custom_service_annotations**
|
||||
This key/value map provides a list of annotations that get attached to each
|
||||
service of a cluster created by the operator. If the annotation key is also
|
||||
provided by the cluster definition, the manifest value is used.
|
||||
Optional.
|
||||
|
||||
* **db_hosted_zone**
|
||||
DNS zone for the cluster DNS name when the load balancer is configured for
|
||||
the cluster. Only used when combined with
|
||||
@@ -397,11 +479,8 @@ In the CRD-based configuration they are grouped under the `load_balancer` key.
|
||||
cluster. Can be overridden by individual cluster settings. The default is
|
||||
`false`.
|
||||
|
||||
* **custom_service_annotations**
|
||||
This key/value map provides a list of annotations that get attached to each
|
||||
service of a cluster created by the operator. If the annotation key is also
|
||||
provided by the cluster definition, the manifest value is used.
|
||||
Optional.
|
||||
* **external_traffic_policy** defines external traffic policy for load
|
||||
balancers. Allowed values are `Cluster` (default) and `Local`.
|
||||
|
||||
* **master_dns_name_format** defines the DNS name string template for the
|
||||
master load balancer cluster. The default is
|
||||
@@ -430,6 +509,20 @@ yet officially supported.
|
||||
present and accessible by Postgres pods. At the moment, supported services by
|
||||
Spilo are S3 and GCS. The default is empty.
|
||||
|
||||
* **wal_gs_bucket**
|
||||
GCS bucket to use for shipping WAL segments with WAL-E. A bucket has to be
|
||||
present and accessible by Postgres pods. Note, only the name of the bucket is
|
||||
required. At the moment, supported services by Spilo are S3 and GCS.
|
||||
The default is empty.
|
||||
|
||||
* **gcp_credentials**
|
||||
Used to set the GOOGLE_APPLICATION_CREDENTIALS environment variable for the pods.
|
||||
This is used in with conjunction with the `additional_secret_mount` and
|
||||
`additional_secret_mount_path` to properly set the credentials for the spilo
|
||||
containers. This will allow users to use specific
|
||||
[service accounts](https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform).
|
||||
The default is empty
|
||||
|
||||
* **log_s3_bucket**
|
||||
S3 bucket to use for shipping Postgres daily logs. Works only with S3 on AWS.
|
||||
The bucket has to be present and accessible by Postgres pods. The default is
|
||||
@@ -445,10 +538,22 @@ yet officially supported.
|
||||
AWS region used to store EBS volumes. The default is `eu-central-1`.
|
||||
|
||||
* **additional_secret_mount**
|
||||
Additional Secret (aws or gcp credentials) to mount in the pod. The default is empty.
|
||||
Additional Secret (aws or gcp credentials) to mount in the pod.
|
||||
The default is empty.
|
||||
|
||||
* **additional_secret_mount_path**
|
||||
Path to mount the above Secret in the filesystem of the container(s). The default is empty.
|
||||
Path to mount the above Secret in the filesystem of the container(s).
|
||||
The default is empty.
|
||||
|
||||
* **enable_ebs_gp3_migration**
|
||||
enable automatic migration on AWS from gp2 to gp3 volumes, that are smaller
|
||||
than the configured max size (see below). This ignores that EBS gp3 is by
|
||||
default only 125 MB/sec vs 250 MB/sec for gp2 >= 333GB.
|
||||
The default is `false`.
|
||||
|
||||
* **enable_ebs_gp3_migration_max_size**
|
||||
defines the maximum volume size in GB until which auto migration happens.
|
||||
Default is 1000 (1TB) which matches 3000 IOPS.
|
||||
|
||||
## Logical backup
|
||||
|
||||
@@ -456,38 +561,48 @@ These parameters configure a K8s cron job managed by the operator to produce
|
||||
Postgres logical backups. In the CRD-based configuration those parameters are
|
||||
grouped under the `logical_backup` key.
|
||||
|
||||
* **logical_backup_schedule**
|
||||
Backup schedule in the cron format. Please take the
|
||||
[reference schedule format](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#schedule)
|
||||
into account. Default: "30 00 \* \* \*"
|
||||
|
||||
* **logical_backup_docker_image**
|
||||
An image for pods of the logical backup job. The [example image](../../docker/logical-backup/Dockerfile)
|
||||
runs `pg_dumpall` on a replica if possible and uploads compressed results to
|
||||
an S3 bucket under the key `/spilo/pg_cluster_name/cluster_k8s_uuid/logical_backups`.
|
||||
The default image is the same image built with the Zalando-internal CI
|
||||
pipeline. Default: "registry.opensource.zalan.do/acid/logical-backup"
|
||||
pipeline. Default: "registry.opensource.zalan.do/acid/logical-backup:v1.6.0"
|
||||
|
||||
* **logical_backup_google_application_credentials**
|
||||
Specifies the path of the google cloud service account json file. Default is empty.
|
||||
|
||||
* **logical_backup_job_prefix**
|
||||
The prefix to be prepended to the name of a k8s CronJob running the backups. Beware the prefix counts towards the name length restrictions imposed by k8s. Empty string is a legitimate value. Operator does not do the actual renaming: It simply creates the job with the new prefix. You will have to delete the old cron job manually. Default: "logical-backup-".
|
||||
|
||||
* **logical_backup_provider**
|
||||
Specifies the storage provider to which the backup should be uploaded (`s3` or `gcs`).
|
||||
Default: "s3"
|
||||
|
||||
* **logical_backup_s3_access_key_id**
|
||||
When set, value will be in AWS_ACCESS_KEY_ID env variable. The Default is empty.
|
||||
|
||||
* **logical_backup_s3_bucket**
|
||||
S3 bucket to store backup results. The bucket has to be present and
|
||||
accessible by Postgres pods. Default: empty.
|
||||
|
||||
* **logical_backup_s3_region**
|
||||
Specifies the region of the bucket which is required with some non-AWS S3 storage services. The default is empty.
|
||||
|
||||
* **logical_backup_s3_endpoint**
|
||||
When using non-AWS S3 storage, endpoint can be set as a ENV variable. The default is empty.
|
||||
|
||||
* **logical_backup_s3_sse**
|
||||
Specify server side encription that S3 storage is using. If empty string
|
||||
is specified, no argument will be passed to `aws s3` command. Default: "AES256".
|
||||
|
||||
* **logical_backup_s3_access_key_id**
|
||||
When set, value will be in AWS_ACCESS_KEY_ID env variable. The Default is empty.
|
||||
* **logical_backup_s3_region**
|
||||
Specifies the region of the bucket which is required with some non-AWS S3 storage services. The default is empty.
|
||||
|
||||
* **logical_backup_s3_secret_access_key**
|
||||
When set, value will be in AWS_SECRET_ACCESS_KEY env variable. The Default is empty.
|
||||
|
||||
* **logical_backup_s3_sse**
|
||||
Specify server side encryption that S3 storage is using. If empty string
|
||||
is specified, no argument will be passed to `aws s3` command. Default: "AES256".
|
||||
|
||||
* **logical_backup_schedule**
|
||||
Backup schedule in the cron format. Please take the
|
||||
[reference schedule format](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#schedule)
|
||||
into account. Default: "30 00 \* \* \*"
|
||||
|
||||
## Debugging the operator
|
||||
|
||||
Options to aid debugging of the operator itself. Grouped under the `debug` key.
|
||||
@@ -528,8 +643,8 @@ key.
|
||||
The default is `"log_statement:all"`
|
||||
|
||||
* **enable_team_superuser**
|
||||
whether to grant superuser to team members created from the Teams API.
|
||||
The default is `false`.
|
||||
whether to grant superuser to members of the cluster's owning team created
|
||||
from the Teams API. The default is `false`.
|
||||
|
||||
* **team_admin_role**
|
||||
role name to grant to team members created from the Teams API. The default is
|
||||
@@ -562,6 +677,16 @@ key.
|
||||
cluster to administer Postgres and maintain infrastructure built around it.
|
||||
The default is empty.
|
||||
|
||||
* **enable_postgres_team_crd**
|
||||
toggle to make the operator watch for created or updated `PostgresTeam` CRDs
|
||||
and create roles for specified additional teams and members.
|
||||
The default is `false`.
|
||||
|
||||
* **enable_postgres_team_crd_superusers**
|
||||
in a `PostgresTeam` CRD additional superuser teams can assigned to teams that
|
||||
own clusters. With this flag set to `false`, it will be ignored.
|
||||
The default is `false`.
|
||||
|
||||
## Logging and REST API
|
||||
|
||||
Parameters affecting logging and REST API listener. In the CRD-based
|
||||
@@ -576,11 +701,12 @@ configuration they are grouped under the `logging_rest_api` key.
|
||||
* **cluster_history_entries**
|
||||
number of entries in the cluster history ring buffer. The default is `1000`.
|
||||
|
||||
## Scalyr options
|
||||
## Scalyr options (*deprecated*)
|
||||
|
||||
Those parameters define the resource requests/limits and properties of the
|
||||
scalyr sidecar. In the CRD-based configuration they are grouped under the
|
||||
`scalyr` key.
|
||||
`scalyr` key. Note, that this section is deprecated. Instead, define Scalyr as
|
||||
a global sidecar under the `sidecars` key in the configuration.
|
||||
|
||||
* **scalyr_api_key**
|
||||
API key for the Scalyr sidecar. The default is empty.
|
||||
@@ -602,3 +728,43 @@ scalyr sidecar. In the CRD-based configuration they are grouped under the
|
||||
|
||||
* **scalyr_memory_limit**
|
||||
Memory limit value for the Scalyr sidecar. The default is `500Mi`.
|
||||
|
||||
## Connection pooler configuration
|
||||
|
||||
Parameters are grouped under the `connection_pooler` top-level key and specify
|
||||
default configuration for connection pooler, if a postgres manifest requests it
|
||||
but do not specify some of the parameters. All of them are optional with the
|
||||
operator being able to provide some reasonable defaults.
|
||||
|
||||
* **connection_pooler_number_of_instances**
|
||||
How many instances of connection pooler to create. Default is 2 which is also
|
||||
the required minimum.
|
||||
|
||||
* **connection_pooler_schema**
|
||||
Database schema to create for credentials lookup function to be used by the
|
||||
connection pooler. Is is created in every database of the Postgres cluster.
|
||||
You can also choose an existing schema. Default schema is `pooler`.
|
||||
|
||||
* **connection_pooler_user**
|
||||
User to create for connection pooler to be able to connect to a database.
|
||||
You can also choose an existing role, but make sure it has the `LOGIN`
|
||||
privilege. Default role is `pooler`.
|
||||
|
||||
* **connection_pooler_image**
|
||||
Docker image to use for connection pooler deployment.
|
||||
Default: "registry.opensource.zalan.do/acid/pgbouncer"
|
||||
|
||||
* **connection_pooler_max_db_connections**
|
||||
How many connections the pooler can max hold. This value is divided among the
|
||||
pooler pods. Default is 60 which will make up 30 connections per pod for the
|
||||
default setup with two instances.
|
||||
|
||||
* **connection_pooler_mode**
|
||||
Default pooler mode, `session` or `transaction`. Default is `transaction`.
|
||||
|
||||
* **connection_pooler_default_cpu_request**
|
||||
**connection_pooler_default_memory_reques**
|
||||
**connection_pooler_default_cpu_limit**
|
||||
**connection_pooler_default_memory_limit**
|
||||
Default resource configuration for connection pooler deployment. The internal
|
||||
default for memory request and limit is `100Mi`, for CPU it is `500m` and `1`.
|
||||
|
||||
Reference in New Issue
Block a user