Repository navigation
fix(plugin): delete jobs with destroy command - #5298
Merged
Merged
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
4 tasks done
armru
approved these changes
Aug 20, 2024
Member
|
I think this should be labeled as fix @leonardoce |
kubectl cnpg destroykubectl cnpg destroy
Contributor
Author
|
Yeah. Let'a say it's a fix and back port it too |
When destroying a CNPG PostgreSQL instance that is being created, we also delete the Job that is initializing the data directory. Closes: cloudnative-pg#5285 Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
gbartolini
force-pushed
the
destroy-jobs
branch
from
August 21, 2024 09:11
ad12799 to
bc03792
Compare
gbartolini
self-requested a review
August 21, 2024 09:12
kubectl cnpg destroydestroy command
cnpg-bot
pushed a commit
that referenced
this pull request
Aug 21, 2024
When destroying a Postgres instance using the `destroy` command of the `cnpg` plugin, we ensure that not only the pods and PVCs are deleted, but also any related jobs. Closes: #5285 Signed-off-by: Leonardo Cecchi <[email protected]> Signed-off-by: Armando Ruocco <[email protected]> Co-authored-by: Armando Ruocco <[email protected]> (cherry picked from commit 9943f69)
cnpg-bot
pushed a commit
that referenced
this pull request
Aug 21, 2024
When destroying a Postgres instance using the `destroy` command of the `cnpg` plugin, we ensure that not only the pods and PVCs are deleted, but also any related jobs. Closes: #5285 Signed-off-by: Leonardo Cecchi <[email protected]> Signed-off-by: Armando Ruocco <[email protected]> Co-authored-by: Armando Ruocco <[email protected]> (cherry picked from commit 9943f69)
litaocdl
pushed a commit
to daanvinken/cloudnative-pg
that referenced
this pull request
Aug 12, 2026
…pg destroy The previous commit's restructure skipped job cleanup when --keep-pvc is used, even though that cleanup was introduced by cloudnative-pg#5298 to remove jobs left over from the instance. The keep-pvc path also still deleted the pod before detaching the PVCs, leaving the same reattach window the previous commit closes for the delete path. Unify both paths so PVCs are handled first, then the pod, then the jobs, regardless of --keep-pvc, and cover the command with unit tests. Signed-off-by: Armando Ruocco <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When destroying a Postgres instance using the
destroycommand of thecnpgplugin, we ensure that not only the pods and PVCs are deleted, but also any related jobs.Closes: #5285