You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
149
150
-[ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
150
151
-[ ] (R) Graduation criteria is in place
151
152
-[ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
152
153
-[ ] (R) Production readiness review completed
153
154
-[ ] (R) Production readiness review approved
154
-
-[] "Implementation History" section is up-to-date for milestone
155
-
-[] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
156
-
-[] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
155
+
-[X] "Implementation History" section is up-to-date for milestone
156
+
-[X] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
157
+
-[X] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
157
158
158
159
<!--
159
160
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
Utilize runc's "rro" bind mount option (https://github.com/opencontainers/runc/pull/3272)
189
-
to make read-only bind mounts literally read-only.
190
-
191
-
The "rro" bind mount options is implemented by calling [`mount_setattr(2)`](https://man7.org/linux/man-pages/man2/mount_setattr.2.html)
192
-
with `MOUNT_ATTR_RDONLY` and `AT_RECURSIVE`.
193
-
194
-
Requires kernel >= 5.12, with one of the following OCI runtimes:
195
-
- runc >= 1.1
196
-
- crun >= 1.4
189
+
Make read-only volumes recursively read-only.
190
+
e.g., if `/mnt` is mounted as read-only, its submounts such as `/mnt/usbstorage` should be read-only too.
197
191
198
192
## Motivation
199
193
@@ -209,6 +203,16 @@ demonstrate the interest in a KEP within the wider Kubernetes community.
209
203
The current `readOnly` volumes are not recursively read-only, and may result in compromise of data;
210
204
e.g., even if `/mnt` is mounted as read-only, its submounts such as `/mnt/usbstorage` are not read-only.
211
205
206
+
This issue can be fixed by utilizing OCI Runtime's "rro" bind mount option (https://github.com/opencontainers/runtime-spec/blob/v1.2.0/config.md#linux-mount-options)
207
+
to make read-only bind mounts recursively read-only.
208
+
209
+
The "rro" bind mount options is implemented by calling [`mount_setattr(2)`](https://man7.org/linux/man-pages/man2/mount_setattr.2.html)
210
+
with `MOUNT_ATTR_RDONLY` and `AT_RECURSIVE`.
211
+
212
+
Requires kernel >= 5.12, with one of the following OCI runtimes:
213
+
- runc >= 1.1
214
+
- crun >= 1.4
215
+
212
216
### Goals
213
217
214
218
<!--
@@ -575,9 +579,13 @@ This can inform certain test coverage improvements that we want to do before
575
579
extending the production code to implement this enhancement.
576
580
-->
577
581
578
-
- kubelet unit tests: will take a CRI status and populate the `VolumeMountStatus`.
582
+
- kubelet unit tests: takes a CRI status and populate the `RecursiveReadOnly` field in the `VolumeMountStatus` struct.
583
+
Implemented in <https://github.com/kubernetes/kubernetes/blob/v1.30.0/pkg/kubelet/kubelet_pods_test.go#L6080-L6201>.
584
+
The unit test set covers 16 conditions as of Kubernetes v1.30.0.
585
+
There is no branch coverage data (`go test -cover`), as the feature is not implemented as a dedicated Go package.
0 commit comments