Skip to content

Commit 2d1e425

Browse files
committed
docs(postgres): correct the KEDA-guard rationale and note the gradual client-side rollout
The KEDA-missing fail-closed guard's comment still described the replaced drop-instances design ("db.yaml drops spec.instances ... CNPG collapses to 1"); under the shipped seed design db.yaml seeds instances at max(replicas, effectiveMin), so a skipped ScaledObject leaves a fixed-size cluster with no HPA - autoscaling silently absent, not a collapse. Correct the rationale. Also note on the cozyrds apply-strategy annotation that the client-side switch rolls out per-app as each Application is next written through the aggregated API, not fleet-wide at upgrade (the ApplicationDefinition reconciler syncs only chartRef/valuesFrom/labels onto a live HelmRelease). Follow-up from cozystack#3954 (cozystack#4187). Signed-off-by: Alexey Artamonov <[email protected]>
1 parent 154548f commit 2d1e425

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎packages/apps/postgres/templates/scaledobject.yaml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ is NOT enabled by default, but autoscaling.enabled is a tenant-facing knob, so a
55
tenant can turn it on against a cluster where the admin never enabled `keda`.
66
Without this guard the ScaledObject renders against an unknown kind and the whole
77
database HelmRelease fails with an opaque `no matches for kind "ScaledObject"`.
8-
We must NOT instead skip rendering: db.yaml already drops the static
9-
`.spec.instances` under active autoscaling, so a missing ScaledObject would let
10-
CNPG collapse the cluster to 1 instance. Stop with an actionable message instead.
8+
We must NOT instead silently skip rendering: db.yaml seeds `.spec.instances` at a
9+
static `max(replicas, effectiveMin)` under active autoscaling, so a skipped
10+
ScaledObject would leave the tenant with a fixed-size cluster and no HPA — the
11+
autoscaling they asked for silently absent, with nothing to signal it. Stop with an
12+
actionable message instead.
1113
*/ -}}
1214
{{- if not (.Capabilities.APIVersions.Has "keda.sh/v1alpha1") }}
1315
{{- fail "postgres: autoscaling.enabled is set, but the KEDA platform package is not installed (keda.sh/v1alpha1 is unknown to the cluster). Ask your platform admin to enable the 'keda' package before enabling database autoscaling." }}

‎packages/system/postgres-rd/cozyrds/postgres.yaml‎

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)