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

Promote service load balancer finalizer to Beta #81691

Merged
merged 2 commits into from Aug 28, 2019

Conversation

@MrHohn
Copy link
Member

commented Aug 21, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:
Ref kubernetes/enhancements#980 and kubernetes/cloud-provider#16. This PR promotes service load balancer finalizer to Beta and enable it by default. The e2e test has been patched to ensure finalizer is attached upon cluster upgrade.

The finalizer removal logic has been enabled in k8s 1.15 to allow a functioning cluster rollback.

Which issue(s) this PR fixes:

Fixes #53451

Special notes for your reviewer:
/assign @bowei @andrewsykim

Does this PR introduce a user-facing change?:

Finalizer Protection for Service LoadBalancers is now in Beta (enabled by default). This feature ensures the Service resource is not fully deleted until the correlating load balancer resources are deleted.

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


@@ -63,3 +67,49 @@ func WaitForServiceResponding(c clientset.Interface, ns, name string) error {
return true, nil
})
}

func WaitForServiceDeletedWithFinalizer(cs clientset.Interface, namespace, name string) {

This comment has been minimized.

Copy link
@MrHohn

MrHohn Aug 21, 2019

Author Member

These two functions are moved without modification to allow reusing --- the only change is replacing the hardcoded "service.kubernetes.io/load-balancer-cleanup" with the imported one.

// This test verifies if service load balancer cleanup finalizer is properly
// handled during service lifecycle.
// 1. Create service with type=LoadBalancer. Finalizer should be added.
// 2. Update service to type=ClusterIP. Finalizer should be removed.
// 3. Update service to type=LoadBalancer. Finalizer should be added.
// 4. Delete service with type=LoadBalancer. Finalizer should be removed.
ginkgo.It("should handle load balancer cleanup finalizer for service [Slow] [Feature:ServiceFinalizer]", func() {

This comment has been minimized.

Copy link
@MrHohn

MrHohn Aug 21, 2019

Author Member

Keyword "[Feature:ServiceFinalizer]" has been removed to allow this to be run with the usual slow test suite.

// when feature gate isn't enabled on the cluster.
// This ensures downgrading from higher version cluster will not break LoadBalancer
// type service.
ginkgo.It("should remove load balancer cleanup finalizer when service is deleted [Slow]", func() {

This comment has been minimized.

Copy link
@MrHohn

MrHohn Aug 21, 2019

Author Member

With finalizer now being enabled by default, this test case is no longer necessary.

@MrHohn

This comment has been minimized.

Copy link
Member Author

commented Aug 21, 2019

/priority important-soon
/sig network

@MrHohn MrHohn force-pushed the MrHohn:svc-finalizer-beta branch 2 times, most recently from 8457d9f to 3643e1c Aug 21, 2019
@MrHohn MrHohn force-pushed the MrHohn:svc-finalizer-beta branch from 3643e1c to 407a296 Aug 21, 2019
@MrHohn MrHohn force-pushed the MrHohn:svc-finalizer-beta branch from 407a296 to 0a7c085 Aug 21, 2019
@MrHohn

This comment has been minimized.

Copy link
Member Author

commented Aug 22, 2019

/retest

@andrewsykim

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Aug 22, 2019
@MrHohn

This comment has been minimized.

Copy link
Member Author

commented Aug 22, 2019

Thanks for the quick review. Adding Tim for approval on the feature gate.
/assign @thockin

Copy link
Member

left a comment

Thanks!

/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 27, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrHohn, thockin

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 merged commit ab13cf1 into kubernetes:master Aug 28, 2019
23 checks passed
23 checks passed
cla/linuxfoundation MrHohn authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Aug 28, 2019
foundFinalizer := false
for _, finalizer := range svc.Finalizers {
if finalizer == servicehelper.LoadBalancerCleanupFinalizer {
foundFinalizer = true

This comment has been minimized.

Copy link
@tedyu

tedyu Aug 28, 2019

Contributor

We can break from the loop.

This comment has been minimized.

Copy link
@tedyu

tedyu Aug 28, 2019

Contributor

See #82053

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.