Merge pull request #82012 from pohly/ephemeral-roundtrip-fix

storage: fix CSIInlineVolume round-trip test
This commit is contained in:
Kubernetes Prow Robot 2019-08-29 09:30:55 -07:00 committed by GitHub
commit 47214d672d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
}