Skip to content

Commit bf5fef6

Browse files
authored
Add the per-revision annotation key (#2521)
This can be configured via annotation now as well. So document that as well.
1 parent afb60b1 commit bf5fef6

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

docs/serving/configuring-autoscaling.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,12 +534,29 @@ The `scale-to-zero-pod-retention-period` flag determines the **minimum** amount
534534
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.
535535

536536
* **Global key:** `scale-to-zero-pod-retention-period`
537-
* **Per-revision annotation key:** n/a
537+
* **Per-revision annotation key:** `autoscaling.knative.dev/scaleToZeroPodRetentionPeriod`
538538
* **Possible values:** Non-negative duration string
539539
* **Default:** `0s`
540540

541541
**Example:**
542542
{{< tabs name="scale-to-zero-grace" default="Global (ConfigMap)" >}}
543+
{{% tab name="Per Revision" %}}
544+
```yaml
545+
apiVersion: serving.knative.dev/v1
546+
kind: Service
547+
metadata:
548+
name: helloworld-go
549+
namespace: default
550+
spec:
551+
template:
552+
metadata:
553+
annotations:
554+
autoscaling.knative.dev/scaleToZeroPodRetentionPeriod: "1m5s"
555+
spec:
556+
containers:
557+
- image: gcr.io/knative-samples/helloworld-go
558+
```
559+
{{< /tab >}}
543560
{{% tab name="Global (ConfigMap)" %}}
544561
```yaml
545562
apiVersion: v1

0 commit comments

Comments
 (0)