mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
storage: fix CSIInlineVolume round-trip test
When adding CSIDriver.Spec.VolumeLifecycleModes, the defaulting in pkg/apis/storage/fuzzer/fuzzer.go did not quite match the one from pkg/apis/storage/v1beta1/defaults.go, causing a test failure when the corresponding feature gate is enabled.
This commit is contained in:
parent
39724859b5
commit
6d12f2de10
@ -78,7 +78,7 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
obj.Spec.PodInfoOnMount = new(bool)
|
||||
*(obj.Spec.PodInfoOnMount) = false
|
||||
}
|
||||
if obj.Spec.VolumeLifecycleModes == nil {
|
||||
if len(obj.Spec.VolumeLifecycleModes) == 0 {
|
||||
obj.Spec.VolumeLifecycleModes = []storage.VolumeLifecycleMode{
|
||||
storage.VolumeLifecyclePersistent,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user