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

Support linking VM resources with Projects on Nutanix #5266

Merged
merged 3 commits into from
Mar 17, 2023

Conversation

thunderboltsid
Copy link
Contributor

@thunderboltsid thunderboltsid commented Mar 15, 2023

These changes allow specifying an optional project in the NutanixMachineConfig
which, when specified, is propagated to the corresponding NutanixMachineTemplate
property.

How has this been tested?

  • Used a bundle-release.yaml with eksa-components.yaml and cluster-controller image overridden to
    the ones corresponding to the changes in this PR.
  • Set the project property in NutanixMachineConfig manifests to my-project: A project that already exists in Prism Central
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
kind: NutanixMachineConfig
metadata:
  name: eksa-sid-cp
spec:
  ...
  project:
    name: my-project
    type: name
  ...

---
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
kind: NutanixMachineConfig
metadata:
  name: eksa-sid
spec:
  ...
  project:
    name: my-project
    type: name
  ...
  • Created a cluster successfully
$ bin/eksctl-anywhere create cluster -f ./${CLUSTER_NAME}.yaml --force-cleanup -v 10  --bundles-override ./bundle-release-project.yaml
...
2023-03-15T23:00:00.450+0100	V0	🎉 Cluster created!
  • Check the names of the machines in the created cluster
$ kubectl get machines -A
NAMESPACE     NAME                             CLUSTER    NODENAME                         PROVIDERID                                       PHASE     AGE   VERSION
eksa-system   eksa-sid-22rsp                   eksa-sid   eksa-sid-22rsp                   nutanix://33182ce4-e87e-4145-93f5-9441157c6e00   Running   21m   v1.24.10-eks-1-24-12
eksa-system   eksa-sid-476bp                   eksa-sid   eksa-sid-476bp                   nutanix://d82e1a2e-7c65-4f90-bfe8-5d3a28934e21   Running   21m   v1.24.10-eks-1-24-12
eksa-system   eksa-sid-bkvlk                   eksa-sid   eksa-sid-bkvlk                   nutanix://62754b9a-258b-4efb-bf2c-ff9d8de880c0   Running   21m   v1.24.10-eks-1-24-12
eksa-system   eksa-sid-md-0-85b84bd54d-2l4gb   eksa-sid   eksa-sid-md-0-85b84bd54d-2l4gb   nutanix://47989010-bd02-45be-abf0-4fd5fd3c668c   Running   21m   v1.24.10-eks-1-24-12
eksa-system   eksa-sid-md-0-85b84bd54d-hx9st   eksa-sid   eksa-sid-md-0-85b84bd54d-hx9st   nutanix://69494499-4c38-48a4-bc92-9aff8d89ca8c   Running   21m   v1.24.10-eks-1-24-12
eksa-system   eksa-sid-md-0-85b84bd54d-rsndq   eksa-sid   eksa-sid-md-0-85b84bd54d-rsndq   nutanix://0aa24440-e038-4ab8-8b55-df3900aec941   Running   21m   v1.24.10-eks-1-24-12
  • Verify on Prism Central that the VMs corresponding to the machines above are linked to the my-project project.
    2023-03-15 at 23 06

Full install logs: https://app.warp.dev/block/ZQ5t4rdhmUL0GCNQZ2JqNW

@eks-distro-bot
Copy link
Collaborator

Hi @thunderboltsid. Thanks for your PR.

I'm waiting for a aws 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.

@eks-distro-bot eks-distro-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 15, 2023
@thunderboltsid thunderboltsid force-pushed the ntnx-project-support branch 3 times, most recently from 2c4ab46 to 201aa96 Compare March 15, 2023 23:53
@thunderboltsid
Copy link
Contributor Author

/assign @abhinavmpandey08

@abhinavmpandey08
Copy link
Member

/ok-to-test

@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Merging #5266 (56afc4e) into main (f37d0de) will increase coverage by 0.01%.
The diff coverage is 82.35%.

@@            Coverage Diff             @@
##             main    #5266      +/-   ##
==========================================
+ Coverage   72.39%   72.40%   +0.01%     
==========================================
  Files         439      439              
  Lines       36047    36097      +50     
==========================================
+ Hits        26095    26136      +41     
- Misses       8386     8394       +8     
- Partials     1566     1567       +1     
Impacted Files Coverage Δ
pkg/api/v1alpha1/nutanixmachineconfig_types.go 95.52% <ø> (ø)
pkg/api/v1alpha1/nutanixmachineconfig.go 93.52% <25.00%> (-2.04%) ⬇️
pkg/providers/nutanix/validator.go 87.64% <83.33%> (-0.68%) ⬇️
pkg/api/v1alpha1/nutanixmachineconfig_webhook.go 92.70% <100.00%> (ø)
pkg/providers/nutanix/template.go 93.21% <100.00%> (+0.32%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@abhinavmpandey08 abhinavmpandey08 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm
/woof

@eks-distro-bot
Copy link
Collaborator

@abhinavmpandey08: dog image

In response to this:

/approve
/lgtm
/woof

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.

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavmpandey08

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit 4c29415 into aws:main Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants