-
Notifications
You must be signed in to change notification settings - Fork 25
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: label review app namespaces #370
Conversation
bac005e
to
44a2e3c
Compare
44a2e3c
to
89f2229
Compare
``` | ||
python -m setuptools_scm | ||
``` | ||
|
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.
if this command is not run, hokusai version
reports v0.0.0 (the dummy string in pyproject.toml). that causes conflict with projects that require certain versions of Hokusai (e.g. hokusai-sandbox).
'name': clean_string(app_name) | ||
'name': clean_string(app_name), | ||
'labels': { | ||
'app-phase': 'review' |
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.
potentially another use case for a ~/.hokusai.conf
config file. i would have a var there like org=acme
, then this label can become acme/app-phase: review
which should never conflict with any label k8s might automatically add to this resource in the future.
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 LGTM though, admittedly, I'm not familiar with the test patterns. I'll hold on the merge until in the event there is something that you want to follow up on after.
thanks it should be good to merge. |
Supports PHIRE-179
We have a script that cleans up old Review Apps. It does so by deleting their Kubernetes namespaces.
The script must know which namespaces are Review Apps. Currently there is no way to determine that from the name of a namespace. Therefore, the script is hardcoded with a list of non-Review-App namespaces and it deletes namespaces not on that list.
However, the list has become a burden to upkeep. This PR proposes to label Review App namespaces with
app-phase=review
. This allows the script to filter namespaces by that label, then we can do away with the non-Review-App list.Un-related fix:
setuptools_scm
for local dev.