mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-07 08:31:50 +02:00
Support for per-cluster and operator global sidecars (#331)
* Define sidecars in the operator configuration. Right now only the name and the docker image can be defined, but with the help of the pod_environment_configmap parameter arbitrary environment variables can be passed to the sidecars. * Refactoring around generatePodTemplate. Original implementation of per-cluster sidecars by @theRealWardo Per review by @zerg-junior and @Jan-M
This commit is contained in:
@@ -213,3 +213,21 @@ properties of the persistent storage that stores postgres data.
|
||||
See [Kubernetes
|
||||
documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/)
|
||||
for the details on storage classes. Optional.
|
||||
|
||||
### Sidecar definitions
|
||||
|
||||
Those parameters are defined under the `sidecars` key. They consist of a list
|
||||
of dictionaries, each defining one sidecar (an extra container running
|
||||
along the main postgres container on the same pod). The following keys can be
|
||||
defined in the sidecar dictionary:
|
||||
|
||||
* **name**
|
||||
name of the sidecar. Required.
|
||||
|
||||
* **image**
|
||||
docker image of the sidecar. Required.
|
||||
|
||||
* **env**
|
||||
a dictionary of environment variables. Use usual Kubernetes definition
|
||||
(https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/)
|
||||
for environment variables. Optional.
|
||||
|
||||
@@ -15,6 +15,11 @@ words.
|
||||
your own Spilo image from the [github
|
||||
repository](https://github.com/zalando/spilo).
|
||||
|
||||
* **sidecar_docker_images**
|
||||
a map of sidecar names to docker images for the containers to run alongside
|
||||
Spilo. In case of the name conflict with the definition in the cluster
|
||||
manifest the cluster-specific one is preferred.
|
||||
|
||||
* **workers**
|
||||
number of working routines the operator spawns to process requests to
|
||||
create/update/delete/sync clusters concurrently. The default is `4`.
|
||||
|
||||
Reference in New Issue
Block a user