-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation of PV/PVC.storageClassName #2686
Add documentation of PV/PVC.storageClassName #2686
Conversation
PVs of that default. Specifying a default `StorageClass` is done by setting the | ||
annotation `storageclass.beta.kubernetes.io/is-default-class` equal to "true" in | ||
annotation `storageclass.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 plugin were turned off. If | ||
more than one default is specified, the admission plugin forbids the creation of | ||
all PVCs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the PVC specifices an existing storage class? What if the PVC does not define storage class at all? Will the claims still fail if >1 default has been configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the PVC specifices an existing storage class?
".. the administrator may specify a default StorageClass. All PVCs that have no storageClassName can be bound only to PVs of that default. " - i.e., PVCs that require a specific class are not affected by this admission plugin.
What if the PVC does not define storage class at all?
"All PVCs that have no storageClassName can be bound only to PVs of that default. " - i.e., PVCs that do not define a class are can be bound only to PVs of the default storage class. And PVC will fail here if there are two or more default storage classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsafrane my comment above was in reference to: if some-condition then "the admission plugin forbids the creation of all PVCs". I was listing a couple of scenarios where I wanted to know if the statment remains true.
Look good. |
@jsafrane I'm assuming this needs to go out w/ the 1.6 docs release, right? If so, I will tag it as such and move it to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo and grammar suggestions.
|
||
In the future after beta, the `volume.beta.kubernetes.io/storage-class` | ||
annotation will become an attribute. | ||
In the past, annotation `volume.beta.kubernetes.io/storage-class` was used instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar -- add 'the' before 'annotation': "In the past, the annotation volume.beta.kubernetes.io/storage-class
"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
In the future after beta, the `volume.beta.kubernetes.io/storage-class` | ||
annotation will become an attribute. | ||
In the past, annotation `volume.beta.kubernetes.io/storage-class` was used instead | ||
of `storageClassName` attribute. This annotation is still working, however |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar -- add 'the' after 'of': "...of the storageClassName
attribute."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
annotation will become an attribute. | ||
In the past, annotation `volume.beta.kubernetes.io/storage-class` was used instead | ||
of `storageClassName` attribute. This annotation is still working, however | ||
it won't be supported in a future Kubernetes release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: "...it will become fully deprecated in a future Kubernetes release."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -266,38 +265,39 @@ All of the requirements, from both `matchLabels` and `matchExpressions` are ANDe | |||
### Class | |||
|
|||
A claim can request a particular class by specifying the name of a | |||
`StorageClass`using the annotation `volume.beta.kubernetes.io/storage-class`. | |||
Only PVs of the requested class, ones with the same annotation as the PVC, can | |||
`StorageClass`using the attribute `storageClassName`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: add a space before 'using'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
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 `""`. | ||
`StorageClass`. All PVCs that have no `storageClassName` can be bound only to PVs that | ||
have no class. In this case the PVCs that have no `storageClassName` are treated the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grammar: add comma after "In this case"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
When a PVC specifies a `selector` in addition to requesting a `StorageClass`, | ||
the requirements are ANDed together: only a PV of the requested class and with | ||
the requested labels may be bound to the PVC. Note that currently, a PVC with a | ||
non-empty `selector` can't have a PV dynamically provisioned for it. | ||
|
||
In the future after beta, the `volume.beta.kubernetes.io/storage-class` | ||
annotation will become an attribute. | ||
In the past, annotation `volume.beta.kubernetes.io/storage-class` was used instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar -- add 'the' before 'annotation': "In the past, the annotation volume.beta.kubernetes.io/storage-class
"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
In the future after beta, the `volume.beta.kubernetes.io/storage-class` | ||
annotation will become an attribute. | ||
In the past, annotation `volume.beta.kubernetes.io/storage-class` was used instead | ||
of `storageClassName` attribute. This annotation is still working, however |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar -- add 'the' after 'of': "...of the storageClassName
attribute."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
367cf13
to
aea3c77
Compare
Thanks a lot for grammar remarks! + rebased on top of release-1.6 |
@jsafrane Great, thanks! Everything looks good. If we're not waiting on anything else, I can merge this. |
cc @kubernetes/feature-reviewers to follow the process. This is documentation update for kubernetes/enhancements#36 |
@jsafrane So, is it okay if I merge this PR now? The |
@chenopis, yes, please merge this. Thanks! |
aea3c77
to
ed35f9a
Compare
In 1.6, we move from
storage.k8s.io/v1beta1
tostorage.k8s.io/v1
and from annotationvolume.beta.kubernetes.io/storage-class
tostorageClassName
attribute. Bothv1beta1
API and the old annotation are still working for some transition period and it will be removed in future (Kubernetes 1.8 at the earliest).@kubernetes/sig-storage-misc
This change is