You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: architecture/additional_concepts/storage.adoc
+48-14Lines changed: 48 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -106,8 +106,42 @@ user for as long as they need it. Users schedule pods and access their claimed
106
106
PVs by including a `persistentVolumeClaim` in their pod's volumes block. See
107
107
xref:pvc-claims-as-volumes[below] for syntax details.
108
108
109
-
[[releasing]]
109
+
[[pvcprotection]]
110
+
=== Persistent Volume Claim Protection
111
+
112
+
[NOTE]
113
+
====
114
+
PVC protection is an alpha feature and may change in a future release of {product-title}.
115
+
====
116
+
117
+
The purpose of PVC protection is to ensure that PVCs in active use by a pod are not removed from the system, as this may result in data loss.
118
+
119
+
[NOTE]
120
+
====
121
+
A PVC is in active use by a pod when the the pod status is `Pending`, and the pod is assigned to a node or the pod status is `Running`.
122
+
====
123
+
124
+
When the PVC protection feature is enabled, if a user deletes a PVC in active use by a pod, the PVC is not immediately removed. PVC removal is postponed until the PVC is no longer actively used by any pods.
125
+
126
+
You can see that a PVC is protected when the PVC's status is `Terminating` and the `Finalizers` list includes `kubernetes.io/pvc-protection`:
To enable PVC protection, see xref:../../install_config/configuring_pvc_protection.adoc#install-config-configuring-pvc-protection[Configuring Persistent Volume Claim Protection].
143
+
144
+
[[releasing]]
111
145
=== Releasing
112
146
113
147
When a user is done with a volume, they can delete the PVC object from the API
@@ -138,7 +172,7 @@ If supported by appropriate volume plug-in, recycling performs a basic scrub (`r
138
172
139
173
[WARNING]
140
174
====
141
-
The `recycle` reclaim policy is deprecated in favor of dynamic provisioning and it will be removed in future releases.
175
+
The `recycle` reclaim policy is deprecated in favor of dynamic provisioning and is removed starting in {product-title} 3.6.
142
176
====
143
177
144
178
ifdef::openshift-origin,openshift-enterprise[]
@@ -255,7 +289,7 @@ Future attributes may include IOPS, throughput, etc.
255
289
=== Access Modes
256
290
257
291
A `PersistentVolume` can be mounted on a host in any way supported by the
258
-
resource provider. Providers will have different capabilities and each PV's
292
+
resource provider. Providers have different capabilities and each PV's
259
293
access modes are set to the specific modes supported by that particular volume.
260
294
For example, NFS can support multiple read/write clients, but a specific NFS PV
261
295
might be exported on the server as read-only. Each PV gets its own set of access
@@ -317,7 +351,7 @@ Before draining the node, first ensure the pods that use these volumes are
317
351
deleted.
318
352
====
319
353
320
-
The table below lists the access modes supported by different persistent volumes:
354
+
The table below lists the access modes supported by different PVs:
volume claim (PVC) protection] feature enabled. This feature ensures that PVCs
16
+
in active use by a pod are not removed from the system, as this may result in
17
+
data loss.
18
+
19
+
[NOTE]
20
+
====
21
+
PVC protection is an alpha feature and may change in a future release of {product-title}.
22
+
====
23
+
24
+
[[local-volume-enabling-local-volumes]]
25
+
=== Enable PVC Protection
26
+
27
+
To enable the `PVCProtection` feature gate on all masters and nodes:
28
+
29
+
. Edit or create the master configuration file on all masters (*_/etc/origin/master/master-config.yaml_* by default). Add `PVCProtection=true` under the `apiServerArguments` and `controllerArguments` sections, and add `PVCProtection` admission plugin configuration under the `admissionConfig` section:
30
+
+
31
+
[source, yaml]
32
+
----
33
+
admissionConfig:
34
+
pluginConfig:
35
+
PVCProtection:
36
+
configuration:
37
+
apiVersion: v1
38
+
disable: false
39
+
kind: DefaultAdmissionConfig
40
+
...
41
+
kubernetesMasterConfig:
42
+
...
43
+
apiServerArguments:
44
+
feature-gates:
45
+
- PVCProtection=true
46
+
...
47
+
controllerArguments:
48
+
feature-gates:
49
+
- PVCProtection=true
50
+
...
51
+
----
52
+
53
+
. On all nodes, edit or create the node configuration file (*_/etc/origin/node/node-config.yaml_* by default), and add the `PVCProtection=true` feature gate under `kubeletArguments`:
54
+
+
55
+
[source, yaml]
56
+
----
57
+
kubeletArguments:
58
+
feature-gates:
59
+
- PVCProtection=true
60
+
----
61
+
62
+
. On all masters and nodes, restart {product-title} for the changes to take effect.
0 commit comments