fix admission controller bit

This commit is contained in:
Matthew Wong
2016-08-23 07:41:32 -04:00
parent edbac93ea8
commit 4e486e97b6
+12 -12
View File
@@ -227,26 +227,26 @@ A claim can request a particular class by specifying the name of a
Only PVs of the requested class, ones with the same annotation as the PVC, can Only PVs of the requested class, ones with the same annotation as the PVC, can
be bound to the PVC. be bound to the PVC.
PVCs don't necessarily have to request a class, they can omit the annotation or PVCs don't necessarily have to request a class. A PVC with its annotation set
set it to `""`. The cluster treats PVCs that don't request a class differently equal to `""` is always interpreted to be requesting a PV with no class, so it
depending on whether the can only be bound to PVs with no class (no annotation or one set equal to
`""`). A PVC with no annotation is not quite the same and is treated differently
by the cluster depending on whether the
[`SimpleDefaultStorageClassForPVC` admission controller](docs/admin/admission-controllers/#simpledefaultstorageclassforpvc) [`SimpleDefaultStorageClassForPVC` admission controller](docs/admin/admission-controllers/#simpledefaultstorageclassforpvc)
is turned on. is turned on.
* If the admission controller is turned on, the administrator may specify a * If the admission controller is turned on, the administrator may specify a
default `StorageClass`. All PVCs that don't request a `StorageClass` can be default `StorageClass`. All PVCs that have no annotation can be bound only to
bound only to PVs of that default. A consequence of this is that the PVs those PVs of that default. Specifying a default `StorageClass` is done by setting the
PVCs would normally be bound to, the PVs that have no class (no annotation or annotation annotation `storageclass.beta.kubernetes.io/is-default-class` equal to "true" in
equal to `""`), are unable to be bound to any PVC. Specifying a default a `StorageClass` object. If the administrator does not specify a default, the
`StorageClass` is done by setting the annotation
`storageclass.beta.kubernetes.io/is-default-class` equal to "true" in a
`StorageClass` object. If the administrator does not specify a default, the
cluster responds to PVC creation as if the admission controller were turned off. cluster responds to PVC creation as if the admission controller were turned off.
If more than one default is specified, the admission controller forbids the If more than one default is specified, the admission controller forbids the
creation of all PVCs. creation of all PVCs.
* If the admission controller is turned off, there is no notion of a default * If the admission controller is turned off, there is no notion of a default
`StorageClass`. All PVCs that don't request a `StorageClass` can be bound only `StorageClass`. All PVCs that have no annotation can be bound only to PVs that
to PVs that have no class. have no class. In this case the PVCs that have no annotation are treated the
same way as PVCs that have their annotation set to `""`.
In the future after beta, the `volume.beta.kubernetes.io/storage-class` In the future after beta, the `volume.beta.kubernetes.io/storage-class`
annotation will become an attribute. annotation will become an attribute.