Per @mogsie on Slack:
Why do all the examples of kubernetes resources on cuelang dot org use the ToCamel function when importing kind?
cue import ./... -p kube -l 'strings.ToCamel(kind)' -l metadata.name -f
I understand that you then get a more consistent set of data, but IMHO it sets a bad precedence, because the root object and kind property are no longer aligned (incorrect casing). If you have a custom resource with a few capital letters like, say HTTPRoute then this gets imported as
In short, we removed the strings.ToCamel when we import kubernetes resources and are quite happy with ConfigMap: foo: {} style data structures. In a way configMap looks like a typo, because that's not its kind
Per @mogsie on Slack:
Why do all the examples of kubernetes resources on cuelang dot org use the ToCamel function when importing kind?
I understand that you then get a more consistent set of data, but IMHO it sets a bad precedence, because the root object and
kindproperty are no longer aligned (incorrect casing). If you have a custom resource with a few capital letters like, sayHTTPRoutethen this gets imported asIn short, we removed the
strings.ToCamelwhen we import kubernetes resources and are quite happy withConfigMap: foo: {}style data structures. In a wayconfigMaplooks like a typo, because that's not its kind