From 8c0699bc8d09415b8512ba41747e6561ec57c5fe Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Thu, 22 Feb 2018 14:14:53 -0800 Subject: [PATCH] Workload name is required --- apis/project.cattle.io/v3/schema/schema.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apis/project.cattle.io/v3/schema/schema.go b/apis/project.cattle.io/v3/schema/schema.go index 8ec8b5ba..470289fc 100644 --- a/apis/project.cattle.io/v3/schema/schema.go +++ b/apis/project.cattle.io/v3/schema/schema.go @@ -109,6 +109,12 @@ func workloadTypes(schemas *types.Schemas) *types.Schemas { schema.ResourceFields[name] = field } } + schema.MustCustomizeField("name", func(field types.Field) types.Field { + field.Type = "dnsLabel" + field.Nullable = false + field.Required = true + return field + }) }) }