-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing marker for 'title' key #883
Comments
Sounds good. Feel free to open a PR |
Title is a new one to me, can you expand on the use case at all? What is the effect of the title on the openapi schema? Is this somehow presented to users via kubectl explain or some other mechanism? |
I don't know what the use case behind it is, but it's a field in jsonschemaprops in CRDs. So I thought it makes sense to be able to set this field via controller-gen as well. Independent of that, also curious about the use case |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Sorry for the late response @sbueringer - the use case is that we're using CRDs to automatically render forms in the Internal Developer Portal of our open-source platform https://github.com/krateoplatformops/krateo so having 'title' available would be a great advantage for us. |
/remove lifecycle/stale |
/help |
@sbueringer: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hi @sbueringer @JoelSpeed, is there any space for the contributors to add this request to the backlog? Since Kubernetes CRDs are accepting this field, it would be great if markers could support it. |
At the moment, I don't entirely understand the use case, and if we are going to add this, I'd expect a wider use case that covers Kubernetes in general, and I'd like to know what effect setting this field within the schema has. I can see that the field exists, https://github.com/kubernetes/apiextensions-apiserver/blob/3f4850cd459d7d7324f9c76f0932096fbe3d10a8/pkg/apis/apiextensions/v1/types_jsonschema.go#L75, but I'm not sure what it's used for. Could someone do some research and explain the effect and use case if I were to set the |
Use CaseThe
Effect of Setting
|
Can you possibly provide a concrete example of what a field name and title might look like? I'm thinking about Kube conventions. For documentation on fields, we start the comment (which becomes The idea here is that this means that the description, when read, uses the version of the field name that the user is most likely to be familiar with. When you I wonder how a title would fit in here? |
HI @JoelSpeed - thanks for the follow-up! I'll provide a concrete example and clarify how Example: Field Name vs. Title in OpenAPI SchemaConsider a CRD defining a
How does this align with Kubernetes conventions?
How Would
|
I can see the argument here, I'd be interested to get the opinion of the sig-api-machinery folks though, in case they know of any existing use case for the field that we haven't considered |
That's a great idea @JoelSpeed, should we tag them here? |
No concerns to add a marker. It is not used today by Kube, but added just for completion as OpenAPI has it. Note that afaik it is not exposed in the OpenAPI spec by kube-apiserver. So this is only useful for tooling that depends on CRDs directly. If there is value, I don't there is a reason not to expose it in OpenAPI too. |
@braghettos I believe you tested and adding a title key to the CRD schema does mean it's exposed via openapi right? I thought you mentioned that to me in DM? |
Just to share, the documentation at this link is generated based on the controller-tools code. So, once it is added to this project, released, and the new version is bumped in Kubebuilder, the documentation will be updated accordingly. |
Exactly, I have manually added the
|
Hi everyone - I would like to generate a CRD that includes the 'title' key, but I'm unable to find a marker that allows me to generate it - I cannot find it here: https://book.kubebuilder.io/reference/markers/crd - am I missing something?
Thanks for any help!
The text was updated successfully, but these errors were encountered: