From 8aaeaa9f1c1c72fd7af59b83949a947956dd925e Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Fri, 16 Jan 2026 12:24:08 +0100 Subject: [PATCH 1/3] add warning about hook Job TTL and delete policies --- .../continuous-deployment/resource-application-logic.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pages/plural-features/continuous-deployment/resource-application-logic.md b/pages/plural-features/continuous-deployment/resource-application-logic.md index 624fbe7a..013b7b71 100644 --- a/pages/plural-features/continuous-deployment/resource-application-logic.md +++ b/pages/plural-features/continuous-deployment/resource-application-logic.md @@ -119,6 +119,15 @@ Only jobs and pods are automatically deleted. Other resources will need to be de When a manifest of a hook is updated, the operator will reapply the resource even if it has already completed. {% /callout %} +{% callout severity="warning" %} +If a Job manifest sets `ttlSecondsAfterFinished`, Kubernetes will delete it after it completes. +The agent will then see the resource as missing and recreate it unless the manifest also +includes a hook delete policy via `deployment.plural.sh/sync-hook-delete-policy` or `helm.sh/hook-delete-policy`. + +To avoid a delete/recreate loop, ensure the delete policy contains a value we accept: `hook-succeeded` and/or +`hook-failed`. With a valid delete policy set, completed hooks won’t be recreated unless their manifest changes. +{% /callout %} + ### Example ```yaml From 020e93c8d9611d070e9f86aca13e39c2daa63386 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Fri, 16 Jan 2026 12:26:06 +0100 Subject: [PATCH 2/3] clarify hook resource deletion behavior and update warning about manifest reapplication --- .../continuous-deployment/resource-application-logic.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/plural-features/continuous-deployment/resource-application-logic.md b/pages/plural-features/continuous-deployment/resource-application-logic.md index 013b7b71..9d98dc95 100644 --- a/pages/plural-features/continuous-deployment/resource-application-logic.md +++ b/pages/plural-features/continuous-deployment/resource-application-logic.md @@ -111,16 +111,12 @@ annotation. Multiple policies can be comma-separated. Use `hook-succeeded` and/or `hook-failed` to delete the resource after it completes successfully or fails, respectively. If no delete policy is set, the resource will be kept. -{% callout severity="info" %} -Only jobs and pods are automatically deleted. Other resources will need to be deleted manually or via other automation. -{% /callout %} +Only jobs and pods are automatically deleted. Other resources need to be deleted manually or via other automation. -{% callout severity="warning" %} When a manifest of a hook is updated, the operator will reapply the resource even if it has already completed. -{% /callout %} {% callout severity="warning" %} -If a Job manifest sets `ttlSecondsAfterFinished`, Kubernetes will delete it after it completes. +If a job manifest sets `ttlSecondsAfterFinished`, Kubernetes will delete it after it completes. The agent will then see the resource as missing and recreate it unless the manifest also includes a hook delete policy via `deployment.plural.sh/sync-hook-delete-policy` or `helm.sh/hook-delete-policy`. From cb6576cfaaa154d8510908a6b76f7840a226fd16 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Fri, 16 Jan 2026 12:27:58 +0100 Subject: [PATCH 3/3] clarify that only jobs and pods can be automatically deleted by hooks --- .../continuous-deployment/resource-application-logic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/plural-features/continuous-deployment/resource-application-logic.md b/pages/plural-features/continuous-deployment/resource-application-logic.md index 9d98dc95..7ad7ede9 100644 --- a/pages/plural-features/continuous-deployment/resource-application-logic.md +++ b/pages/plural-features/continuous-deployment/resource-application-logic.md @@ -111,7 +111,7 @@ annotation. Multiple policies can be comma-separated. Use `hook-succeeded` and/or `hook-failed` to delete the resource after it completes successfully or fails, respectively. If no delete policy is set, the resource will be kept. -Only jobs and pods are automatically deleted. Other resources need to be deleted manually or via other automation. +Only jobs and pods can be automatically deleted. Other resources need to be deleted manually or via other automation. When a manifest of a hook is updated, the operator will reapply the resource even if it has already completed.