Skip to content

ephemeral volumes in Kubernetes 1.16 #209

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

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

pohly
Copy link
Collaborator

@pohly pohly commented Sep 13, 2019

The CSIDriverInfo object was extended and the feature changed from
alpha to beta.

@k8s-ci-robot
Copy link
Contributor

@pohly: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 13, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 13, 2019
@pohly
Copy link
Collaborator Author

pohly commented Sep 13, 2019

This assumes that csi-driver-host-path v1.2.0 gets released including kubernetes-csi/csi-driver-host-path#97. The updated CSIDriverInfo was created with kubelet+Kubernetes 1.16 4cb51f0d2d8392 and a locally compiled host path driver with the kubernetes-1.16 deployment from that PR.

@pohly
Copy link
Collaborator Author

pohly commented Sep 13, 2019

/release-notes-none

@pohly
Copy link
Collaborator Author

pohly commented Sep 13, 2019

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 13, 2019
@@ -26,6 +26,9 @@ metadata:
spec:
attachRequired: true
podInfoOnMount: true
volumeLifecycleModes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment here that it's added in 1.16

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -45,6 +48,12 @@ There are three important fields:
* `"csi.storage.k8s.io/pod.namespace": pod.Namespace`
* `"csi.storage.k8s.io/pod.uid": string(pod.UID)`
* For more information see [Pod Info on Mount](pod-info.md).
* `volumeLifecycleModes`
* This field was added in Kubernetes 1.16 and must not be set when using an older Kubernetes release.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must => cannot

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking "must not be set in the .yaml file because it's invalid", but "cannot" is simpler. Changed.

@@ -5,6 +5,7 @@
Status | Min K8s Version | Max K8s Version
--|--|--
Alpha | 1.15 | -
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alpha max is 1.15

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@pohly pohly force-pushed the inline-volumes-beta branch from 0954e22 to 54c63ed Compare September 16, 2019 12:51
Copy link
Collaborator Author

@pohly pohly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msau42: force-pushed the update

@@ -26,6 +26,9 @@ metadata:
spec:
attachRequired: true
podInfoOnMount: true
volumeLifecycleModes:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -45,6 +48,12 @@ There are three important fields:
* `"csi.storage.k8s.io/pod.namespace": pod.Namespace`
* `"csi.storage.k8s.io/pod.uid": string(pod.UID)`
* For more information see [Pod Info on Mount](pod-info.md).
* `volumeLifecycleModes`
* This field was added in Kubernetes 1.16 and must not be set when using an older Kubernetes release.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking "must not be set in the .yaml file because it's invalid", but "cannot" is simpler. Changed.

@pohly pohly force-pushed the inline-volumes-beta branch 2 times, most recently from 44bb0e3 to 65c3147 Compare September 16, 2019 12:53
its [`CSIDriverInfo`](csi-driver-object.md) object explicitly declares
that the driver supports that kind of usage in its
`volumeLifecycleModes` field. This is a safeguard against accidentally
using a driver the wrong way.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msau42: this is basically the same comment as in csi-driver-object.md ("used incorrectly by Kubernetes").

Should I expand on that in ephemeral-local-volumes.md, in csi-driver-object.md, or link to https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/20190122-csi-inline-volumes.md#support-for-inline-csi-volumes?

I'm leaning towards keeping the current text and just turning it into a link to the KEP, but I'm also fine with everything else.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just link to the KEP for now. I bring this up because there is an ask to remove this field if it's not really providing anything other than a nicer error message when someone tries to misuse a driver: kubernetes/kubernetes#82507

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the links and commented on that issue (which had escaped my attention).

If the reason for the field still isn't clear, we can update the KEP.

@msau42 msau42 mentioned this pull request Sep 17, 2019
@pohly pohly force-pushed the inline-volumes-beta branch from 65c3147 to 7e8cf77 Compare September 17, 2019 09:54
* `volumeLifecycleModes`
* This field was added in Kubernetes 1.16 and cannot be set when using an older Kubernetes release.
* It informs Kubernetes about the volume modes that are supported by the driver.
This ensures that the driver [is not used incorrectly](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/20190122-csi-inline-volumes.md#support-for-inline-csi-volumes) by Kubernetes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"by Kubernetes" or "by users"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"by Kubernetes on behalf of a user". That's becoming complicated - perhaps the sentence should simply end with "is not used incorrectly".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "by users" is fine

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"by Kubernetes" implies to me that we're protecting against Kubernetes bugs, which I don't think is the case here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to "by users".

The CSIDriverInfo object was extended and the feature changed from
alpha to beta.
@pohly pohly force-pushed the inline-volumes-beta branch from 7e8cf77 to 3a0b17f Compare September 17, 2019 20:10
@msau42
Copy link
Collaborator

msau42 commented Sep 17, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 17, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msau42, pohly

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit 7c56815 into kubernetes-csi:master Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants