diff --git a/apis/cluster.cattle.io/v3/schema/schema.go b/apis/cluster.cattle.io/v3/schema/schema.go index e4c62c9c..3f75d92c 100644 --- a/apis/cluster.cattle.io/v3/schema/schema.go +++ b/apis/cluster.cattle.io/v3/schema/schema.go @@ -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]"` }{}).