-
Notifications
You must be signed in to change notification settings - Fork 24
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
Bug 2141089: Ensure vm template object has namespace #972
Bug 2141089: Ensure vm template object has namespace #972
Conversation
@upalatucci: This pull request references Bugzilla bug 2141089, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@upalatucci: This pull request references Bugzilla bug 2141089, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
please add screenshots to PR's description
why implying the template's namespace if VM has no namespace?
using the active namespace might be a better approach, wdyt?
What's the benefit of using the active namespace instead of the template namespace? Are there conditions where the template has no namespace? |
5f5e14c
to
0aef60e
Compare
I've just tested this out. If VM has no namespace specified, using the cli Anyway, in the template details page, the |
@@ -131,7 +131,7 @@ export const getDataVolumeFromState = ({ | |||
createOwnerReference?: boolean; | |||
}): V1beta1DataVolume => { | |||
const dataVolume = getEmptyVMDataVolumeResource(vm, createOwnerReference); | |||
const dvName = resultVolume?.dataVolume?.name || `${vm?.metadata?.name}-${diskState.diskName}`; |
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.
vm name can be a template parameter so just use another thing
0aef60e
to
c9f63dc
Compare
@upalatucci that's great that you tested what is happening on cli, may I assume you were logged as admin user?
than I guess using the template's namespace is really the same as using activeNamespace |
c9f63dc
to
a43bec4
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: avivtur, upalatucci The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@upalatucci: All pull requests linked via external trackers have merged: Bugzilla bug 2141089 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
📝 Description
Cause
In CDI upload, dataVolume has no namespace as the template VM object has no namespace.
Solution
when VM object in template YAML has no namespace, the template namespace is implied
NOTE: change the
dvName
default name asVM.metadata.name
in case of a template VM can be a parameter