Document k8s sidecar resource annotations (#8455)

This commit is contained in:
Luke Kysow 2020-08-12 16:34:17 -07:00 committed by GitHub
parent b218692382
commit 1095b93775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View File

@ -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.

View File

@ -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