InseeFrLab / InseeFrLab/onyxia

admin feature : allow the possibility to call onyxia api to suspend a service

Open
#830 2 comments 0 reactions 0 assignees View on GitHub
low priority
Dominant language
TypeScript
Stars
872
Forks
109
Avg merge
6d 3h
Merged PRs (30d)
1

Description

The suspension of a service is a great feature to allow ressources savings.

Anyway none of my user click on suspend and we begin to implement an admin task running at regular interval to ask for the suspension of user service.

The workflow is:
- alertmanager to detect an alert of a "user service to suspend"
- with alert we need to:
- find the release name (not always is the alert), find the version chart, add the repo or give the script the helm repo
- do an helm upgrade to set the release to global.suspend = true.
- send en email to the user.

There is some drawbacks:
- i need to give this jobs the same rights that onyxia-api role (to be sure to make pause)
- i need to add to this job kubectl/helm configuration and probably to take care of the helm version in the future.
- i repeat the helm repositories

I don't know the signature of onyxia api to ask for suspension but if not too hard, impleting and admin endpoint to ask for the suspension of a user service with an api admin token or something else that secure the call could allow for us a simpler workflow:

- alertmanager
- find a way from the alert to feed the onyxia api call (depending of the api structure)
- call the api endpoint onyxia admin to ask for the suspension
- send a mail.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.