From c4e27e7e106c6cf34e80a1016338b516c6b94707 Mon Sep 17 00:00:00 2001 From: Victor Agababov Date: Thu, 28 May 2020 11:30:25 -0700 Subject: [PATCH] Add the per-revision annotation key This can be configured via annotation now as well. So document that as well. --- docs/serving/configuring-autoscaling.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/serving/configuring-autoscaling.md b/docs/serving/configuring-autoscaling.md index a6b0c792788..b1540d2b1f6 100644 --- a/docs/serving/configuring-autoscaling.md +++ b/docs/serving/configuring-autoscaling.md @@ -534,12 +534,29 @@ The `scale-to-zero-pod-retention-period` flag determines the **minimum** amount This contrasts with the `scale-to-zero-grace-period` flag, which determines the **maximum** amount of time that the last pod will remain active after the Autoscaler has decided to scale pods to zero. * **Global key:** `scale-to-zero-pod-retention-period` -* **Per-revision annotation key:** n/a +* **Per-revision annotation key:** `autoscaling.knative.dev/scaleToZeroPodRetentionPeriod` * **Possible values:** Non-negative duration string * **Default:** `0s` **Example:** {{< tabs name="scale-to-zero-grace" default="Global (ConfigMap)" >}} +{{% tab name="Per Revision" %}} +```yaml +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + name: helloworld-go + namespace: default +spec: + template: + metadata: + annotations: + autoscaling.knative.dev/scaleToZeroPodRetentionPeriod: "1m5s" + spec: + containers: + - image: gcr.io/knative-samples/helloworld-go +``` +{{< /tab >}} {{% tab name="Global (ConfigMap)" %}} ```yaml apiVersion: v1