-
Notifications
You must be signed in to change notification settings - Fork 149
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
[WIP] Prune stale environments. #1621
Conversation
- Adds a new service that will make a Lagoon API request to remove the environment.
Love this @steveworley ! I salute you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a nice start, thanks @steveworley for this.
Just a question overall: Can we somehow make sure that this is not enabled by default? Such a service might makes sense for some usecases, but it could also lead into very very confused users of Lagoon.
Also I think we need to create a system to disable this pruning on a project/environment base, like we do for the autoIdle
, see https://github.com/amazeeio/lagoon/search?q=autoidle&type=Code
JWTAUDIENCE=api.dev \ | ||
PROJECT_REGEX=".+" \ | ||
ROUTER_LOG_INTERVAL=4h \ | ||
POD_RUN_INTERVAL=14400 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this environment variable is never used?
PROJECT_REGEX=".+" \ | ||
ROUTER_LOG_INTERVAL=4h \ | ||
POD_RUN_INTERVAL=14400 \ | ||
ELASTICSEARCH_URL="http://logs-db-service:9200" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is never used
Thanks! I just wanted to get a commit up and a starting point validated to make sure it was a direction everyone was happy with :)
Agreed - I have some local changes that looks to update the Lagoon schema definition for projects/environments to allow pruning. |
- Change cutoff date to a variable. - Use `==` as style for base string comparison.
There are two angles for consideration here - the management of environments might be better managed by the Lagoon administrator, and this task shouldn't require a dedicated service. Going to close here whilst we rethink |
Closing issues
Closes #1555