• Kubernetes Submit Queue's avatar
    Merge pull request #62938 from… · bbcb3aa5
    Kubernetes Submit Queue authored
    Merge pull request #62938 from pospispa/60764-StorageObjectInUseProtection-downgrade-issue-cherry-pick-into-K8s-1.10
    
    Automatic merge from submit-queue.
    
    cherry-pick into K8s 1.10: Always Start pvc-protection-controller and pv-protection-controller
    
    **What this PR does / why we need it**:
    StorageObjectInUseProtection feature is enabled by default in K8s 1.10+. Assume K8s cluster is used with this feature enabled, i.e. finalizers are added to all PVs and PVCs. In case the K8s cluster admin disables the StorageObjectInUseProtection feature and a user deletes a PVC that is not in active use by a pod then the PVC is not removed from the system because of the finalizer. Therefore, the user will have to remove the finalizer manually in order to have the PVC removed from the system. Note: deleted PVs won't be removed from the system also because of finalizers.
    
    This problem was fixed in [K8s 1.9.6](https://github.com/kubernetes/kubernetes/releases/tag/v1.9.6) in PR https://github.com/kubernetes/kubernetes/pull/61370
    This problem is also fixed in K8s 1.11+ in PR https://github.com/kubernetes/kubernetes/pull/61324
    However, this problem is not fixed in K8s 1.10, that's why I've cherry-picked the PR https://github.com/kubernetes/kubernetes/pull/61324 and proposing to merge it into K8s 1.10.
    
    **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 
    N/A
    
    Related issue: https://github.com/kubernetes/kubernetes/issues/60764
    
    **Special notes for your reviewer**:
    
    **Release note**:
    
    ```release-note
    In case StorageObjectInUse feature is disabled and Persistent Volume (PV) or Persistent Volume Claim (PVC) contains a finalizer and the PV or PVC is deleted it is not automatically removed from the system. Now, it is automatically removed.
    ```
    bbcb3aa5
core.go 16.9 KB