Closed markussiebert closed 1 month ago
Ah, I'm not using values there. What's there is the Description of the Kind and apiVersion values in the properties section.
If you don't have any descriptions, I guess I can try to fill it with the actual value. 🤔
OK, I think in general, it's not useful to parse the crd for both fields...
in the headline above the resource, cty says what GVK this is for - so I think apiVersion and kind should look like
apiVersion: the current GV - in this case some.thi.ng/v1alpha1 kind: the current K - in this case Project
(maybe we could show that both are string - but even if there is a pattern/enum/something we shouldn't show it)
I looked into the json schemas of k8s resources like configmap and so on. They define Kind as an enum, but apiVersion is string or nil - but both is not useful for examples/documentation...
What do you think?
Fair point. I'll see how I can define them nicely... Or give them a value or something. The generation is rather generic so including specific field handling is a bit of a pain in the arse. :D
The AWSCluster definition defines kind and apiVersion like this:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
I think everyone does it differently, so I think there is merit in displaying them and the constraint they are setting.
That said, I can definitely add the value in there as well.
@markussiebert How about something like this? If the description is empty, I'll fill in the actual value?
Great, would be sufficient I think
Hi,
when I look at
I think that it might be possible to hard code the GroupVersion and Kind?
It would be great if Kind/Version are displayed there. In the details pane, the correct values are used.