cluster-api-provider-vsphere icon indicating copy to clipboard operation
cluster-api-provider-vsphere copied to clipboard

:sparkles: content library support proposal

Open adam-jian-zhang opened this issue 1 year ago • 17 comments

What this PR does / why we need it:

Proposal for content library support.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #1838

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


Support content library as the source for VM clone.

adam-jian-zhang avatar Mar 27 '23 07:03 adam-jian-zhang

Hi @adam-jian-zhang. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

k8s-ci-robot avatar Mar 27 '23 07:03 k8s-ci-robot

@srm09 please have a review.

adam-jian-zhang avatar Mar 27 '23 07:03 adam-jian-zhang

/assign @yastij /ok-to-test

The verify markdown job is failing, could you please fix that.

srm09 avatar Apr 06 '23 21:04 srm09

@srm09, @yastij , @rikatz, @vrabbi I have addressed the comments, and fixed lint, please have a review.

adam-jian-zhang avatar Apr 13 '23 12:04 adam-jian-zhang

/lgtm Thank you!

rikatz avatar Apr 13 '23 12:04 rikatz

/assign @vrabbi /assign @randomvariable

randomvariable avatar Jul 20 '23 17:07 randomvariable

/assign @rikatz

randomvariable avatar Aug 03 '23 17:08 randomvariable

/lgtm cancel

randomvariable avatar Aug 15 '23 13:08 randomvariable

hey @adam-jian-zhang , just took a look into the proposal again and left some comments.

Additionally, out of the proposal but IMHO should be part of the implementation, I think we need to consider that:

  • This workflow should be as easy and transparent as possible to the user. This means that from an API change, I think it is fine to have just the scheme/itemname support and nothing else.
  • While not part of the direct implementation, I think that lowering the adoption bar of this feature would be great for users, so I would expect that there's a quick start documentation on using Content Libraries, some real next/next/finish like "Create content library, import OVA item, use it on your CAPV cluster".

I'm happy and also interested to help you move this proposal forward, let me know if you need something from me to keep this moving!

rikatz avatar Aug 21 '23 20:08 rikatz

@rikatz maybe worth talking directly to @adam-jian-zhang to figure out when and who will continue on this one or if it makes sense to take this over :-)

chrischdi avatar Aug 31 '23 17:08 chrischdi

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from randomvariable. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Sep 21 '23 21:09 k8s-ci-robot

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.89%. Comparing base (d37d6f9) to head (76f9abb). Report is 640 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1839      +/-   ##
==========================================
- Coverage   60.96%   60.89%   -0.08%     
==========================================
  Files         164      164              
  Lines        9469     9469              
==========================================
- Hits         5773     5766       -7     
- Misses       3285     3290       +5     
- Partials      411      413       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 21 '23 21:09 codecov[bot]

Question: should we add a featureflag for it?

rikatz avatar Sep 25 '23 14:09 rikatz

Question: should we add a featureflag for it?

Good question: I tend to say no, because you have to explicitly use the library:// prefix to make use of it. There's no magical "gets used".

When adding a feature gate for it I think we would also have to verify it on creation (if the feature gate is disabled) that no library:// prefix gets set.

chrischdi avatar Sep 25 '23 14:09 chrischdi

@chrischdi 👋

I'm coming back to this (after almost 2 months of hiatus, sorry!)

Can you take a new look just to see if I'm missing something?

I think the most important piece right now is that the "cloning" from a Content Library should happen on a different workflow, as it does not use a template/object reference but instead https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/1839/files#diff-05d6df7ed3848d35aa732cfdeb480d8a394f42809bc3489bc87a9bcdcc0fcc6dR219 and also as you pointed, it is "sync" (does not return a task).

Thanks!

rikatz avatar Nov 20 '23 22:11 rikatz

Hi @rikatz , I think this looks good to continue.

The only question coming up for me after reading all again is this part here:

https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/1839/files#r1335335234

About "do we have to pre download it in some way" but I'd let it up to you if there is something to think about here. It would be more obvious to me when we have code :-)

chrischdi avatar Nov 21 '23 08:11 chrischdi

@adam-jian-zhang: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-e2e-main 30e3b1d9f9b8eacbabacb2d190e166577e04f8ca link true /test pull-cluster-api-provider-vsphere-e2e-main
pull-cluster-api-provider-vsphere-e2e-blocking-main 76f9abbdfd84640031858cf43ed66a133b2a4d17 link true /test pull-cluster-api-provider-vsphere-e2e-blocking-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

k8s-ci-robot avatar Jan 26 '24 18:01 k8s-ci-robot

/close

Let's revive if there is interest in this again

sbueringer avatar Apr 09 '24 12:04 sbueringer

@sbueringer: Closed this PR.

In response to this:

/close

Let's revive if there is interest in this again

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.

k8s-ci-robot avatar Apr 09 '24 12:04 k8s-ci-robot