1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-15 23:01:40 +00:00

DnsLabelRestricted type to validate against RFC 1035

k8s uses restricted format for services

dnsLabelRestricted: dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
dnsLabel:dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
This commit is contained in:
Alena Prokharchyk
2018-05-29 14:34:53 -07:00
committed by Darren Shepherd
parent df1aea6651
commit e03c72e855
2 changed files with 14 additions and 0 deletions

View File

@@ -78,6 +78,8 @@ func getTypeString(nullable bool, typeName string, schema *types.Schema, schemas
return "intstr.IntOrString"
case "dnsLabel":
return "string"
case "dnsLabelRestricted":
return "string"
case "hostname":
return "string"
default: