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

Lifecycle hooks for CAPI objects #5141

Closed
srm09 opened this issue Aug 23, 2021 · 7 comments
Closed

Lifecycle hooks for CAPI objects #5141

srm09 opened this issue Aug 23, 2021 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. kind/proposal Issues or PRs related to proposals. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@srm09
Copy link
Contributor

srm09 commented Aug 23, 2021

User Story

As a developer/operator, I would like to run some custom logic/code for certain lifecycle events in the CAPI objects and pause the object reconciliation until the external entity finishes its execution.

Detailed Description

Currently, in CAPI, we have the ability to alter the Machine object's lifecycle after it has been marked for deletion using a special set of annotations. The presence of these annotations pauses the reconciliation,(in this case deletion) of the Machine object until the action taken by the external component is completed which is indicated by the removal of the annotations.

Extending on this pattern, as a cluster operator, I would like to have the ability to subscribe to the lifecycle events (creation/deletion/scaling up) for CAPI objects, run some custom logic and pause the object reconciliation until the execution is finished.

Anything else you would like to add:

The idea is to come up with a generic way of attaching external subscribers to events in the CAPI object lifecycle, which can be backed by Conditions (initial thought, might not be the only way to achieve this). The reconciliation of the CAPI object is paused until all the subscribers subscribing to that event finish executing their custom logic. To ensure that failures during the execution of these custom actions do not block the normal operation of the CAPI objects, add a prescribable timeout with defaults while registering the subscribers.

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 23, 2021
@srm09
Copy link
Contributor Author

srm09 commented Aug 23, 2021

Using this issue, as a net to catch the use cases which could be benefited from these hooks.

@vincepri
Copy link
Member

/milestone Next

@k8s-ci-robot k8s-ci-robot added this to the Next milestone Sep 30, 2021
@vincepri
Copy link
Member

/kind proposal

@k8s-ci-robot k8s-ci-robot added the kind/proposal Issues or PRs related to proposals. label Sep 30, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 29, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 28, 2022
@fabriziopandini
Copy link
Member

This will be addressed by the work for #5175 (Runtime Extensions)
/close

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: Closing this issue.

In response to this:

This will be addressed by the work for #5175 (Runtime Extensions)
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. kind/proposal Issues or PRs related to proposals. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants