1
0
mirror of https://github.com/rancher/types.git synced 2025-07-31 20:55:00 +00:00

Move field from type to kind for HostPathVolumeSource

This commit is contained in:
zionwu 2018-04-10 20:48:51 +08:00
parent 6306c85dbc
commit 964d8b5c80

View File

@ -44,6 +44,21 @@ func persistentVolumeTypes(schemas *types.Schemas) *types.Schemas {
AddMapperForType(&Version, v1.PersistentVolume{},
&m.AnnotationField{Field: "description"},
).
AddMapperForType(&Version, v1.HostPathVolumeSource{},
m.Move{From: "type", To: "kind"},
m.Enum{
Options: []string{
"DirectoryOrCreate",
"Directory",
"FileOrCreate",
"File",
"Socket",
"CharDevice",
"BlockDevice",
},
Field: "kind",
},
).
MustImport(&Version, v1.PersistentVolumeSpec{}, struct {
StorageClassName *string `json:"storageClassName,omitempty" norman:"type=reference[storageClass]"`
}{}).