Closed mszostok closed 2 years ago
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
/remove-lifecycle rotten
ICYMI:
The Cascading binding deletion feature is officially available in 0.3.0 release. The controller manager deletes all Service Bindings for a Service Instance before attempting to deprovision the Service Instance. This option can be enabled by setting the CascadingDeletion feature gate to true (#2711)
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close
@fejta-bot: Closing this issue.
/remove-lifecycle rotten /reopen /lifecycle frozen
@jhvhs: Reopened this issue.
This project is being archived, closing open issues and PRs. Please see this PR for more information: https://github.com/kubernetes/community/pull/6632
Service Instances cascading delete proposal
This is the umbrella issue for the Service Instances cascading delete operation. In this issue, we also track the implementation of this functionality from alpha to GA stage.
Motivation
Currently, during the deprovisioning operation, the default case is to fail the deprovisioning if there are bindings against the instance being deprovisioned. Problems:
source: https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#deprovisioning
Discussions
https://github.com/kubernetes-sigs/service-catalog/issues/46
Issue created on Nov 22, 2016
https://github.com/kubernetes-sigs/service-catalog/issues/481
F2F meeting in late January, 2017
https://github.com/kubernetes-sigs/service-catalog/issues/820
F2F meeting on May 9, 2017
https://github.com/kubernetes-sigs/service-catalog/issues/2229
F2F meeting on Jul 23, 2018
Use the
kubectl --cascade
flagBasically, under the hood, the propagationPolicy is applied on a given resource. In case of
cascade=true
, it ispropagationPolicy=foreground
. In case ofcascade=false
, it ispropagationPolicy=background
. The propagationPolicy is managed by the Kubernetes Garbage Collection. However, this option cannot be considered because of the expected behavior:The ownerReference cannot be used because of a problem when a user sets the
--cascade=false
option. In such case, Kubernetes requires thepropagationPolicy=background
.source: https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#background-cascading-deletion
In our case, the binding must be deleted before the instance. Implementing the
background
behavior is not an option in the case of Service Catalog. Global flag for changing the behavior Add the
disable-cascading-deletion=<true/false>
flag for the Service Catalog controller-manager. This flag globally changes the behavior of the controller-manager.ServiceInstance spec property changes We can add the
deleteBehavior
field under the Instance spec. The field has two possible behaviors:forceCascade
orfailOnBindings
. In the former case, deleting an instance force-deletes all Bindings that reference the instance, without confirming with the person who deletes it. In the latter one, the deletion simply fails if there are bindings that reference the instance. *This field will be optional and it will default tofailOnBindings
. Always perform cascade deletion When a user deletes a ServiceInstance, the related ServiceBindings are deleted (execute the unbind call to the broker). When all ServiceBindings are deleted successfully, the ServiceInstance is also deleted (execute the deprovision call to the broker).
Accepted solution
Based on the client feedback and OSB API specification, we know that we want to implement this behavior and to do it safely we decided to go with the 2nd option: Global flag for changing the behavior. Reasons:
OSB API Spec:
source: https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#deprovisioning
If Users expect that deleting a Kubernetes API resource results in the total deletion of resources associated with the API resource then they can set the
disable-cascading-deletion
flag to true and controller-manager will take care about that.This solution was accepted and the alpha implementation has already been added in this PR: https://github.com/kubernetes-sigs/service-catalog/pull/2711. Starting from the Service Catalog version 0.3.0, you can enable this option by setting the CascadingDeletion feature gate to
true
. Users, who do not accept cascading deletion, the controller-manager provides a flagdisable-cascading-deletion
which blocks the feature even if the cascading deletion is enabled by default (in the future).ACTION REQUIRED
Going with this behavior is backward compatible. It was implemented as alpha. We are waiting for your feedback and use-cases if this approach happens to break your flow. It's unacceptable for us, so please let us know.