-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow uploading of ISO for creating kubernetes supported versions #9561
base: 4.20
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #9561 +/- ##
============================================
- Coverage 15.98% 15.98% -0.01%
Complexity 13077 13077
============================================
Files 5649 5650 +1
Lines 495617 495781 +164
Branches 59997 60013 +16
============================================
+ Hits 79247 79250 +3
- Misses 407520 407681 +161
Partials 8850 8850
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
158acb9
to
364f4ce
Compare
@blueorangutan package |
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10728 |
@vishesh92 would you mind adding some images to the description? |
@vishesh92 will this create access issues? Currently, k8s ISOs are registered as public and are accessible to all. But now will it allow linking any existing ISO which can be seen by root admin. |
I can add checks on the backend to ensure that the ISO has the required configuration settings. But it might be confusing for the end user. Let me revisit the approach and directly allow uploading of ISO for k8s. |
364f4ce
to
be1539f
Compare
@blueorangutan package |
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 10747 |
be1539f
to
6d378b5
Compare
@blueorangutan package |
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
@vishesh92 |
@weizhouapache My initial PR was for linking an existing ISO with a CKS Supported version (main...shapeblue:cloudstack:k8s-version-add-iso-id-backup). @shwstppr had some concerns regarding the iso's permissions. So, I made the implementation similar to how it is there right now for templates & ISOs. |
we can add some restrictions
I had a quick look at your initial PR, it looks ok to me |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10772 |
@weizhouapache I am not sure about changing the properties of the existing ISO. I can maybe create a copy of the ISO with required ownership and properties. Do you think that would be a better approach? |
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
@vishesh92 could you please fix the merge conflicts. Thank you. |
@vishesh92 , please also look at target branch and release, these do not match. |
6d378b5
to
85ae62f
Compare
@blueorangutan package |
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12444 |
uploadIso.setName(isoName); | ||
uploadIso.setPublicIso(true); | ||
if (zoneId != null) { | ||
uploadIso.setZoneId(zoneId); |
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.
zoneId - seems to be a mandatory param for upload iso, so I wonder if this could cause some failure if upload iso is done by a user / dom admin
considering https://github.com/apache/cloudstack/blob/main/server/src/main/java/com/cloud/template/TemplateAdapterBase.java#L194-L197
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 followed the existing checks in AddKubernetesSupportedVersionCmd
for the upload command.
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 also need to check if we allow domain admin or a user to add kubernetes versions.
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.
It seems like by default we do not allow registering kubernetes iso for dom admins. Corner case is when we add custom roles. But I think that can be overlooked.
Description
This PR fixes #8417 by allowing the user to register an ISO by uploading from local.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?