-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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 docs for preventing volume mode conversion #32673
Conversation
cc @xing-yang |
✅ Deploy Preview for kubernetes-io-main-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -120,6 +120,7 @@ spec: | |||
driver: hostpath.csi.k8s.io | |||
source: | |||
volumeHandle: ee0cfb94-f8d4-11e9-b2d8-0242ac110002 | |||
sourceVolumeMode: Filesystem |
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.
It's possible that a user may be reading this doc but is using an older version of CRDs and controllers. So we need to add notes right next to this field to clarify how it can be used.
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.
Done!
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.
@RaunakShah : This conversation was marked as resolved and I did not see @xing-yang 's comments actually addressed. Could you clarify if this was agreed upon to not be added eventually, please?
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.
Wasn't it agreed that users need not be developers and therefore introducing version specific information was too much effort for them? I added a note in Converting the volume mode of a Snapshot
that describes how a user can determine if their API supports this field.
/assign @didicodes |
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.
This PR also needs to register the snapshot.storage.kubernetes.io/allowVolumeModeChange
annotation, by updating https://kubernetes.io/docs/reference/labels-annotations-taints/
Please add that detail. Also, I spotted an incorrect annotation value.
Hello, this is a friendly reminder from the 1.24 docs release team that the Docs' complete deadline — All PRs reviewed and ready to merge — is EOD Tuesday, April 12th, 2022. Please finish up any remaining technical reviews and edits, and reach out if you need any help. |
/lgtm |
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.
This PR needs to register the snapshot.storage.kubernetes.io/allowVolumeModeChange annotation, by updating https://kubernetes.io/docs/reference/labels-annotations-taints/
The PR mentions an unregistered annotation. We will note the tech LGTM for further reviews. |
/lgtm |
LGTM label has been added. Git tree hash: 7e7cef152482c526cf4b7faa5c653f0df604adf1
|
@sftim @divya-mohan0209 I've removed all references to Can you review this again? |
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.
Added some feedback and unresolved some comments since I did not find them addressed. PTAL and let us know, if any queries.
Used on: VolumeSnapshotContent | ||
|
||
Value can either be `true` or `false`. | ||
This determines whether a user can modify the mode of the source volume when a `PVC` is being created from a `VolumeSnapshot`. |
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.
@RaunakShah : Please can you have a look at this suggestion? It doesn't seem to have been addressed and we think it would add value.
@@ -120,6 +120,7 @@ spec: | |||
driver: hostpath.csi.k8s.io | |||
source: | |||
volumeHandle: ee0cfb94-f8d4-11e9-b2d8-0242ac110002 | |||
sourceVolumeMode: Filesystem |
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.
@RaunakShah : This conversation was marked as resolved and I did not see @xing-yang 's comments actually addressed. Could you clarify if this was agreed upon to not be added eventually, please?
volumeSnapshotRef: | ||
name: new-snapshot-test | ||
namespace: default | ||
``` | ||
|
||
`snapshotHandle` is the unique identifier of the volume snapshot created on the storage backend. This field is required for the pre-provisioned snapshots. It specifies the CSI snapshot id on the storage system that this `VolumeSnapshotContent` represents. | ||
`sourceVolumeMode` is the mode of the volume whose snapshot is taken. The value of the `sourceVolumeMode` field can be either `Filesystem` or `Block`. If the source volume mode is not specified, Kubernetes treats the snapshot as if the source volume's mode is unknown. Support for this field is available in VolumeSnapshot client v6.0.0 and higher. | ||
|
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.
I don't see this addressed either, ptal.
@@ -493,6 +493,18 @@ you through the steps you follow to apply a seccomp profile to a Pod or to one o | |||
its containers. That tutorial covers the supported mechanism for configuring seccomp in Kubernetes, | |||
based on setting `securityContext` within the Pod's `.spec`. | |||
|
|||
### snapshot.storage.kubernetes.io/allowVolumeModeChange | |||
|
|||
Example: `snapshot.storage.kubernetes.io/allowVolumeModeChange: true` |
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.
@RaunakShah : PTAL since this hasn't been addressed and we believe it improves readability of the doc.
This determines whether a user can modify the mode of the source volume when a `PVC` is being created from a `VolumeSnapshot`. | ||
|
||
See [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) for more information. | ||
|
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.
@xing-yang : From a personal standpoint, I'd err on the side of too much information rather than too less.
In the spirit of what I just said, what we could potentially rewrite it as is suggested above.
Value can either be `true` or `false`. | ||
This determines whether a user can modify the mode of the source volume when a `PVC` is being created from a `VolumeSnapshot`. | ||
|
||
See [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) for more information. |
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.
See [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) for more information. | |
Refer to the documentation on [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) and the [Kubernetes CSI Developer Documentation](https://kubernetes-csi.github.io/docs/) for more information. |
See [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) for more information. | |
See [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) for more information. |
Value can either be `true` or `false`. | ||
This determines whether a user can modify the mode of the source volume when a `PVC` is being created from a `VolumeSnapshot`. | ||
|
||
See [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) for more information. |
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.
See [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) for more information. | |
Refer to [Converting the volume mode of a Snapshot](/docs/concepts/storage/volume-snapshots/#convert-volume-mode) and the [Kubernetes CSI Developer Documentation](https://kubernetes-csi.github.io/docs/) for more information. |
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.
Done
```yaml | ||
$ kubectl get crd volumesnapshotcontent -o yaml | ||
``` |
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.
- this isn't YAML
- don't include the command prompt
```yaml | ||
$ kubectl get crd volumesnapshotcontent -o yaml | ||
``` | ||
|
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.
After running kubectl get crd volumesnapshotcontent
, does a success exit indicate support for the sourceVolumeMode
field? If not, we should document how to actually check.
Hi Everyone! I appreciate the effort going into this, but this PR has a little less than a week to be resolved and merged into /cc @kubernetes/sig-docs-leads @JamesLaverack @xing-yang |
Review is now stale (feedback still applies)
As this is an alpha feature, perhaps we can update the release notes with a comment to make it clear that the docs for it are not finished, ship what we have, and then make sure that we don't graduate the feature to beta until they're improved? |
I'm normally not on the side of holding back a feature because of a doc. However I do feel like this doc needs a lot of work and possibly, a rewrite. So +1 to the suggestion by @sftim if the feature owner/release lead are okay with this suggestion. |
+1 to @sftim's suggestion. I'm happy to approve this as is if @AuraSinis, could you provide next steps on adding an update to the release notes? edit: at this point, it think @AuraSinis agreeing would be enough to merge this in. I'd also like to see an issue opened as a followup, but that can be done later. |
If no action is required I can just put in a note about docs still in-situ manually, easy-peasy. |
Thanks @AuraSinis! |
@nate-double-u That's fine with me. |
@nate-double-u this works for me too |
Thanks everyone, I appreciate all the effort you've put in! /lgtm |
LGTM label has been added. Git tree hash: a12fdd6736f73b4a9e164e03951068d5efe965e0
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nate-double-u The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Documentation changes for feature to prevent unauthorised volume mode conversion
KEP - https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3141-prevent-volume-mode-conversion