Reference https://github.com/garethr/kubeval/issues/18
(I presume this is a more general issue, but describing a specific
instance below.)
Take Service. This takes a spec.type value which the OpenAPI spec
describes as a string. However if you read the describe it's clear
only certain values are valid:
https://github.com/garethr/kubernetes-json-schema/blob/master/master-standalone/service.json#L140
JSON Schema (and OpenAPI 2 it seems
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md)
will happily accept this data as an enum:
"enum": ["ExternalName", "ClusterIP", "NodePort", "LoadBalancer"]
Is this understanding correct?
Is there a reason this information
isn't encoded in the OpenAPI description at present?
As another example, several descriptions state that strings have to be
a DNS_LABEL. This has a formal regex in the docs, but this isn't
represented in the spec. It's not clear OpenAPI supports regex, which
JSON Schema does, so this second point might be an OpenAPI 2 issue
bubbling through.
Thanks again. I appreciate responses to these.
I'm also tempted to come up with a talk around some of this spelunking
for KubeCon if folks think it might interest more than just me?
Cheers
Gareth
--
Gareth Rushgrove
@garethr
devopsweekly.com
morethanseven.net
garethrushgrove.com
--
You received this message because you are subscribed to the Google Groups "K8s API Machinery SIG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-api-machinery+unsub...@googlegroups.com.
To post to this group, send email to kubernetes-sig-api-machinery@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-api-machinery/CAFi_6y%2BOSYVWjRpenYDLMANwssr8d9UnEWoqMdJgFrd7%2BQo6_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Cheers
Gareth
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-api-machinery+unsubs...@googlegroups.com.
To post to this group, send email to kubernetes-sig-api-machinery@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-api-machinery/CAFi_6y%2BOSYVWjRpenYDLMANwssr8d9UnEWoqMdJgFrd7%2BQo6_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "K8s API Machinery SIG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-api-machinery+unsub...@googlegroups.com.
To post to this group, send email to kubernetes-sig-api-machinery@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-api-machinery/CAKCBhs5VmaPt9UzRL8xhNNJsFM2jRF6ZTX1S7xukWOzbqydWww%40mail.gmail.com.