Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix deleting resources from Helm charts #31

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Conversation

janiskemper
Copy link
Member

What this PR does / why we need it:
There are two problems with deleting resources from Helm charts right now: The first one is that the objects stay in the status.resources list, even after they are deleted. The second is that instead of returning an error when a deletion failed, we returned an error on success.

Instead, as we base deletion of objects based on the status.resources list (this can be changed in the future), we keep resources that are supposed to be deleted but failed to in the status as not-synced. Additionally, we requeue and try the deletion another time, just as we do with applying currently.

As the current Update method is unused since we changed from create to apply, it is deleted. Mocks are generated freshly as well.

TODOs:

  • squash commits
  • include documentation
  • add unit tests

There are two problems with deleting resources from Helm charts right
now: The first one is that the objects stay in the status.resources
list, even after they are deleted. The second is that instead of
returning an error when a deletion failed, we returned an error on
success.

Instead, as we base deletion of objects based on the status.resources
list (this can be changed in the future), we keep resources that are
supposed to be deleted but failed to in the status as not-synced.
Additionally, we requeue and try the deletion another time, just as we
do with applying currently.

As the current Update method is unused since we changed from create to
apply, it is deleted. Mocks are generated freshly as well.

Signed-off-by: janiskemper <[email protected]>
@janiskemper janiskemper merged commit ad039ca into main Nov 27, 2023
6 checks passed
@janiskemper janiskemper deleted the fix-delete branch November 27, 2023 11:48
@jschoone jschoone added the Container Issues or pull requests relevant for Team 2: Container Infra and Tooling label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Container Issues or pull requests relevant for Team 2: Container Infra and Tooling
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants