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

Ensure public IP removed after service deleted #59340

Merged
merged 1 commit into from Feb 6, 2018

Conversation

@feiskyer
Copy link
Member

feiskyer commented Feb 5, 2018

What this PR does / why we need it:

When creating many LoadBalancer services, some services may exceed Azure basic LB's FrontendIPConfiguations quota (default is 10). Public IPs are created for all services, but it is not removed after deleting the kubernetes services.

This PR fixes the problem.

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

Special notes for your reviewer:

Should cherry-pick to v1.9.

Release note:

Ensure Azure public IP removed after service deleted
@feiskyer

This comment has been minimized.

Copy link
Member Author

feiskyer commented Feb 5, 2018

/sig azure

@feiskyer

This comment has been minimized.

Copy link
Member Author

feiskyer commented Feb 5, 2018

/kind bug

@feiskyer feiskyer requested a review from karataliu Feb 6, 2018

@feiskyer

This comment has been minimized.

Copy link
Member Author

feiskyer commented Feb 6, 2018

@karataliu @andyzhangx Could you take a look at this?

@@ -383,10 +383,12 @@ func (az *Cloud) findServiceIPAddress(clusterName string, service *v1.Service, i
return "", err
}
if !existsLb {
return "", fmt.Errorf("Expected to find an IP address for service %s but did not", service.Name)
glog.V(4).Infof("Expected to find an IP address for service %s but did not. Assuming it has been removed", service.Name)

This comment has been minimized.

@andyzhangx

andyzhangx Feb 6, 2018

Member

set as glog.V(2) ? as default is 2

This comment has been minimized.

@andyzhangx

andyzhangx Feb 6, 2018

Member

Or Warningf ?

This comment has been minimized.

@feiskyer

feiskyer Feb 6, 2018

Author Member

This should be treated as normal message, changed to V(2)

}
if len(lbStatus.Ingress) < 1 {
return "", fmt.Errorf("Expected to find an IP address for service %s but it had no ingresses", service.Name)
glog.V(4).Infof("Expected to find an IP address for service %s but it had no ingresses. Assuming it has been removed", service.Name)

This comment has been minimized.

@andyzhangx

andyzhangx Feb 6, 2018

Member

set as glog.V(2) ? as default is 2

This comment has been minimized.

@andyzhangx

andyzhangx Feb 6, 2018

Member

Or Warningf ?

@feiskyer feiskyer force-pushed the feiskyer:fip branch from c7f817a to e2eaccb Feb 6, 2018

@andyzhangx

This comment has been minimized.

Copy link
Member

andyzhangx commented Feb 6, 2018

/lgtm

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 6, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, feiskyer

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@feiskyer

This comment has been minimized.

Copy link
Member Author

feiskyer commented Feb 6, 2018

/retest

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Feb 6, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Feb 6, 2018

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Feb 6, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Feb 6, 2018

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Feb 6, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Feb 6, 2018

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 87f77cd into kubernetes:master Feb 6, 2018

12 of 13 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation feiskyer authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-unit Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

@feiskyer feiskyer deleted the feiskyer:fip branch Feb 7, 2018

@k8s-cherrypick-bot

This comment has been minimized.

Copy link

k8s-cherrypick-bot commented Feb 7, 2018

Removing label cherrypick-candidate because no release milestone was set. This is an invalid state and thus this PR is not being considered for cherry-pick to any release branch. Please add an appropriate release milestone and then re-add the label.

k8s-github-robot pushed a commit that referenced this pull request Feb 16, 2018

Kubernetes Submit Queue
Merge pull request #59453 from feiskyer/automated-cherry-pick-of-#593…
…40-upstream-release-1.9

Automatic merge from submit-queue.

Automated cherry pick of #59340: Ensure public IP removed after service deleted

Cherry pick of #59340 on release-1.9.

#59340: Ensure public IP removed after service deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.