Skip to content

Commit 7b6c56e

Browse files
authored
Merge pull request kubernetes#130135 from saschagrunert/image-volume-beta
[KEP-4639] Graduate image volume sources to beta
2 parents 05bfdbc + f9e5dd8 commit 7b6c56e

File tree

23 files changed

+770
-518
lines changed

23 files changed

+770
-518
lines changed

api/openapi-spec/swagger.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/api__v1_openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/apis__apps__v1_openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/apis__batch__v1_openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/core/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ type VolumeSource struct {
220220
// The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
221221
// The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
222222
// The volume will be mounted read-only (ro) and non-executable files (noexec).
223-
// Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath).
223+
// Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
224224
// The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
225225
// +featureGate=ImageVolume
226226
// +optional

pkg/apis/core/validation/validation.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2946,16 +2946,6 @@ func ValidateVolumeMounts(mounts []core.VolumeMount, voldevices map[string]strin
29462946
allErrs = append(allErrs, field.Invalid(idxPath.Child("mountPath"), mnt.MountPath, "must not already exist as a path in volumeDevices"))
29472947
}
29482948

2949-
// Disallow subPath/subPathExpr for image volumes
2950-
if v, ok := volumes[mnt.Name]; ok && v.Image != nil {
2951-
if len(mnt.SubPath) != 0 {
2952-
allErrs = append(allErrs, field.Invalid(idxPath.Child("subPath"), mnt.SubPath, "not allowed in image volume sources"))
2953-
}
2954-
if len(mnt.SubPathExpr) != 0 {
2955-
allErrs = append(allErrs, field.Invalid(idxPath.Child("subPathExpr"), mnt.SubPathExpr, "not allowed in image volume sources"))
2956-
}
2957-
}
2958-
29592949
if len(mnt.SubPath) > 0 {
29602950
allErrs = append(allErrs, validateLocalDescendingPath(mnt.SubPath, fldPath.Child("subPath"))...)
29612951
}

0 commit comments

Comments
 (0)