-
Notifications
You must be signed in to change notification settings - Fork 382
Service Instances cascading delete proposal #2734
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/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. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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. |
/remove-lifecycle rotten |
@jhvhs: Reopened this issue. In response to this:
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. |
This project is being archived, closing open issues and PRs. |
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:
OSB API Spec states:
source: https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#deprovisioning
Discussions
Create consensus on deprovision #46
Issue created on Nov 22, 2016
Policy for handling broker deletion and deprovision #481
F2F meeting in late January, 2017
Determine how to handle deprovision requests to an instance with bindings #820
F2F meeting on May 9, 2017
Implement Matrix of Deleting Things - recursive namespace deletion decision from F2F #2229
F2F meeting on Jul 23, 2018
Proposed behaviors
Based on the discussions above, there are four proposed options:
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: #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.
The text was updated successfully, but these errors were encountered: