Allow adding nerc.mghpcc.org/allow-unencrypted-routes: 'true' label to all pre-existing and future Openshift projects#211
Merged
knikolla merged 1 commit intonerc-project:mainfrom May 8, 2025
Conversation
knikolla
requested changes
Apr 29, 2025
Collaborator
knikolla
left a comment
There was a problem hiding this comment.
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
naved001
reviewed
May 5, 2025
src/coldfront_plugin_cloud/tests/functional/openshift/test_allocation.py
Show resolved
Hide resolved
naved001
reviewed
May 6, 2025
Contributor
naved001
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
@naved001 Thank you for pointing that out. I've updated the code to use |
knikolla
requested changes
May 6, 2025
Collaborator
knikolla
left a comment
There was a problem hiding this comment.
One last comment from me, the rest looks good.
knikolla
approved these changes
May 7, 2025
Contributor
Author
|
@knikolla I'll let you resolve the comments and merge |
Collaborator
|
@naved001 can you do one final pass? |
naved001
reviewed
May 7, 2025
Contributor
naved001
left a comment
There was a problem hiding this comment.
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.
naved001
approved these changes
May 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #196. Built on top #205. This PR consists on the last commit. More info in the commit message.