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 CidrCollection support to route53 controller #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gvdhart
Copy link
Contributor

@gvdhart gvdhart commented Jul 23, 2024

Issue #, if available: NA

Description of changes:
Adding CidrCollection compatibility to the route53 controller

  • Create and Delete CidrCollections
  • Put and Delete CidrLocations and CidrBlocks in a CidrCollection
    All using a single k8s resource for each AWS cidr Collection.

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

Copy link

ack-prow bot commented Jul 23, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gvdhart
Once this PR has been reviewed and has the lgtm label, please assign a-hilaly for approval by writing /assign @a-hilaly in a comment. 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

@ack-prow ack-prow bot requested a review from a-hilaly July 23, 2024 12:41
@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 23, 2024
Copy link

ack-prow bot commented Jul 23, 2024

Hi @gvdhart. 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.

@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 23, 2024
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.

Thank you @gvdhart !! i did a quick review to the API and the comparison functions, please let me know what you think.


// Information about changes to a CIDR collection.
// +kubebuilder:validation:Required
Locations []*CIDRCollectionChange `json:"locations"`
Copy link
Member

Choose a reason for hiding this comment

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

Do we want this to be a [][]CIDRBlocks ? Also wondering if we really need the Action field.

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 agree, we technically do not need the Action field in the resource definition, however I used the generator to create this field, let me check if I can simplify this part as indeed it would be nicer to have a cidrBlock representation here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After investigation I do not think that a CIdrBlock type is the best here, there is just a string in it that contains all cidrblocks, not a list of strings. Furthermore I would have to complicate things in the genrator file to get that working. I would prefer to leave it like this.
Sure the Action field is not required as I set it in the code, but i could not manage to have it removed with the generator.

pkg/resource/cidr_collection/hooks.go Show resolved Hide resolved
@gvdhart gvdhart force-pushed the feat/add-cidr-collections branch 2 times, most recently from 1cfc8f2 to 92a2bff Compare August 23, 2024 13:03
@gvdhart
Copy link
Contributor Author

gvdhart commented Aug 23, 2024

/retest

@gvdhart gvdhart force-pushed the feat/add-cidr-collections branch from 92a2bff to 2d9f8d3 Compare September 10, 2024 12:18
@gvdhart
Copy link
Contributor Author

gvdhart commented Sep 10, 2024

@a-hilaly I think it is good to go!
However I have one test that fails 'route53-verify-attribution' but I don't know what this one does and it never failed before.

@gvdhart
Copy link
Contributor Author

gvdhart commented Sep 17, 2024

/retest

Copy link

ack-prow bot commented Sep 17, 2024

@gvdhart: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
route53-verify-attribution 2d9f8d3 link false /test route53-verify-attribution

Full PR test history. Your PR dashboard.

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.

@gvdhart gvdhart requested a review from a-hilaly September 24, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants