Skip to content

fix(operator): drop stale klio-wal from container allowlist - #86

Open
armru wants to merge 1 commit into
mainfrom
fix/drop-stale-klio-wal-allowlist
Open

fix(operator): drop stale klio-wal from container allowlist#86
armru wants to merge 1 commit into
mainfrom
fix/drop-stale-klio-wal-allowlist

Conversation

@armru

@armru armru commented Aug 12, 2026

Copy link
Copy Markdown
Member

PluginConfiguration.Spec.Containers still accepted a klio-wal override
long after that sidecar stopped existing. The plugin injects a single
klio-plugin sidecar covering both base backups and WAL streaming, and the
field is only ever read for klio-plugin and klio-restore
(operator/internal/cnpgi/lifecycle.go:217,364). A user-defined klio-wal
container therefore passed CEL validation and was then silently dropped on
the floor: no error, no sidecar, no hint that the customization did nothing.

This removes klio-wal from the CEL allowlist and the merge-behavior
comment, lowers MaxItems to 2, and regenerates the CRD, the Helm chart CRD
and the API docs. The CSV spec descriptor is hand-maintained and updated in
place.

Compatibility

The change narrows CRD validation, enforced by the API server (the operator
has no admission webhook). An existing PluginConfiguration carrying a
klio-wal entry stays in etcd and is rejected on any update that touches
spec.containers; on clusters without CRD validation ratcheting (Kubernetes
before 1.30, or the gate explicitly disabled) any update to the object is
rejected. Removing the entry is always safe, since the sidecar it named no
longer exists.

Closes #68

@armru
armru force-pushed the fix/drop-stale-klio-wal-allowlist branch 2 times, most recently from 9f1a251 to 0788126 Compare August 12, 2026 12:18
The plugin injects a single klio-plugin sidecar covering both base
backups and WAL streaming, and Spec.Containers is only ever read for
klio-plugin and klio-restore (operator/internal/cnpgi/lifecycle.go).
A user-defined klio-wal override therefore passed validation and was
then silently ignored.

Remove klio-wal from the CEL allowlist and from the merge-behavior
comment, lower MaxItems to 2, and regenerate the CRD, the Helm chart
CRD and the API docs. The CSV spec descriptor is hand-maintained and
updated in place.

This narrows validation: a PluginConfiguration that still carries a
klio-wal entry is rejected on any update that touches spec.containers.
On clusters without CRD validation ratcheting (Kubernetes before 1.30,
or the gate explicitly disabled) any update to the object is rejected.
Removing the entry is always safe, since the sidecar it named no longer
exists.

Closes #68

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@gabriele-wolfox
gabriele-wolfox force-pushed the fix/drop-stale-klio-wal-allowlist branch from 0788126 to 9b2074d Compare August 12, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop stale klio-wal entry from PluginConfiguration's container-name allowlist

2 participants