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

[Question] How to specifiy short names for a resource? #249

Closed
yaxinlx opened this issue Jun 20, 2018 · 11 comments
Closed

[Question] How to specifiy short names for a resource? #249

yaxinlx opened this issue Jun 20, 2018 · 11 comments
Assignees
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@yaxinlx
Copy link
Contributor

yaxinlx commented Jun 20, 2018

The docs mentions a resource can have shortNames, but I didn't found a way to do this in code.

@yue9944882
Copy link
Member

/triage support

hey @yaxinlx , take the content of example/pkg/apis/innsmouth/zz_generated.api.register.go as example, if u want to add short name(s) to that resource, u can simply append a method for its storage like:

func (s *storageDeepOne) ShortNames() []string {
	return []string{"do"}
}

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Nov 16, 2018
@yue9944882 yue9944882 added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Nov 16, 2018
@magicsong
Copy link
Contributor

@yue9944882 what about "customize Server-side printing", currently , the output of kubectl get myresource is quite a few. BTW, how do find I these ShortNames() interface, I cannot find any code include these( I only find some create,update strategies).

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 27, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 27, 2019
@neosab
Copy link

neosab commented May 30, 2019

As a user, it will be great if we can get support for specifying shortnames. Seems like #283 was pretty close, any update on it?

@yue9944882 yue9944882 self-assigned this May 31, 2019
@yue9944882 yue9944882 removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label May 31, 2019
@yue9944882
Copy link
Member

for now, we can support shortname/catagory by customizing REST and i added an example by #359. the other pull is breaking underlying api-machinery hierarchy as i reviewed and commented.

alternatively, we can support providing shortnames via resources tag like // +resource: ....,shortNames=abc in the type definition.

@neosab
Copy link

neosab commented Jun 9, 2019

for now, we can support shortname/catagory by customizing REST and i added an example by #359. the other pull is breaking underlying api-machinery hierarchy as i reviewed and commented.

I will try this out

alternatively, we can support providing shortnames via resources tag like // +resource: ....,shortNames=abc in the type definition.

That will be nice to have.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 7, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 7, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

6 participants