From a1b30ae99eb42d67a0850fa46f6eda50796deba0 Mon Sep 17 00:00:00 2001 From: kinarashah Date: Thu, 24 May 2018 11:06:20 -0700 Subject: [PATCH] make ingress name required --- apis/project.cattle.io/v3/schema/schema.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apis/project.cattle.io/v3/schema/schema.go b/apis/project.cattle.io/v3/schema/schema.go index 3f38bed0..fb9e2d4c 100644 --- a/apis/project.cattle.io/v3/schema/schema.go +++ b/apis/project.cattle.io/v3/schema/schema.go @@ -641,7 +641,13 @@ func ingressTypes(schemas *types.Schemas) *types.Schemas { MustImport(&Version, v1beta1.IngressTLS{}, struct { SecretName string `norman:"type=reference[certificate]"` }{}). - MustImport(&Version, v1beta1.Ingress{}, projectOverride{}, struct { + MustImportAndCustomize(&Version, v1beta1.Ingress{}, func(schema *types.Schema) { + schema.MustCustomizeField("name", func(f types.Field) types.Field { + f.Required = true + f.Nullable = false + return f + }) + }, projectOverride{}, struct { Description string `json:"description"` PublicEndpoints string `json:"publicEndpoints" norman:"type=array[publicEndpoint],nocreate,noupdate"` }{})