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

Timeout Controller #15

Open
wangeguo opened this issue Jun 16, 2023 · 3 comments
Open

Timeout Controller #15

wangeguo opened this issue Jun 16, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@wangeguo
Copy link
Member

wangeguo commented Jun 16, 2023

By design, Playbook has a lifecycle, from creation, initialization, compilation build, deployment, running to destruction.

Currently, we need to implement a new controller to perform periodic resource recovery (destruction) of Playbook. The following is a technical description:

  1. The administrator can set a resource recovery duration, such as 2 weeks (default);
  2. this duration is annotated on each Playbook resource definition;
  3. Timeout Controller periodically scans for Playbooks that are about to expire and performs a series of actions, such as sending reminder emails or notifications (e.g. via Slack) 3 days or 2 days before the expiration date, and performs Playbook deletion on the same day;
  4. Additional consideration is given to support Webhook notification of events in the future;

Reference:

  1. Rust Kubernetes client and controller runtime https://github.com/kube-rs/kube
  2. Kube controller-rs example: https://github.com/kube-rs/controller-rs
  3. Amphitheatre Controllers: https://github.com/amphitheatre-app/amphitheatre/tree/master/controllers
  4. k8s-ttl-controller https://github.com/fpetkovski/k8s-ttl-controller

Note: Contributors are requested to provide technical design solutions and implementation plans in the comments, as we need to communicate more fully.

@wangeguo wangeguo added enhancement New feature or request good first issue Good for newcomers labels Jun 16, 2023
@wangeguo wangeguo moved this to Todo in Amphitheatre Jun 16, 2023
@lispking lispking self-assigned this Jan 19, 2024
@lispking lispking moved this from 📋 Todo to 🏗 In progress in Amphitheatre Jan 19, 2024
@wangeguo
Copy link
Member Author

wangeguo commented Feb 2, 2024

Additional information:
The Kubernetes platform itself has a ttl-controller that is only used for Job resource recovery, the code should be in the K8s repository and can also be viewed as a reference

@wangeguo wangeguo moved this from 🏗 In progress to 📋 Todo in Amphitheatre Apr 26, 2024
@Guocork
Copy link
Contributor

Guocork commented Sep 6, 2024

#235 This issue has been done.

@wangeguo wangeguo moved this from 📋 Todo to ✅ Done in Amphitheatre Sep 6, 2024
@wangeguo
Copy link
Member Author

wangeguo commented Sep 6, 2024

#235 This issue has been done.

Cool,thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants