Skip to content

Make vnets reconcile/delete async#1921

Merged
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
CecileRobertMichon:async-vnet-2
Feb 1, 2022
Merged

Make vnets reconcile/delete async#1921
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
CecileRobertMichon:async-vnet-2

Conversation

@CecileRobertMichon
Copy link
Copy Markdown
Contributor

@CecileRobertMichon CecileRobertMichon commented Dec 14, 2021

What type of PR is this?
/kind feature
/kind cleanup

What this PR does / why we need it: Follow up on #1610 and implementation of #1541 for virtual networks.

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 #

Special notes for your reviewer: This PR replaces #1684

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:

Make vnets reconcile/delete async

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 14, 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 Dec 14, 2021
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/assign @Jont828 @mboersma

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@CecileRobertMichon: GitHub didn't allow me to assign the following users: Jont828.

Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign @Jont828 @mboersma

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 the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 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 Dec 16, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 19, 2022
@CecileRobertMichon CecileRobertMichon force-pushed the async-vnet-2 branch 2 times, most recently from 1e2b278 to b1b5a8f Compare January 19, 2022 00:54
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

rebased, this is ready for review again

/assign @shysank @mboersma

@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 25, 2022
Copy link
Copy Markdown
Contributor

@shysank shysank 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 overall with one minor comment. Will do another review after rebase.

Comment thread azure/services/virtualnetworks/virtualnetworks.go Outdated
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2022
@CecileRobertMichon CecileRobertMichon force-pushed the async-vnet-2 branch 2 times, most recently from e0129f3 to a3bed43 Compare January 28, 2022 19:49
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

@shysank @Jont828 rebased and addressed comments, PTAL

@CecileRobertMichon CecileRobertMichon force-pushed the async-vnet-2 branch 5 times, most recently from 5188237 to df39987 Compare January 28, 2022 21:52
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/retest

aks flake

Copy link
Copy Markdown
Contributor

@shysank shysank 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 overall with a couple of nits and a clarification on vnet peerings

Comment thread azure/scope/cluster.go
CIDRs: s.Vnet().CIDRBlocks,
func (s *ClusterScope) VNetSpec() azure.ResourceSpecGetter {
return &virtualnetworks.VNetSpec{
ResourceGroup: s.Vnet().ResourceGroup,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see that we have not copied Peerings from the old spec. Is this a conscious decision? we were setting it previously here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, what was happening before was that we were doing a full deep copy into the vnet stored in AzureCluster.Spec which meant we had to include every single field that had been set before otherwise we would risk overwriting it. This is not good because if a new feature gets added like vnet peerings there could be a bug where the vnet write erases the user configuration (and in fact we did run into that issue during vnet peering implementation). This is hopefully simplifying the code while keeping it functionally equivalent. We only set the vnet, ID, tags and cidrs from the existing vnet while keeping the rest of the VnetSpec the same.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh okay, makes sense. Thanks for the explanation!

Comment thread azure/services/virtualnetworks/virtualnetworks.go Outdated
Comment thread azure/services/virtualnetworks/virtualnetworks.go Outdated
Cecile Robert-Michon and others added 2 commits January 28, 2022 17:28
Copy link
Copy Markdown
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.

lgtm outside of the failure in e2e when ensuring the cluster is deleted.

@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

Operation could not be completed as it results in exceeding approved standardDSv3Family Cores quota

/retest

@shysank
Copy link
Copy Markdown
Contributor

shysank commented Jan 31, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2022
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

AKS test is broken on main (see https://kubernetes.slack.com/archives/CEX9HENG7/p1643648764688369)

all other tests passed

/cc @devigned

@k8s-ci-robot k8s-ci-robot requested a review from devigned January 31, 2022 19:25
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/retest

exp test fixed in #2025

@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/retest

AKS timesync flake

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

k8s-ci-robot commented Feb 1, 2022

@CecileRobertMichon: 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 021814e 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.

Details

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.

@shysank
Copy link
Copy Markdown
Contributor

shysank commented Feb 1, 2022

/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shysank

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Feb 1, 2022
@k8s-ci-robot k8s-ci-robot merged commit a38d26a into kubernetes-sigs:main Feb 1, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Feb 1, 2022
@CecileRobertMichon CecileRobertMichon deleted the async-vnet-2 branch February 17, 2023 23:25
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

5 participants