-
Notifications
You must be signed in to change notification settings - Fork 13
Allow adding nerc.mghpcc.org/allow-unencrypted-routes: 'true' label to all pre-existing and future Openshift projects
#211
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
Conversation
knikolla
left a comment
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.
Made some comments. Otherwise looks pretty close.
src/coldfront_plugin_cloud/management/commands/validate_allocations.py
Outdated
Show resolved
Hide resolved
src/coldfront_plugin_cloud/management/commands/validate_allocations.py
Outdated
Show resolved
Hide resolved
src/coldfront_plugin_cloud/tests/functional/openshift/test_allocation.py
Show resolved
Hide resolved
naved001
left a comment
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.
I don't understand why we are trying to "replace" the namespace (api.replace) instead of just patching the namespace api.patch to update the labels.
|
@naved001 Thank you for pointing that out. I've updated the code to use |
knikolla
left a comment
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.
One last comment from me, the rest looks good.
|
@knikolla I'll let you resolve the comments and merge |
|
@naved001 can you do one final pass? |
naved001
left a comment
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.
looks good to me, but I'd like to see one small test added (inline)
src/coldfront_plugin_cloud/tests/functional/openshift/test_allocation.py
Show resolved
Hide resolved
All Openshift projects created through Coldfront will now have an additional label:
`'nerc.mghpcc.org/allow-unencrypted-routes': "true"`
`validate_allocations` has also been changed to ensure all current Openshift projects contain a few default labels:
```
PROJECT_DEFAULT_LABELS = {
'opendatahub.io/dashboard': "true",
'modelmesh-enabled': "true",
'nerc.mghpcc.org/allow-unencrypted-routes': "true"
}
```
Implementing this required code in the Openshift allocator to
interact with the Namespace API. For reasons not entirely
clear in the documentation, it is not possible
change a Project’s labels directly. This is only possible
through the Namespace API.
Closes #196. Built on top #205. This PR consists on the last commit. More info in the commit message.