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

Adding integration with the kn/pkg schema cli for the Discovery repo. #153

Merged
merged 8 commits into from
Mar 17, 2021

Conversation

n3wscott
Copy link

@n3wscott n3wscott commented Feb 26, 2021

Changes

  • 🎁 Add schema defintion to the clusterducktype

/kind documentation

Before:

(╯°□°)╯︵  kubectl explain ClusterDuckType
KIND:     ClusterDuckType
VERSION:  discovery.knative.dev/v1alpha1

DESCRIPTION:
     <empty>

After:

(╯°□°)╯︵  kubectl explain ClusterDuckType
KIND:     ClusterDuckType
VERSION:  discovery.knative.dev/v1alpha1

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>
     Spec holds the desired state of the ClusterDuckType (from the client).

   status	<Object>
     Status communicates the observed state of the ClusterDuckType (from the
     controller).

Or more detail:

(╯°□°)╯︵  kubectl explain ClusterDuckType.spec
KIND:     ClusterDuckType
VERSION:  discovery.knative.dev/v1alpha1

RESOURCE: spec <Object>

DESCRIPTION:
     Spec holds the desired state of the ClusterDuckType (from the client).

FIELDS:
   group	<string>
     Group is the API group of the defined duck type. Must match the name of the
     ClusterDuckType (in the form `<names.plural>.<group>`).

   names	<Object>
     Names holds the naming conventions for this duck type.

   selectors	<[]map[string]>
     Selectors is a list of selectors for CustomResourceDefinitions to identify
     a duck type.

   versions	<[]map[string]>
     Versions holds the schema and printer column mappings for specific versions
     for duck types.

Etc...

Integration steps

go run ./cmd/schema/ dump ClusterDuckType | pbcopy

Paste this inside the CRD (config/300-clusterducktype.yaml) for ClusterDuckType:

...
      schema:
        openAPIV3Schema:
          <**paste**>
      additionalPrinterColumns:
...

Release Note

ClusterDuckType now supports kubectl describe.

@knative-prow-robot
Copy link
Collaborator

@n3wscott: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them

In response to this:

Changes

/kind

Fixes #

Release Note


Docs


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/test-infra repository.

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2021
@knative-prow-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 26, 2021
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 26, 2021
@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

Merging #153 (ef6f8bf) into main (2e19b85) will increase coverage by 0.36%.
The diff coverage is n/a.

❗ Current head ef6f8bf differs from pull request most recent head 2b595dc. Consider uploading reports for the commit 2b595dc to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #153      +/-   ##
==========================================
+ Coverage   88.92%   89.29%   +0.36%     
==========================================
  Files          10       10              
  Lines         271      271              
==========================================
+ Hits          241      242       +1     
+ Misses         23       22       -1     
  Partials        7        7              
Impacted Files Coverage Δ
...g/apis/discovery/v1alpha1/clusterducktype_types.go 100.00% <ø> (ø)
pkg/collection/duck_sort.go 100.00% <0.00%> (+20.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e19b85...2b595dc. Read the comment docs.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2021
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2021
Base automatically changed from master to main March 4, 2021 16:30
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 4, 2021
@n3wscott n3wscott marked this pull request as ready for review March 17, 2021 18:16
@n3wscott n3wscott requested review from a team as code owners March 17, 2021 18:16
@knative-prow-robot knative-prow-robot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Mar 17, 2021
@n3wscott
Copy link
Author

/retry

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2021
@vaikas
Copy link
Contributor

vaikas commented Mar 17, 2021

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2021
@knative-prow-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vaikas

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit 82c5388 into knative-extensions:main Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants