diff --git a/docs/reference/cluster_manifest.md b/docs/reference/cluster_manifest.md index 842b50cf9..269a4b31d 100644 --- a/docs/reference/cluster_manifest.md +++ b/docs/reference/cluster_manifest.md @@ -270,3 +270,36 @@ defined in the sidecar dictionary: 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. + +* **resources** see below. Optional. + +#### Sidecar container resources + +Those parameters define [CPU and memory requests and +limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) +for the sidecar container. They are grouped under the `resources` key for each sidecar. +There are two subgroups, `requests` and `limits`. + +##### Requests + +CPU and memory requests for the sidecar container. + +* **cpu** + CPU requests for the sidecar container. Optional, overrides the + `default_cpu_requests` operator configuration parameter. Optional. + +* **memory** + memory requests for the sidecar container. Optional, overrides the + `default_memory_request` operator configuration parameter. Optional. + +##### Limits + +CPU and memory limits for the sidecar container. + +* **cpu** + CPU limits for the sidecar container. Optional, overrides the + `default_cpu_limits` operator configuration parameter. Optional. + +* **memory** + memory limits for the sidecar container. Optional, overrides the + `default_memory_limits` operator configuration parameter. Optional. diff --git a/docs/user.md b/docs/user.md index 1942bab16..0f643f4c5 100644 --- a/docs/user.md +++ b/docs/user.md @@ -270,6 +270,13 @@ spec: sidecars: - name: "container-name" image: "company/image:tag" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 100m + memory: 100Mi env: - name: "ENV_VAR_NAME" value: "any-k8s-env-things" diff --git a/manifests/complete-postgres-manifest.yaml b/manifests/complete-postgres-manifest.yaml index b2ebe948e..421f5f613 100644 --- a/manifests/complete-postgres-manifest.yaml +++ b/manifests/complete-postgres-manifest.yaml @@ -71,3 +71,17 @@ spec: maintenanceWindows: - 01:00-06:00 #UTC - Sat:00:00-04:00 + #sidecars: + # - name: "telegraf-sidecar" + # image: "telegraf:latest" + # resources: + # limits: + # cpu: 500m + # memory: 500Mi + # requests: + # cpu: 100m + # memory: 100Mi + # env: + # - name: "USEFUL_VAR" + # value: "perhaps-true" +