Skip to content

Commit

Permalink
Bring StorageObjectInUseProtection feature to GA (#8159)
Browse files Browse the repository at this point in the history
* StorageObjectInUseProtection is GA (#8291)

* Feature gate: StorageObjectInUseProtection is GA

Update feature gate reference for 1.11

* Trivial commit to re-trigger Netlify

* Bring StorageObjectInUseProtection feature to GA

StorageObjectInUseProtection is Beta in K8s 1.10.

It's brought to GA in K8s 1.11.

* Fixed typo and added feature state tags.
  • Loading branch information
pospispa authored and Misty Linville committed Jun 27, 2018
1 parent f377f9a commit 8bf5149
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 154 deletions.
3 changes: 1 addition & 2 deletions content/en/docs/concepts/storage/persistent-volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@ 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
{{< feature-state for_k8s_version="v1.10" state="beta" >}}
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 >}}
**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
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,7 @@ This admission controller will deny any pod that attempts to set certain escalat
This admission controller implements automation for [serviceAccounts](/docs/tasks/configure-pod-container/configure-service-account/).
We strongly recommend using this admission controller if you intend to make use of Kubernetes `ServiceAccount` objects.

### StorageObjectInUseProtection (beta) {#storageobjectinuseprotection}
{{< feature-state for_k8s_version="v1.10" state="beta" >}}
### 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) {#validatingadmissionwebhook}
Expand Down
145 changes: 0 additions & 145 deletions content/en/docs/tasks/administer-cluster/pvc-protection.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ content_template: templates/task
---

{{% capture overview %}}
{{< feature-state for_k8s_version="v1.10" state="beta" >}}

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.
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 premature removal.

{{% /capture %}}

{{% capture prerequisites %}}

- The Storage Object in Use Protection feature is enabled in a version of Kubernetes in which it is supported.
The Storage Object in Use Protection feature is enabled in one of the below Kubernetes versions:
- {% assign for_k8s_version = "1.10" %} {% include feature-state-beta.md %}
- {% assign for_k8s_version = "1.11" %} {% include feature-state-stable.md %}

{{% /capture %}}

Expand Down Expand Up @@ -312,5 +313,3 @@ No resources found.


{{% /capture %}}


0 comments on commit 8bf5149

Please sign in to comment.