Skip to content
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

feat: add support for vlcm (offline software depots, cluster images) #2143

Merged
merged 10 commits into from
Mar 11, 2024

Conversation

spacegospod
Copy link
Collaborator

@spacegospod spacegospod commented Mar 6, 2024

Description

The goal of this PR is to provide users with the ability to configure custom images for clusters using vLCM.
To achieve that I am adding

  1. A new resource for offline software depots. Support for online depots can be added at a later time.
    Only depots with source type "PULL" are supported. This is intentional and aims to discourage the use of the deprecated VUM functionality.
  2. A new data source for base images. Declaring this data source allows users to retrieve the full list of available ESXi versions for their environment.
  3. A new property for compute clusters that serves as an entry point for the vLCM configuration.
    It allows users to select a base image and a list of custom components from a depot.
    Configuring this property for the first time also enables vLCM on the cluster

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output of make test

Ran the following acceptance tests:

=== RUN   TestAccResourceVSphereComputeCluster_basic
--- PASS: TestAccResourceVSphereComputeCluster_basic (133.60s)
=== RUN   TestAccResourceVSphereComputeCluster_haAdmissionControlPolicyDisabled
--- PASS: TestAccResourceVSphereComputeCluster_haAdmissionControlPolicyDisabled (169.08s)
=== RUN   TestAccResourceVSphereComputeCluster_drsHAEnabled
--- PASS: TestAccResourceVSphereComputeCluster_drsHAEnabled (127.58s)
=== RUN   TestAccResourceVSphereComputeCluster_vlcm
--- PASS: TestAccResourceVSphereComputeCluster_vlcm (766.70s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanDedupEnabled
--- PASS: TestAccResourceVSphereComputeCluster_vsanDedupEnabled (167.37s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanCompressionEnabled
--- PASS: TestAccResourceVSphereComputeCluster_vsanCompressionEnabled (151.22s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanPerfEnabled
--- PASS: TestAccResourceVSphereComputeCluster_vsanPerfEnabled (152.49s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanPerfVerboseEnabled
--- PASS: TestAccResourceVSphereComputeCluster_vsanPerfVerboseEnabled (147.17s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanPerfVerboseDiagnosticEnabled
--- PASS: TestAccResourceVSphereComputeCluster_vsanPerfVerboseDiagnosticEnabled (146.63s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanUnmapEnabledwithVsanEnabled
--- PASS: TestAccResourceVSphereComputeCluster_vsanUnmapEnabledwithVsanEnabled (147.46s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanUnmapDisabledwithVsanDisabled
--- PASS: TestAccResourceVSphereComputeCluster_vsanUnmapDisabledwithVsanDisabled (230.83s)
=== RUN   TestAccResourceVSphereComputeCluster_vsanDITEncryption
--- PASS: TestAccResourceVSphereComputeCluster_vsanDITEncryption (168.3)
=== RUN   TestAccResourceVSphereOfflineSoftwareDepot_basic
--- PASS: TestAccResourceVSphereOfflineSoftwareDepot_basic (168.36s)

Release Note

Release note for CHANGELOG:

Adding support for vLCM - a new resource for offline depots, a new data source for base images, new properties on clusters that allow users to do base image customizations

References

Closes #2142

@spacegospod spacegospod requested a review from a team as a code owner March 6, 2024 11:46
@spacegospod spacegospod marked this pull request as draft March 6, 2024 11:47
@tenthirtyam tenthirtyam added this to the On Deck milestone Mar 6, 2024
@tenthirtyam tenthirtyam self-requested a review March 6, 2024 17:25
@tenthirtyam tenthirtyam added enhancement Type: Enhancement upstream/govmomi Upstream: vmware/govmomi labels Mar 6, 2024
@tenthirtyam tenthirtyam changed the title feat: Add support for vLCM - offline software depots, cluster images feat: add support for vlcm (offline software depots, cluster images) Mar 6, 2024
@tenthirtyam
Copy link
Collaborator

Dependent on the next release of vmware/govmomi with vmware/govmomi#3377.

Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Stoyan 👋🏻 -

Could you add the required documenation to the /website/docs/... directories for the new resource and data source?

I'll get a PR in for updating vmware/govmomi to v0.36.0 that released today with your upstream changes and then rebase this PR.

Ryan

@spacegospod
Copy link
Collaborator Author

Hi Stoyan 👋🏻 -

Could you add the required documenation to the /website/docs/... directories for the new resource and data source?

I'll get a PR in for updating vmware/govmomi to v0.36.0 that released today with your upstream changes and then rebase this PR.

Ryan

Thanks for taking care of the govmomi bump. I will add docs for the new entities

tenthirtyam added a commit that referenced this pull request Mar 7, 2024
Bump `github.com/vmware/govmomi` from 0.35.0 to 0.36.0.

Ref: #2143

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
tenthirtyam added a commit that referenced this pull request Mar 7, 2024
Bump `github.com/vmware/govmomi` from 0.35.0 to 0.36.0.

Ref: #2143

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
tenthirtyam and others added 7 commits March 7, 2024 12:33
Bump `github.com/vmware/govmomi` from 0.35.0 to 0.36.0.

Ref: #2143

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
Updates `CHANGELOG.md`

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@tenthirtyam
Copy link
Collaborator

Rebased but the CI is failing:

--- FAIL: TestProvider (0.00s)
    provider_test.go:25: err: resource vsphere_offline_software_depot: key: ValidateFunc is for validating user input, there's nothing to validate on computed-only field
FAIL

@spacegospod
Copy link
Collaborator Author

Rebased but the CI is failing:

--- FAIL: TestProvider (0.00s)
    provider_test.go:25: err: resource vsphere_offline_software_depot: key: ValidateFunc is for validating user input, there's nothing to validate on computed-only field
FAIL

Silly me, I added validations on my computed properties

Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
@tenthirtyam tenthirtyam marked this pull request as ready for review March 9, 2024 16:08
@tenthirtyam tenthirtyam self-requested a review March 11, 2024 17:23
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tenthirtyam tenthirtyam merged commit 40e4997 into main Mar 11, 2024
2 checks passed
@tenthirtyam tenthirtyam deleted the feature/vlcm-depots-drafts branch March 11, 2024 17:40
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: Enhancement upstream/govmomi Upstream: vmware/govmomi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for vLCM on compute clusters
3 participants