Skip to content

Commit

Permalink
Bring StorageObjectInUseProtection feature to GA
Browse files Browse the repository at this point in the history
StorageObjectInUseProtection is Beta in K8s 1.10.

It's brought to GA in K8s 1.11.
  • Loading branch information
pospispa committed Mar 18, 2018
1 parent a6fd58d commit eee4f5c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 149 deletions.
3 changes: 1 addition & 2 deletions docs/admin/admission-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,7 @@ This admission controller will deny any pod that attempts to set certain escalat
This admission controller implements automation for [serviceAccounts](/docs/user-guide/service-accounts).
We strongly recommend using this admission controller if you intend to make use of Kubernetes `ServiceAccount` objects.

### Storage Object in Use Protection (beta)
{% assign for_k8s_version="v1.10" %}{% include feature-state-beta.md %}
### Storage Object in Use Protection
The `StorageObjectInUseProtection` plugin adds the `kubernetes.io/pvc-protection` or `kubernetes.io/pv-protection` finalizers to newly created Persistent Volume Claims (PVCs) or Persistent Volumes (PV). In case a user deletes a PVC or PV the PVC or PV is not removed until the finalizer is removed from the PVC or PV by PVC or PV Protection Controller. Refer to the [Storage Object in Use Protection](/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection) for more detailed information.

### ValidatingAdmissionWebhook (alpha in 1.8; beta in 1.9)
Expand Down
3 changes: 1 addition & 2 deletions docs/concepts/storage/persistent-volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,12 @@ Pods use claims as volumes. The cluster inspects the claim to find the bound vol
Once a user has a claim and that claim is bound, the bound PV belongs to the user for as long as they need it. Users schedule Pods and access their claimed PVs by including a `persistentVolumeClaim` in their Pod's volumes block. [See below for syntax details](#claims-as-volumes).

### Storage Object in Use Protection
{% assign for_k8s_version="v1.10" %}{% include feature-state-beta.md %}
The purpose of the Storage Object in Use Protection feature is to ensure that Persistent Volume Claims (PVCs) in active use by a pod and Persistent Volume (PVs) that are bound to PVCs are not removed from the system as this may result in data loss.

**Note:** PVC is in active use by a pod when the pod status is `Pending` and the pod is assigned to a node or the pod status is `Running`.
{: .note}

When the [Storage Object in Use Protection beta feature](/docs/tasks/administer-cluster/storage-object-in-use-protection/) is enabled, if a user deletes a PVC in active use by a pod, the PVC is not removed immediately. PVC removal is postponed until the PVC is no longer actively used by any pods, and also if admin deletes a PV that is bound to a PVC, the PV is not removed immediately. PV removal is postponed until the PV is not bound to a PVC any more.
When the [Storage Object in Use Protection feature](/docs/tasks/administer-cluster/storage-object-in-use-protection/) is enabled, if a user deletes a PVC in active use by a pod, the PVC is not removed immediately. PVC removal is postponed until the PVC is no longer actively used by any pods, and also if admin deletes a PV that is bound to a PVC, the PV is not removed immediately. PV removal is postponed until the PV is not bound to a PVC any more.

You can see that a PVC is protected when the PVC's status is `Terminating` and the `Finalizers` list includes `kubernetes.io/pvc-protection`:

Expand Down
144 changes: 0 additions & 144 deletions docs/tasks/administer-cluster/pvc-protection.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ title: Storage Object in Use Protection
---

{% capture overview %}
{% assign for_k8s_version="v1.10" %}{% include feature-state-beta.md %}

Persistent volume claims (PVCs) that are in active use by a pod and persistent volumes (PVs) that are bound to PVCs can be protected from pre-mature removal.

Expand Down

0 comments on commit eee4f5c

Please sign in to comment.