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

azure: Add mode dependency logic to deletion #15617

Merged
merged 3 commits into from
Jul 17, 2023

Conversation

hakman
Copy link
Member

@hakman hakman commented Jul 11, 2023

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/provider/azure Issues or PRs related to azure provider labels Jul 11, 2023
@hakman hakman force-pushed the azure_delete_dependency_logic branch from 0374b96 to 344d5b3 Compare July 11, 2023 09:24
@hakman
Copy link
Member Author

hakman commented Jul 11, 2023

/retest

@hakman
Copy link
Member Author

hakman commented Jul 13, 2023

/kind office-hours

@hakman
Copy link
Member Author

hakman commented Jul 16, 2023

/assign @justinsb

var blocks []string
blocks = append(blocks, toKey(typeResourceGroup, g.resourceGroupName()))

nsgs := map[string]struct{}{}
Copy link
Member

Choose a reason for hiding this comment

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

Why not use a k8s.io/utils/set/set.Set[string]?

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting approach. Thanks.

@hakman
Copy link
Member Author

hakman commented Jul 17, 2023

/retest

for _, lb := range *ip.LoadBalancerBackendAddressPools {
lbID, err := azure.ParseLoadBalancerID(*lb.ID)
if err != nil {
return nil, fmt.Errorf("parsing load balancer ID: %s", err)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: should probably be ...: %w (?)

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just copy/paste from the original code, wanted to be easy diff.

func ParseSubnetID(s string) (*SubnetID, error) {
l := strings.Split(s, "/")
if len(l) != 11 {
return nil, fmt.Errorf("malformed format of subnet ID: %s, %d", s, len(l))
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I normally prefer to print with %q to highlight the "wrong" value, and I'm not sure that printing the length really adds any information (though I know it is handy during development!)

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just copy/paste from the original code, wanted to be easy diff.

@justinsb
Copy link
Member

Thanks @hakman

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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 Jul 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit 42d82f2 into kubernetes:master Jul 17, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 17, 2023
@hakman hakman deleted the azure_delete_dependency_logic branch August 7, 2023 06:46
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/office-hours lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

4 participants