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

feat(controller): add paused resource handling and update manager setup #156

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jds9090
Copy link
Contributor

@jds9090 jds9090 commented Dec 26, 2024

Closes #155

Copy link
Member

@prometherion prometherion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 💯 sure pause should block deletion: AFAIK there's the Kubernetes convention where deletion is blocked only by finalizers.

The main problem I see here is the following: imagine a Kamaji Control Plane paused in a Namespace, and the parent Namespace is deleted. With the proposed code, when this condition happen, the Namespace deletion will stuck untill the Kubernetes administrator removes the paused annotation (if he knows the knob).

Despite this, it would be better ask to CAPI maintainers if paused objects should block deletion or not, and according to their answers evaluate if we need further code changes.

However, I'm totally ok with the feature changes will introduce, thanks!

@jds9090
Copy link
Contributor Author

jds9090 commented Dec 26, 2024

I'm not 💯 sure pause should block deletion: AFAIK there's the Kubernetes convention where deletion is blocked only by finalizers.

The main problem I see here is the following: imagine a Kamaji Control Plane paused in a Namespace, and the parent Namespace is deleted. With the proposed code, when this condition happen, the Namespace deletion will stuck untill the Kubernetes administrator removes the paused annotation (if he knows the knob).

Despite this, it would be better ask to CAPI maintainers if paused objects should block deletion or not, and according to their answers evaluate if we need further code changes.

However, I'm totally ok with the feature changes will introduce, thanks!

Thank you for the insightful feedback! I'd like to provide some clarification regarding the use of the paused annotation in the current implementation.

The behavior implemented in this PR is consistent with the existing behavior of other CAPI resources, such as:

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.

Enhance KamajiControlPlane Controller with Paused Resource Handling
2 participants