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

✨ Add support to specify PlacementGroupPartition of placement group #4883

Merged

Conversation

chiragkyal
Copy link
Contributor

@chiragkyal chiragkyal commented Mar 19, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:

Adds support for users to specify the partition number (PlacementGroupPartition) of a placement group, identified by PlacementGroupName while creating instances.

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 #4870

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emojis
  • adds unit tests
  • adds or updates e2e tests

Release note:

Add support to specify PlacementGroupPartition of placement group in instances.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Mar 19, 2024
Copy link

linux-foundation-easycla bot commented Mar 19, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: chiragkyal / name: Chirag Kyal (7e79b8b)

@k8s-ci-robot k8s-ci-robot added needs-priority cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 19, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @chiragkyal!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @chiragkyal. 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 k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 19, 2024
@Ankitasw Ankitasw added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 22, 2024
@chiragkyal chiragkyal marked this pull request as ready for review March 25, 2024 10:57
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 25, 2024
api/v1beta2/types.go Outdated Show resolved Hide resolved
@chiragkyal chiragkyal changed the title ✨ Add support to specify PartitionNumber of placement group ✨ Add support to specify PlacementGroupPartition of placement group Mar 25, 2024
@@ -56,6 +56,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
if restored.Status.Bastion != nil {
dst.Status.Bastion.InstanceMetadataOptions = restored.Status.Bastion.InstanceMetadataOptions
dst.Status.Bastion.PlacementGroupName = restored.Status.Bastion.PlacementGroupName
dst.Status.Bastion.PlacementGroupPartition = restored.Status.Bastion.PlacementGroupPartition
Copy link
Member

Choose a reason for hiding this comment

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

No need to add this new filed in v1beta1 as we would be going to deprecate that soon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, that makes sense. I'm wondering if CI tests would complain if I remove the conversion. If that's not the case, then we can remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test failed after I removed the conversion. Can you please suggest what should be the correct approach here?

--- FAIL: TestFuzzyConversion (59.20s)
    --- FAIL: TestFuzzyConversion/for_AWSCluster (18.80s)
        --- PASS: TestFuzzyConversion/for_AWSCluster/spoke-hub-spoke (18.79s)
        --- FAIL: TestFuzzyConversion/for_AWSCluster/hub-spoke-hub (0.01s)
    --- FAIL: TestFuzzyConversion/for_AWSMachine (17.20s)

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we just leave this generated conversion in place if it is causing issues? I guess if we deprecate v1beta1, it won't matter either way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that would be better, since it's causing the CI tests failure. I've added back the conversion.

@chiragkyal
Copy link
Contributor Author

/assign @Ankitasw

@chiragkyal chiragkyal requested a review from damdo March 28, 2024 17:48
@nrb
Copy link
Contributor

nrb commented Apr 3, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 3, 2024
@damdo
Copy link
Member

damdo commented Apr 3, 2024

/test pull-cluster-api-provider-aws-e2e
/test pull-cluster-api-provider-aws-e2e-eks

@chiragkyal
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-e2e

1 similar comment
@damdo
Copy link
Member

damdo commented Apr 4, 2024

/test pull-cluster-api-provider-aws-e2e

@chiragkyal
Copy link
Contributor Author

Is this related to the PR changes? I'm not quite sure.

Summarizing 1 Failure:
  [FAIL] [unmanaged] [Cluster API Framework] Clusterctl Upgrade Spec [from latest v1beta1 release to v1beta2] [AfterEach] Should create a management cluster and then upgrade all the providers
  /home/prow/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_helpers.go:176

@damdo
Copy link
Member

damdo commented Apr 4, 2024

Looks like a flake timeout to me, hence the retest. Let's see.

@chiragkyal
Copy link
Contributor Author

All green 🎉
/cc @vincepri @Ankitasw

@Ankitasw Ankitasw added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 8, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

@k8s-ci-robot k8s-ci-robot merged commit 4b3f416 into kubernetes-sigs:main Apr 8, 2024
21 checks passed
@chiragkyal chiragkyal deleted the feature/add-partition-number branch April 8, 2024 10:37
// +kubebuilder:validation:Minimum:=1
// +kubebuilder:validation:Maximum:=7
// +optional
PlacementGroupPartition int64 `json:"placementGroupPartition,omitempty"`

Choose a reason for hiding this comment

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

Probably should have been int32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support AWS Placement Group Partition Number
7 participants