Skip to content

Improve support for kubectl explain #140

Description

@julianKatz

Currently, pointing the kubectl explain command at a constraint yields no description. spec and status are also missing descriptions. See this example:

❯ kubectl explain k8srequiredlabels
Alias tip: k explain k8srequiredlabels
KIND:     K8sRequiredLabels
VERSION:  constraints.gatekeeper.sh/v1beta1

DESCRIPTION:
     <empty>

FIELDS:
   apiVersion   <string>
     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

   kind <string>
     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

   metadata     <Object>
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

   spec <Object>

   status       <>

Doing this will require placing description information in the right place in Constraint CRDs. This comment from Jordan Liggitt suggests that structural schemas should do most of the heavy lifting here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions