From 0f99b63fc8ba93ca7fa06bbe40583681d8a640cd Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Wed, 12 Aug 2020 16:34:17 -0700 Subject: [PATCH] Document k8s sidecar resource annotations (#8455) --- website/pages/docs/k8s/connect/overview.mdx | 9 +++++++++ website/pages/docs/k8s/helm.mdx | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/website/pages/docs/k8s/connect/overview.mdx b/website/pages/docs/k8s/connect/overview.mdx index 4aa6be02e9..7b2538fb7b 100644 --- a/website/pages/docs/k8s/connect/overview.mdx +++ b/website/pages/docs/k8s/connect/overview.mdx @@ -275,6 +275,15 @@ Annotations can be used to configure the injection behavior. consul.hashicorp.com/service-meta-bar: baz ``` +- `consul.hashicorp.com/sidecar-proxy-` - override default resource settings for + the sidecar proxy container. + The defaults are set in Helm config via the [`connectInject.sidecarProxy.resources`](/docs/k8s/helm#v-connectinject-sidecarproxy-resources) key. + + - `consul.hashicorp.com/sidecar-proxy-cpu-limit` - Override the default CPU limit. + - `consul.hashicorp.com/sidecar-proxy-cpu-request` - Override the default CPU request. + - `consul.hashicorp.com/sidecar-proxy-memory-limit` - Override the default memory limit. + - `consul.hashicorp.com/sidecar-proxy-memory-request` - Override the default memory request. + ### Deployments, StatefulSets, etc. The annotations for configuring Connect must be on the pod specification. diff --git a/website/pages/docs/k8s/helm.mdx b/website/pages/docs/k8s/helm.mdx index 5354c6a025..f737bffb89 100644 --- a/website/pages/docs/k8s/helm.mdx +++ b/website/pages/docs/k8s/helm.mdx @@ -804,6 +804,26 @@ and consider if they're appropriate for your deployment. cpu: "20m" ``` + - `sidecarProxy` ((#v-connectinject-sidecarproxy)) - Configure the sidecar proxy that is injected into each Connect pod. + + - `resources` ((#v-connectinject-sidecarproxy-resources)) - The default resource requests and limits (CPU, memory) + for the Envoy sidecar proxy that is injected into each Connect pod. This should be a YAML map of a Kubernetes + [ResourceRequirements](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) object. + By default, each key is set to `null`, which results in no resource limits. + + These defaults can be overridden on a per-pod basis via [annotation](/docs/k8s/connect/overview#consul-hashicorp-com-sidecar-proxy). + + ```yaml + # Recommended defaults + resources: + requests: + memory: "100Mi" + cpu: "100m" + limits: + memory: "100Mi" + cpu: "100m" + ``` + - `meshGateway` ((#v-meshgateway)) - Configure mesh gateways. - `enabled` ((#v-meshgateway-enabled)) (`boolean: true`) - If mesh gateways are enabled, a Deployment will be created that runs