1
0
mirror of https://github.com/rancher/types.git synced 2025-08-22 14:15:55 +00:00

make ingress name required

This commit is contained in:
kinarashah 2018-05-24 11:06:20 -07:00 committed by Alena Prokharchyk
parent 178e604b68
commit a1b30ae99e

View File

@ -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"`
}{})