Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ require (
k8s.io/client-go v0.32.2
k8s.io/code-generator v0.32.2
knative.dev/caching v0.0.0-20250415164313-8f20a1163dbf
knative.dev/eventing v0.44.1-0.20250414180812-5f466ad3711a
knative.dev/eventing v0.44.1-0.20250417160803-a7b2f1c9f66f
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f
knative.dev/serving v0.44.1-0.20250415122313-c7e30759e276
knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15
sigs.k8s.io/yaml v1.4.0
)

Expand Down Expand Up @@ -157,7 +157,7 @@ require (
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
knative.dev/networking v0.0.0-20250411212114-f1b08e6cfc7f // indirect
knative.dev/networking v0.0.0-20250415164913-6268d931d247 // indirect
sigs.k8s.io/controller-runtime v0.19.0 // indirect
sigs.k8s.io/gateway-api v1.1.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1716,18 +1716,18 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/caching v0.0.0-20250415164313-8f20a1163dbf h1:qQnKB6mx+beHzsoKU8aKrRU0oWAfgzKG2JgWMzr8CrM=
knative.dev/caching v0.0.0-20250415164313-8f20a1163dbf/go.mod h1:q8ma7YxJ8Dofr+5kf3qR72A/7Zxl9uqQlOdMwNgCXY4=
knative.dev/eventing v0.44.1-0.20250414180812-5f466ad3711a h1:NVEdYUpBeOUXn/oMmKFKpWGjpbQu1mWruoIiuuDH0Sw=
knative.dev/eventing v0.44.1-0.20250414180812-5f466ad3711a/go.mod h1:yfeVEbDoHBjz8+wFtAwJSgQt18FRXc3MhAmhyDz1lbE=
knative.dev/eventing v0.44.1-0.20250417160803-a7b2f1c9f66f h1:K+iLXIv7ek9KJ4IIi8pTAAdpBGFRJY1yM+wxjr4Nu/M=
knative.dev/eventing v0.44.1-0.20250417160803-a7b2f1c9f66f/go.mod h1:dlIk5DSCtUR8CAT6YgAB1PScYy8mz27oFCfBWN+8tG4=
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775 h1:UstB8/aowofYFHjLyZdPh1K7qB9BCx+lP1WuiCspYRE=
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
knative.dev/networking v0.0.0-20250411212114-f1b08e6cfc7f h1:x1kpIezFHPUqIOUVbT2foQFrLtdwK9krzs4OfLyY5R4=
knative.dev/networking v0.0.0-20250411212114-f1b08e6cfc7f/go.mod h1:rjkDjuJfuA64ABptp9QZjWgOWkdRhuz2dP8KUIbE+PQ=
knative.dev/networking v0.0.0-20250415164913-6268d931d247 h1:BQcW8ur+WAmj6GCpYHyUyWoaJWVTs/75W1EObUV/bdA=
knative.dev/networking v0.0.0-20250415164913-6268d931d247/go.mod h1:Y6OMRz/12RC8fzVa3gAB6K8BR415xbF4z35IAbdMHFc=
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883 h1:UeOY7009M0EHwdyW3P35Fc1U6FJHzBrj6Gf370do8zY=
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883/go.mod h1:ptwLYr04MAyeoRvhnhhz0FFkVZTdYJV2QWnw9sZyFSM=
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f h1:4JZHD997Yav2K6JJU93sjxvcPXNHVY4lC1dWhzyeBXg=
knative.dev/reconciler-test v0.0.0-20250415170512-23f86169156f/go.mod h1:jrNdg5OPDhfxYxXDLqA4iv9zvfLhNYpYKmaQvz4ZpRM=
knative.dev/serving v0.44.1-0.20250415122313-c7e30759e276 h1:qYhU3IH0mrNyKDMG0j03UvEY9ZhiwousMTYKcCCMGrM=
knative.dev/serving v0.44.1-0.20250415122313-c7e30759e276/go.mod h1:xUGf85a3Dssald2oNjNoqoZHxWeCPsGQICp3u227Zks=
knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15 h1:pXqh4Q2QOiUNteaQqrHEDOKjLDywJuF1F7I8K7Amt+k=
knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15/go.mod h1:yXmbxEHxO4O+CmRBq7HFZ0ZNMg+/WRbLio7759Qe5/I=
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
Expand Down
4 changes: 4 additions & 0 deletions vendor/knative.dev/serving/pkg/apis/config/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const (
FeaturePodSpecHostNetwork = "kubernetes.podspec-hostnetwork"
FeaturePodSpecHostPID = "kubernetes.podspec-hostpid"
FeaturePodSpecHostPath = "kubernetes.podspec-volumes-hostpath"
FeaturePodSpecCSI = "kubernetes.podspec-volumes-csi"
FeaturePodSpecInitContainers = "kubernetes.podspec-init-containers"
FeaturePodSpecNodeSelector = "kubernetes.podspec-nodeselector"
FeaturePodSpecPVClaim = "kubernetes.podspec-persistent-volume-claim"
Expand Down Expand Up @@ -99,6 +100,7 @@ func defaultFeaturesConfig() *Features {
PodSpecTolerations: Disabled,
PodSpecVolumesEmptyDir: Enabled,
PodSpecVolumesHostPath: Disabled,
PodSpecVolumesCSI: Disabled,
PodSpecPersistentVolumeClaim: Disabled,
PodSpecPersistentVolumeWrite: Disabled,
QueueProxyMountPodInfo: Disabled,
Expand Down Expand Up @@ -137,6 +139,7 @@ func NewFeaturesConfigFromMap(data map[string]string) (*Features, error) {
asFlag(FeaturePodSpecHostNetwork, &nc.PodSpecHostNetwork),
asFlag(FeaturePodSpecHostPID, &nc.PodSpecHostPID),
asFlag(FeaturePodSpecHostPath, &nc.PodSpecVolumesHostPath),
asFlag(FeaturePodSpecCSI, &nc.PodSpecVolumesCSI),
asFlag(FeaturePodSpecInitContainers, &nc.PodSpecInitContainers),
asFlag(FeaturePodSpecNodeSelector, &nc.PodSpecNodeSelector),
asFlag(FeaturePodSpecPVClaim, &nc.PodSpecPersistentVolumeClaim),
Expand Down Expand Up @@ -180,6 +183,7 @@ type Features struct {
PodSpecTolerations Flag
PodSpecVolumesEmptyDir Flag
PodSpecVolumesHostPath Flag
PodSpecVolumesCSI Flag
PodSpecInitContainers Flag
PodSpecPersistentVolumeClaim Flag
PodSpecPersistentVolumeWrite Flag
Expand Down
4 changes: 4 additions & 0 deletions vendor/knative.dev/serving/pkg/apis/serving/fieldmask.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ func VolumeSourceMask(ctx context.Context, in *corev1.VolumeSource) *corev1.Volu
out.HostPath = in.HostPath
}

if cfg.Features.PodSpecVolumesCSI != config.Disabled {
out.CSI = in.CSI
}

// Too many disallowed fields to list

return out
Expand Down
11 changes: 11 additions & 0 deletions vendor/knative.dev/serving/pkg/apis/serving/k8s_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ func validateVolume(ctx context.Context, volume corev1.Volume) *apis.FieldError
errs = errs.Also(&apis.FieldError{Message: fmt.Sprintf("HostPath volume support is disabled, "+
"but found HostPath volume %s", volume.Name)})
}
if volume.CSI != nil && features.PodSpecVolumesCSI != config.Enabled {
errs = errs.Also(&apis.FieldError{Message: fmt.Sprintf("CSI volume support is disabled, "+
"but found CSI volume %s", volume.Name)})
}
errs = errs.Also(apis.CheckDisallowedFields(volume, *VolumeMask(ctx, &volume)))
if volume.Name == "" {
errs = apis.ErrMissingField("name")
Expand Down Expand Up @@ -169,6 +173,10 @@ func validateVolume(ctx context.Context, volume corev1.Volume) *apis.FieldError
specified = append(specified, "hostPath")
}

if vs.CSI != nil {
specified = append(specified, "csi")
}

if len(specified) == 0 {
fieldPaths := []string{"secret", "configMap", "projected"}
cfg := config.FromContextOrDefaults(ctx)
Expand All @@ -181,6 +189,9 @@ func validateVolume(ctx context.Context, volume corev1.Volume) *apis.FieldError
if cfg.Features.PodSpecVolumesHostPath == config.Enabled {
fieldPaths = append(fieldPaths, "hostPath")
}
if cfg.Features.PodSpecVolumesCSI == config.Enabled {
fieldPaths = append(fieldPaths, "csi")
}
errs = errs.Also(apis.ErrMissingOneOf(fieldPaths...))
} else if len(specified) > 1 {
errs = errs.Also(apis.ErrMultipleOneOf(specified...))
Expand Down
6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ k8s.io/utils/trace
## explicit; go 1.23.0
knative.dev/caching/pkg/apis/caching
knative.dev/caching/pkg/apis/caching/v1alpha1
# knative.dev/eventing v0.44.1-0.20250414180812-5f466ad3711a
# knative.dev/eventing v0.44.1-0.20250417160803-a7b2f1c9f66f
## explicit; go 1.23.0
knative.dev/eventing/cmd/heartbeats
knative.dev/eventing/pkg/apis
Expand Down Expand Up @@ -1525,7 +1525,7 @@ knative.dev/eventing/test/upgrade/prober/wathola/sender
# knative.dev/hack v0.0.0-20250331013814-c577ed9f7775
## explicit; go 1.21
knative.dev/hack
# knative.dev/networking v0.0.0-20250411212114-f1b08e6cfc7f
# knative.dev/networking v0.0.0-20250415164913-6268d931d247
## explicit; go 1.23.0
knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking
Expand Down Expand Up @@ -1659,7 +1659,7 @@ knative.dev/reconciler-test/pkg/resources/service
knative.dev/reconciler-test/pkg/resources/serviceaccount
knative.dev/reconciler-test/pkg/state
knative.dev/reconciler-test/resources/certificate
# knative.dev/serving v0.44.1-0.20250415122313-c7e30759e276
# knative.dev/serving v0.44.1-0.20250418122003-880ea71a0c15
## explicit; go 1.23.0
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down
Loading