1
0
mirror of https://github.com/rancher/types.git synced 2025-09-06 15:42:07 +00:00

relax name validation on several types

This commit is contained in:
Ryan Sanna
2020-06-05 10:21:27 -07:00
parent 12f6c09793
commit 02238b1693
4 changed files with 34 additions and 2 deletions

View File

@@ -85,6 +85,12 @@ func persistentVolumeTypes(schemas *types.Schemas) *types.Schemas {
Description string `json:"description"`
}{}).
MustImportAndCustomize(&Version, v1.PersistentVolume{}, func(schema *types.Schema) {
schema.MustCustomizeField("name", func(field types.Field) types.Field {
field.Type = "hostname"
field.Nullable = false
field.Required = true
return field
})
schema.MustCustomizeField("volumeMode", func(field types.Field) types.Field {
field.Update = false
return field