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 for peering cluster VNet to an existing VNet #1694

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

Jont828
Copy link
Contributor

@Jont828 Jont828 commented Sep 16, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it: Adds a service that allows for a vnet that's deployed with a new cluster to be peered to an existing vnet.

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

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Add functionality to peer a new VNet with an existing VNet in cluster deployment

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 16, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @Jont828. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 16, 2021
@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Sep 16, 2021
@Jont828 Jont828 changed the title [WIP] Add support for peering cluster vnet to an existing vnet [WIP] Add support for peering cluster VNet to an existing VNet Sep 17, 2021
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Sep 17, 2021
@Jont828 Jont828 force-pushed the vnet-peering branch 2 times, most recently from 129c473 to acccb12 Compare September 17, 2021 23:14
@Jont828
Copy link
Contributor Author

Jont828 commented Sep 17, 2021

Still need to clean up code/comments and add test cases before PR is ready for review

@Jont828
Copy link
Contributor Author

Jont828 commented Sep 21, 2021

I added test cases using the mock peerings and would appreciate feedback on the changes so far

@Jont828 Jont828 changed the title [WIP] Add support for peering cluster VNet to an existing VNet Add support for peering cluster VNet to an existing VNet Sep 21, 2021
@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 Sep 21, 2021
azure/scope/cluster.go Outdated Show resolved Hide resolved
Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

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

Left some clean up comments. Unit tests look solid. Consider adding an end to end test to validate the functionality.

api/v1alpha4/types.go Outdated Show resolved Hide resolved
azure/scope/cluster.go Outdated Show resolved Hide resolved
azure/services/virtualnetworks/virtualnetworks.go Outdated Show resolved Hide resolved
azure/services/virtualnetworks/virtualnetworks.go Outdated Show resolved Hide resolved
azure/scope/cluster.go Outdated Show resolved Hide resolved
azure/services/vnetpeerings/vnetpeerings.go Outdated Show resolved Hide resolved
api/v1alpha4/types.go Outdated Show resolved Hide resolved
azure/services/vnetpeerings/vnetpeerings_test.go Outdated Show resolved Hide resolved
@CecileRobertMichon
Copy link
Contributor

@Jont828 please document this feature in https://capz.sigs.k8s.io/topics/custom-vnet.html

@CecileRobertMichon
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot 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 Sep 21, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 8, 2021
Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

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

Noticed some config files that you don't want to commit, and couple little changes. Outside of sorting out the Bastion subnet issue and the small changes, this is looking solid. Great work!

api/v1beta1/types.go Outdated Show resolved Hide resolved
azure/services/virtualnetworks/virtualnetworks.go Outdated Show resolved Hide resolved
azure/services/vnetpeerings/vnetpeerings.go Show resolved Hide resolved
config/default/manager_image_patch.yaml Outdated Show resolved Hide resolved
config/default/manager_pull_policy.yaml Outdated Show resolved Hide resolved
@Jont828 Jont828 force-pushed the vnet-peering branch 2 times, most recently from 61a248f to b82be8c Compare October 11, 2021 19:38
@Jont828 Jont828 force-pushed the vnet-peering branch 3 times, most recently from 8078c5c to efc0cb5 Compare October 11, 2021 20:40
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

PR looks really good, added a couple of minor comments. Really glad you were able to add E2E tests!

@k8s-ci-robot
Copy link
Contributor

@Jont828: 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
pull-cluster-api-provider-azure-apidiff ea34709 link false /test pull-cluster-api-provider-azure-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 11, 2021
Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

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

Impressive work, @Jont828! 👏

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: devigned

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit f3b18bc into kubernetes-sigs:main Oct 12, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.5 milestone Oct 12, 2021
@jackfrancis
Copy link
Contributor

💃🕺💃🕺💃🕺💃🕺💃🕺

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. area/provider/azure Issues or PRs related to azure provider 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. 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. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Peering of Cluster VNET to existing VNET
5 participants