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

fix: cleanup outdated routes #102935

Merged
merged 1 commit into from
Jun 17, 2021
Merged

Conversation

nilo19
Copy link
Member

@nilo19 nilo19 commented Jun 17, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

Cherry pick from kubernetes-sigs/cloud-provider-azure#661.

Cleanup outdated routes, which includes:

  1. delete non-dualstack routes when the dualstack is enabled;
  2. delete dualstack routes when the dualstack is disabled.

If the route name contains ____, we consider it a dualstack route. If the prefix of a route name is not one of the node name, we do not touch it.

Which issue(s) this PR fixes:

Fixes kubernetes-sigs/cloud-provider-azure#657

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: cleanup outdated routes

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/priority critical-urgent
/sig cloud-provider
/area provider-azure
/triage accepted
cc @feiskyer

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. labels Jun 17, 2021
@k8s-ci-robot
Copy link
Contributor

@nilo19: The label(s) area/provider-azure cannot be applied, because the repository doesn't have them.

In response to this:

What type of PR is this?

/kind bug

What this PR does / why we need it:

Cherry pick from kubernetes-sigs/cloud-provider-azure#661.

Cleanup outdated routes, which includes:

  1. delete non-dualstack routes when the dualstack is enabled;
  2. delete dualstack routes when the dualstack is disabled.

If the route name contains ____, we consider it a dualstack route. If the prefix of a route name is not one of the node name, we do not touch it.

Which issue(s) this PR fixes:

Fixes kubernetes-sigs/cloud-provider-azure#657

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: cleanup outdated routes

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/priority critical-urgent
/sig cloud-provider
/area provider-azure
/triage accepted
cc @feiskyer

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 triage/accepted Indicates an issue or PR is ready to be actively worked on. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 17, 2021
@nilo19
Copy link
Member Author

nilo19 commented Jun 17, 2021

/area provider/azure

@k8s-ci-robot k8s-ci-robot added the area/provider/azure Issues or PRs related to azure provider label Jun 17, 2021
Copy link
Member

@feiskyer feiskyer 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 Jun 17, 2021
@nilo19
Copy link
Member Author

nilo19 commented Jun 17, 2021

/assign @cheftako

deleteRoute := false
if d.az.nodeNames.Has(split[0]) {
if d.az.ipv6DualStackEnabled && len(split) == 1 {
klog.V(2).Infof("cleanupOutdatedRoutes: deleting outdated non-dualstack route %s", existingRouteName)
Copy link
Member

Choose a reason for hiding this comment

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

@cheftako
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako, feiskyer, nilo19

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 Jun 17, 2021
@k8s-ci-robot k8s-ci-robot merged commit 3dbe33a into kubernetes:master Jun 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jun 17, 2021
@nilo19 nilo19 deleted the bug/cherry-pick-661 branch June 18, 2021 00:05
k8s-ci-robot added a commit that referenced this pull request Jul 16, 2021
…35-upstream-release-1.21

Cherry pick of #100110: Cherry pick #537 from cloud provider azure: Refresh VM cache when node is not found and #102935: fix: cleanup outdated routes
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/cloudprovider area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Routes cannot have the same AddressPrefix
4 participants