Skip to content

fix(operator): serve recovery restore hooks from the instance pod - #196

Merged
leonardoce merged 1 commit into
mainfrom
dev/e2e-recovery-plugins
Sep 1, 2026
Merged

leonardoce merged 1 commit into
mainfrom
dev/e2e-recovery-plugins

Conversation

@gabriele-wolfox

@gabriele-wolfox gabriele-wolfox commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

A recent CloudNativePG change (cloudnative-pg/cloudnative-pg#11319) moved instance bootstrap, including recovery, from a dedicated Job into an init container inside the instance pod. Klio only injected the restore sidecar for recovery Jobs, so the recovery pod ran the instance sidecar, which does not advertise the restore job hooks capability, and plugin-based recovery failed with no plugin supports the restore job hooks capability.

Inject the restore sidecar from the Pod lifecycle hook during the initial recovery bootstrap.
The Job path is retained for CloudNativePG releases that still bootstrap recovery through a Job.

Closes #192

@gabriele-wolfox
gabriele-wolfox force-pushed the dev/e2e-recovery-plugins branch from b92d1f4 to f49f506 Compare August 31, 2026 14:31
@gabriele-wolfox gabriele-wolfox changed the title test(e2e): enable the Klio plugin on recovery clusters fix(operator): serve recovery restore hooks from the instance pod Aug 31, 2026
@gabriele-wolfox
gabriele-wolfox force-pushed the dev/e2e-recovery-plugins branch 2 times, most recently from 3e556ef to 30679b1 Compare August 31, 2026 14:35
A recent CloudNativePG change (cloudnative-pg/cloudnative-pg#11319) moved
instance bootstrap, including full and snapshot recovery, from a dedicated
Job into an init container inside the instance pod. The lifecycle hook only
injected the restore sidecar for recovery Jobs, so after that change the
recovery pod ran the instance sidecar, which does not advertise the restore
job hooks capability, and every plugin-based recovery failed with "no plugin
supports the restore job hooks capability".

Inject the restore sidecar from the Pod lifecycle hook while the cluster is
performing its initial recovery bootstrap. The Job path is kept so recovery
still works on CloudNativePG releases that bootstrap through a Job.

Assisted-by: Claude

Signed-off-by: Gabriele Quaresima <[email protected]>
@gabriele-wolfox
gabriele-wolfox force-pushed the dev/e2e-recovery-plugins branch from 30679b1 to 53c4db4 Compare August 31, 2026 14:36
@leonardoce
leonardoce merged commit 616578a into main Sep 1, 2026
16 checks passed
@leonardoce
leonardoce deleted the dev/e2e-recovery-plugins branch September 1, 2026 13:54
fcanovai pushed a commit that referenced this pull request Sep 2, 2026
A recent CloudNativePG change (cloudnative-pg/cloudnative-pg#11319)
moved instance bootstrap, including recovery, from a dedicated Job into
an init container inside the instance pod. Klio only injected the
restore sidecar for recovery Jobs, so the recovery pod ran the instance
sidecar, which does not advertise the restore job hooks capability, and
plugin-based recovery failed with `no plugin supports the restore job
hooks capability`.

Inject the restore sidecar from the Pod lifecycle hook during the
initial recovery bootstrap.
The Job path is retained for CloudNativePG releases that still bootstrap
recovery through a Job.

Closes #192

Signed-off-by: Gabriele Quaresima <[email protected]>
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.

The recovery e2e tests are failing

3 participants