Replies: 2 comments 7 replies
-
While it would be nice if CUE could translate more of the Kubernetes code generation hints, in this case it doesn't matter much, at least for the default value. If you don't specify it, CUE won't export the "protocol" field, and the Kubernetes API server will note its lack and supply the default value during admission. Note the the code generation directive comments do not encode the enumeration values "SCTP," "TCP," and "UDP." Those are noted in prose near the code generation directive comments, but are otherwise ignored. |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#947. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
-
After generating the Kubernetes schema with
cue get go k8s.io/api/apps/v1
, I wonder why so many validations are commented out such as:Another surprise is this snippet:
Why are so much rules encoded in comment ?
What is the best strategy here ? Remove these comments and add the rules in the
cue.mod/usr
directory ?Thanks
Beta Was this translation helpful? Give feedback.
All reactions