From e1838faf98f92a55c5d34763a87f80ac19be22d8 Mon Sep 17 00:00:00 2001 From: Jakob Edding <15202881+JakobEdding@users.noreply.github.com> Date: Fri, 29 Nov 2024 18:17:18 +0100 Subject: [PATCH] Allow config of a non-0 initial scale for scaled-to-0 streams apps --- charts/streams-app/README.md | 1 + charts/streams-app/templates/scaled-object.yaml | 1 + charts/streams-app/values.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/charts/streams-app/README.md b/charts/streams-app/README.md index 0da4042f..a357ab2f 100644 --- a/charts/streams-app/README.md +++ b/charts/streams-app/README.md @@ -103,6 +103,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p | `autoscaling.lagThreshold` | Average target value to trigger scaling actions. | | | `autoscaling.pollingInterval` | https://keda.sh/docs/2.10/concepts/scaling-deployments/#pollinginterval | `30` | | `autoscaling.cooldownPeriod` | https://keda.sh/docs/2.10/concepts/scaling-deployments/#cooldownperiod | `300` | + | `autoscaling.offsetResetPolicy` | The offset reset policy for the consumer if the the consumer group is not yet subscribed to a partition. | `earliest` | | `autoscaling.minReplicas` | https://keda.sh/docs/2.10/concepts/scaling-deployments/#minreplicacount | `0` | | `autoscaling.maxReplicas` | https://keda.sh/docs/2.10/concepts/scaling-deployments/#maxreplicacount | `1` | diff --git a/charts/streams-app/templates/scaled-object.yaml b/charts/streams-app/templates/scaled-object.yaml index 1eca859e..15579ad2 100644 --- a/charts/streams-app/templates/scaled-object.yaml +++ b/charts/streams-app/templates/scaled-object.yaml @@ -23,6 +23,7 @@ spec: name: {{ template "streams-app.fullname" . }} pollingInterval: {{ .Values.autoscaling.pollingInterval }} cooldownPeriod: {{ .Values.autoscaling.cooldownPeriod }} + initialCooldownPeriod: {{ .Values.autoscaling.initialCooldownPeriod }} minReplicaCount: {{ .Values.autoscaling.minReplicas }} maxReplicaCount: {{ .Values.autoscaling.maxReplicas }} {{- if hasKey .Values.autoscaling "idleReplicas" }} diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index d84eaf5c..bae83758 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -101,6 +101,7 @@ autoscaling: # lagThreshold: "1000" pollingInterval: 30 cooldownPeriod: 300 + initialCooldownPeriod: 0 offsetResetPolicy: earliest minReplicas: 0 maxReplicas: 1