Skip to content
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

XRDs have empty top-level description field with kubectl explain #4129

Closed
mbbush opened this issue May 30, 2023 · 10 comments · Fixed by #4371
Closed

XRDs have empty top-level description field with kubectl explain #4129

mbbush opened this issue May 30, 2023 · 10 comments · Fixed by #4371
Assignees
Labels
Milestone

Comments

@mbbush
Copy link
Contributor

mbbush commented May 30, 2023

What happened?

When I specify a description field for my XRDs at the top level, the way I would normally do for an openapiv3 spec, it shows up as <empty> when I call kubectl explain on the custom resource type.

How can we reproduce it?

When I define a CompositeResourceDefinition using kubectl apply -f pointing to a file containing the following yaml, and then run kubectl explain xmissingdescriptions (or similar on xmissingdescriptions.spec) I see

DESCRIPTION:
     <empty>

rather than the descriptions I included.

apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition
metadata:
  name: xmissingdescriptions.example.com
spec:
  claimNames:
    kind: MissingDescription
    plural: missingdescriptions
  group: example.com
  names:
    kind: XMissingDescription
    plural: xmissingdescriptions
  versions:
    - name: v1alpha1
      served: true
      referenceable: true
      schema:
        openAPIV3Schema:
          type: object
          description: I would like to have this description show up in kubectl explain, but it does not.
          properties:
            spec:
              type: object
              description: I would also like this description to show up in kubectl explain.
              properties:
                id:
                  description: I can put a description here.
                  type: string
                parameters:
                  type: object
                  description: I can put a description here too.
                  properties:
                    stringParameter:
                      type: string
                      description: This shows up fine in kubectl explain.
                    objectParameter:
                      type: object
                      description: This shows up as well.
              required:
                - id
                - parameters
            status:
              type: object

What environment did it happen in?

Crossplane version: 1.11
Client Version: v1.26.2
Kustomize Version: v4.5.7
Server Version: v1.24.13-eks-0a21954

@mbbush mbbush added the bug Something isn't working label May 30, 2023
@negz
Copy link
Member

negz commented May 30, 2023

Good catch! I'm guessing we're just not propagating that field correctly in the xcrd package. if that's the case it should be an easy fix.

// ForCompositeResource derives the CustomResourceDefinition for a composite

@PriyanshuAhlawat
Copy link

Hi, I will like to work on this

@jbw976
Copy link
Member

jbw976 commented Jun 7, 2023

Cool @PriyanshuAhlawat! Feel free to open a PR with a fix and testing/verification 🤩

@jbw976 jbw976 added this to the v1.13 milestone Jun 21, 2023
@jbw976
Copy link
Member

jbw976 commented Jun 21, 2023

@PriyanshuAhlawat have you gotten a chance to start working on this issue? Do you need any help getting started? I've included it in v1.13 milestone (late july) for now in the assumption that you'll be working on it, but please let us know any expectations for progress here, thank you! 🙇

@PriyanshuAhlawat
Copy link

@jbw976 sorry I have been busy with my university exams since mid June but I will start working on it from next week if that's not a problem.😓

@PriyanshuAhlawat
Copy link

Apology cannot work on it, schedule is full of many tasks.

@cpurev
Copy link

cpurev commented Jul 18, 2023

Hello, I would like to work on this. How do I get started?

@Azanul
Copy link

Azanul commented Jul 24, 2023

@jbw976 If this is still required, I'd like to work on it.

@zakisk
Copy link

zakisk commented Jul 24, 2023

hey @jbw976 @negz I am new here, can you please explain what's going wrong here I would like to work and engage in crossplane open source space.

mbbush added a commit to spanio/crossplane that referenced this issue Jul 24, 2023
Signed-off-by: Matt Bush <mbbush@gmail.com>
@mbbush
Copy link
Contributor Author

mbbush commented Jul 24, 2023

I've never written in Go before, and would welcome feedback on my PR #4371

@jbw976 jbw976 modified the milestones: v1.13, v1.14 Jul 25, 2023
github-actions bot pushed a commit that referenced this issue Aug 1, 2023
Signed-off-by: Matt Bush <mbbush@gmail.com>
(cherry picked from commit 7c9bab1)
mbbush added a commit to spanio/crossplane that referenced this issue Aug 2, 2023
Signed-off-by: Matt Bush <mbbush@gmail.com>
mbbush added a commit to spanio/crossplane that referenced this issue Aug 2, 2023
Signed-off-by: Matt Bush <mbbush@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

8 participants