Skip to content

Commit f80cf4d

Browse files
authored
Merge pull request #32667 from dobsonj/kep-596-1.24-updates
Update security considerations for CSI inline ephemeral volumes
2 parents bdd26fe + f9ba38b commit f80cf4d

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

content/en/docs/concepts/storage/ephemeral-volumes.md

+13-16
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,17 @@ instructions.
127127

128128
### CSI driver restrictions
129129

130-
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
131-
132-
As a cluster administrator, you can use a [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) to control which CSI drivers can be used in a Pod, specified with the
133-
[`allowedCSIDrivers` field](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicyspec-v1beta1-policy).
134-
135-
{{< note >}}
136-
PodSecurityPolicy is deprecated and will be removed in the Kubernetes v1.25 release.
137-
{{< /note >}}
130+
CSI ephemeral volumes allow users to provide `volumeAttributes`
131+
directly to the CSI driver as part of the Pod spec. A CSI driver
132+
allowing `volumeAttributes` that are typically restricted to
133+
administrators is NOT suitable for use in an inline ephemeral volume.
134+
For example, parameters that are normally defined in the StorageClass
135+
should not be exposed to users through the use of inline ephemeral volumes.
136+
137+
Cluster administrators who need to restrict the CSI drivers that are
138+
allowed to be used as inline volumes within a Pod spec may do so by:
139+
- Removing `Ephemeral` from `volumeLifecycleModes` in the CSIDriver spec, which prevents the driver from being used as an inline ephemeral volume.
140+
- Using an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) to restrict how this driver is used.
138141

139142
### Generic ephemeral volumes
140143

@@ -248,14 +251,8 @@ same namespace, so that these conflicts can't occur.
248251
Enabling the GenericEphemeralVolume feature allows users to create
249252
PVCs indirectly if they can create Pods, even if they do not have
250253
permission to create PVCs directly. Cluster administrators must be
251-
aware of this. If this does not fit their security model, they have
252-
two choices:
253-
- Use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)
254-
that rejects objects like Pods that have a generic ephemeral
255-
volume.
256-
- Use a [Pod Security Policy](/docs/concepts/security/pod-security-policy/)
257-
where the `volumes` list does not contain the `ephemeral` volume type
258-
(deprecated since Kubernetes 1.21).
254+
aware of this. If this does not fit their security model, they should
255+
use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) that rejects objects like Pods that have a generic ephemeral volume.
259256

260257
The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota) still applies, so
261258
even if users are allowed to use this new mechanism, they cannot use

content/en/docs/concepts/storage/volumes.md

-1
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,6 @@ A `csi` volume can be used in a Pod in three different ways:
12111211

12121212
* through a reference to a [PersistentVolumeClaim](#persistentvolumeclaim)
12131213
* with a [generic ephemeral volume](/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volume)
1214-
(alpha feature)
12151214
* with a [CSI ephemeral volume](/docs/concepts/storage/ephemeral-volumes/#csi-ephemeral-volume)
12161215
if the driver supports that (beta feature)
12171216

0 commit comments

Comments
 (0)