Skip to content

Adding support for VPC association in DHCPOptions #143

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

Merged
merged 14 commits into from
Jul 20, 2023

Conversation

nishant221
Copy link
Contributor

Issue #, if available:

Description of changes:
Adding support in EC2 controller to associate VPC in DHCPOptions resource.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 10, 2023
@ack-prow
Copy link

ack-prow bot commented Jul 10, 2023

Hi @nishant221. Thanks for your PR.

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

Copy link
Member

@LikithaVemulapalli LikithaVemulapalli left a comment

Choose a reason for hiding this comment

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

Thanks @nishant221 for adding this support for VPC association in DHCPOptions, left few inline comments :)

@a-hilaly
Copy link
Member

/ok-to-test

@ack-prow ack-prow bot 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 Jul 13, 2023
@nishant221
Copy link
Contributor Author

/test ec2-kind-e2e

@a-hilaly
Copy link
Member

a-hilaly commented Jul 15, 2023

@nishant221 from the controller logs running the e2e:

2023-07-14T11:14:02.217Z	ERROR	Reconciler error	{"controller": "dhcpoptions", "controllerGroup": "ec2.services.k8s.aws", "controllerKind": "DHCPOptions", "DHCPOptions": {"name":"dhcpoptions-vpc-ref-p21r","namespace":"default"}, "namespace": "default", "name": "dhcpoptions-vpc-ref-p21r", "reconcileID": "5485841e-0f6f-4249-b5ca-935a1c86cd46", "error": "DependencyViolation: The dhcpOptions 'dopt-0daa5af75770e9472' has dependencies and cannot be deleted.\n\tstatus code: 400, request id: 2fb3d484-6bb2-44cc-bd43-c21daa6de178"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
2023-07-14T11:14:09.216Z	DEBUG	exporter.field-export-reconciler	error did not need requeue	{"error": "the source resource is not synced yet"}

Looks like we need to support detaching, and make sure to detach from a VPC before deleting the resource

@nishant221
Copy link
Contributor Author

nishant221 commented Jul 17, 2023

@a-hilaly Added following supports:

  • Support for defining multiple VPC(s) in DHCPOptions object.
  • Updating VPC list to which DHCPOptions added/removed.
  • Added support for disassociating VPCs from DHCP as well.

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks @nishant221
I have few nit comments below

@nishant221
Copy link
Contributor Author

@a-hilaly Thanks for the review. Incorporated the feedbacks and added a follow-up comment on one. Kindly have a look at your convenience.

@nishant221
Copy link
Contributor Author

/test ec2-kind-e2e

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Very close, happy to approve once these comments are addressed. Thanks again!

@nishant221
Copy link
Contributor Author

/test ec2-kind-e2e

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Happy to merge as soon as our prow jobs are fixed 👍
/retest

@ack-prow ack-prow bot added the approved label Jul 18, 2023
Copy link
Member

@LikithaVemulapalli LikithaVemulapalli left a comment

Choose a reason for hiding this comment

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

looks good to me, thanks @nishant221 :)

@LikithaVemulapalli
Copy link
Member

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2023
@ack-prow
Copy link

ack-prow bot commented Jul 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, LikithaVemulapalli, nishant221

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:
  • OWNERS [LikithaVemulapalli,a-hilaly]

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

@ack-prow ack-prow bot merged commit 0436bbe into aws-controllers-k8s:main Jul 20, 2023
@a-hilaly
Copy link
Member

@nishant221 Can you make a release PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants