Skip to content

Commit 7539b75

Browse files
upgrade to latest dependencies (#2070)
bumping knative.dev/serving 880ea71...7f044f1: > 7f044f1 Enable Mount Propagation as a Optional Feature (# 15758) > 5653ad0 Update net-gateway-api nightly (# 15853) > ae7b265 Update net-kourier nightly (# 15855) > 4730c99 Update net-istio nightly (# 15854) Signed-off-by: Knative Automation <automation@knative.team>
1 parent b1cb402 commit 7539b75

6 files changed

Lines changed: 35 additions & 11 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775
2626
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883
2727
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f
28-
knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15
28+
knative.dev/serving v0.44.1-0.20250421011706-7f044f16a11a
2929
sigs.k8s.io/yaml v1.4.0
3030
)
3131

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,8 +1726,8 @@ knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883 h1:UeOY7009M0EHwdyW3P35Fc1U6F
17261726
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883/go.mod h1:ptwLYr04MAyeoRvhnhhz0FFkVZTdYJV2QWnw9sZyFSM=
17271727
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f h1:4JZHD997Yav2K6JJU93sjxvcPXNHVY4lC1dWhzyeBXg=
17281728
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f/go.mod h1:jrNdg5OPDhfxYxXDLqA4iv9zvfLhNYpYKmaQvz4ZpRM=
1729-
knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15 h1:pXqh4Q2QOiUNteaQqrHEDOKjLDywJuF1F7I8K7Amt+k=
1730-
knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15/go.mod h1:yXmbxEHxO4O+CmRBq7HFZ0ZNMg+/WRbLio7759Qe5/I=
1729+
knative.dev/serving v0.44.1-0.20250421011706-7f044f16a11a h1:qINmwJNLUkSb/iBaKTS0YtzKfnPyMZ/lD3/VsYZJN7s=
1730+
knative.dev/serving v0.44.1-0.20250421011706-7f044f16a11a/go.mod h1:yXmbxEHxO4O+CmRBq7HFZ0ZNMg+/WRbLio7759Qe5/I=
17311731
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
17321732
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
17331733
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=

vendor/knative.dev/serving/pkg/apis/config/features.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ const (
6565
FeaturePodSpecHostNetwork = "kubernetes.podspec-hostnetwork"
6666
FeaturePodSpecHostPID = "kubernetes.podspec-hostpid"
6767
FeaturePodSpecHostPath = "kubernetes.podspec-volumes-hostpath"
68-
FeaturePodSpecCSI = "kubernetes.podspec-volumes-csi"
68+
FeaturePodSpecVolumesCSI = "kubernetes.podspec-volumes-csi"
6969
FeaturePodSpecInitContainers = "kubernetes.podspec-init-containers"
70+
FeaturePodSpecVolumesMountPropagation = "kubernetes.podspec-volumes-mount-propagation"
7071
FeaturePodSpecNodeSelector = "kubernetes.podspec-nodeselector"
7172
FeaturePodSpecPVClaim = "kubernetes.podspec-persistent-volume-claim"
7273
FeaturePodSpecPriorityClassName = "kubernetes.podspec-priorityclassname"
@@ -100,6 +101,7 @@ func defaultFeaturesConfig() *Features {
100101
PodSpecTolerations: Disabled,
101102
PodSpecVolumesEmptyDir: Enabled,
102103
PodSpecVolumesHostPath: Disabled,
104+
PodSpecVolumesMountPropagation: Disabled,
103105
PodSpecVolumesCSI: Disabled,
104106
PodSpecPersistentVolumeClaim: Disabled,
105107
PodSpecPersistentVolumeWrite: Disabled,
@@ -139,8 +141,9 @@ func NewFeaturesConfigFromMap(data map[string]string) (*Features, error) {
139141
asFlag(FeaturePodSpecHostNetwork, &nc.PodSpecHostNetwork),
140142
asFlag(FeaturePodSpecHostPID, &nc.PodSpecHostPID),
141143
asFlag(FeaturePodSpecHostPath, &nc.PodSpecVolumesHostPath),
142-
asFlag(FeaturePodSpecCSI, &nc.PodSpecVolumesCSI),
144+
asFlag(FeaturePodSpecVolumesCSI, &nc.PodSpecVolumesCSI),
143145
asFlag(FeaturePodSpecInitContainers, &nc.PodSpecInitContainers),
146+
asFlag(FeaturePodSpecVolumesMountPropagation, &nc.PodSpecVolumesMountPropagation),
144147
asFlag(FeaturePodSpecNodeSelector, &nc.PodSpecNodeSelector),
145148
asFlag(FeaturePodSpecPVClaim, &nc.PodSpecPersistentVolumeClaim),
146149
asFlag(FeaturePodSpecPriorityClassName, &nc.PodSpecPriorityClassName),
@@ -183,6 +186,7 @@ type Features struct {
183186
PodSpecTolerations Flag
184187
PodSpecVolumesEmptyDir Flag
185188
PodSpecVolumesHostPath Flag
189+
PodSpecVolumesMountPropagation Flag
186190
PodSpecVolumesCSI Flag
187191
PodSpecInitContainers Flag
188192
PodSpecPersistentVolumeClaim Flag

vendor/knative.dev/serving/pkg/apis/serving/fieldmask.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,22 +337,28 @@ func ContainerMask(in *corev1.Container) *corev1.Container {
337337
// VolumeMountMask performs a _shallow_ copy of the Kubernetes VolumeMount object to a new
338338
// Kubernetes VolumeMount object bringing over only the fields allowed in the Knative API. This
339339
// does not validate the contents or the bounds of the provided fields.
340-
func VolumeMountMask(in *corev1.VolumeMount) *corev1.VolumeMount {
340+
func VolumeMountMask(ctx context.Context, in *corev1.VolumeMount) *corev1.VolumeMount {
341341
if in == nil {
342342
return nil
343343
}
344344

345+
cfg := config.FromContextOrDefaults(ctx)
345346
out := new(corev1.VolumeMount)
346347

347348
// Allowed fields
348349
out.Name = in.Name
349350
out.ReadOnly = in.ReadOnly
350351
out.MountPath = in.MountPath
351352
out.SubPath = in.SubPath
353+
if cfg.Features.PodSpecVolumesMountPropagation != config.Disabled {
354+
out.MountPropagation = in.MountPropagation
355+
} else {
356+
out.MountPropagation = nil
357+
}
352358

353359
// Disallowed fields
354360
// This list is unnecessary, but added here for clarity
355-
out.MountPropagation = nil
361+
out.RecursiveReadOnly = nil
356362

357363
return out
358364
}

vendor/knative.dev/serving/pkg/apis/serving/k8s_validation.go

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ func validate(ctx context.Context, container corev1.Container, volumes map[strin
627627
errs = errs.Also(apis.ErrInvalidValue(container.TerminationMessagePolicy, "terminationMessagePolicy"))
628628
}
629629
// VolumeMounts
630-
errs = errs.Also(validateVolumeMounts(container.VolumeMounts, volumes).ViaField("volumeMounts"))
630+
errs = errs.Also(validateVolumeMounts(ctx, container.VolumeMounts, volumes).ViaField("volumeMounts"))
631631

632632
return errs
633633
}
@@ -670,15 +670,16 @@ func validateSecurityContext(ctx context.Context, sc *corev1.SecurityContext) *a
670670
return errs
671671
}
672672

673-
func validateVolumeMounts(mounts []corev1.VolumeMount, volumes map[string]corev1.Volume) *apis.FieldError {
673+
func validateVolumeMounts(ctx context.Context, mounts []corev1.VolumeMount, volumes map[string]corev1.Volume) *apis.FieldError {
674674
var errs *apis.FieldError
675675
// Check that volume mounts match names in "volumes", that "volumes" has 100%
676676
// coverage, and the field restrictions.
677+
features := config.FromContextOrDefaults(ctx).Features
677678
seenName := make(sets.Set[string], len(mounts))
678679
seenMountPath := make(sets.Set[string], len(mounts))
679680
for i := range mounts {
680681
vm := mounts[i]
681-
errs = errs.Also(apis.CheckDisallowedFields(vm, *VolumeMountMask(&vm)).ViaIndex(i))
682+
errs = errs.Also(apis.CheckDisallowedFields(vm, *VolumeMountMask(ctx, &vm)).ViaIndex(i))
682683
// This effectively checks that Name is non-empty because Volume name must be non-empty.
683684
if _, ok := volumes[vm.Name]; !ok {
684685
errs = errs.Also((&apis.FieldError{
@@ -710,6 +711,19 @@ func validateVolumeMounts(mounts []corev1.VolumeMount, volumes map[string]corev1
710711
Paths: []string{"readOnly"},
711712
}).ViaIndex(i))
712713
}
714+
if vm.MountPropagation != nil {
715+
if features.PodSpecVolumesMountPropagation != config.Enabled {
716+
errs = errs.Also((&apis.FieldError{
717+
Message: fmt.Sprintf("Volume Mount Propagation support is disabled, but found volume mount %s with mount propagation", vm.Name),
718+
}).ViaIndex(i))
719+
}
720+
if *vm.MountPropagation != corev1.MountPropagationNone && *vm.MountPropagation != corev1.MountPropagationHostToContainer {
721+
errs = errs.Also((&apis.FieldError{
722+
Message: "mount propagation should be set to None or HostToContainer",
723+
Paths: []string{"mountPropagation"},
724+
}).ViaIndex(i))
725+
}
726+
}
713727

714728
if volumes[vm.Name].PersistentVolumeClaim != nil {
715729
if volumes[vm.Name].PersistentVolumeClaim.ReadOnly && !vm.ReadOnly {

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ knative.dev/reconciler-test/pkg/resources/service
16591659
knative.dev/reconciler-test/pkg/resources/serviceaccount
16601660
knative.dev/reconciler-test/pkg/state
16611661
knative.dev/reconciler-test/resources/certificate
1662-
# knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15
1662+
# knative.dev/serving v0.44.1-0.20250421011706-7f044f16a11a
16631663
## explicit; go 1.23.0
16641664
knative.dev/serving/pkg/apis/autoscaling
16651665
knative.dev/serving/pkg/apis/autoscaling/v1alpha1

0 commit comments

Comments
 (0)