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

use valid_resources to replace kubectl.PossibleResourceTypes #30955

Merged
merged 1 commit into from
Aug 19, 2016

Conversation

lojies
Copy link
Contributor

@lojies lojies commented Aug 19, 2016

Fix resource list printed by kubectl help 

kubectl get return

You must specify the type of resource to get. Valid resource types include:

  • componentstatuses (aka 'cs')
  • configmaps
  • daemonsets (aka 'ds')
  • deployments
  • events (aka 'ev')
  • endpoints (aka 'ep')
  • horizontalpodautoscalers (aka 'hpa')
  • ingress (aka 'ing')
  • jobs
  • limitranges (aka 'limits')
  • nodes (aka 'no')
  • namespaces (aka 'ns')
  • pods (aka 'po')
  • persistentvolumes (aka 'pv')
  • persistentvolumeclaims (aka 'pvc')
  • quota
  • resourcequotas (aka 'quota')
  • replicasets (aka 'rs')
  • replicationcontrollers (aka 'rc')
  • secrets
  • serviceaccounts (aka 'sa')
  • services (aka 'svc')
    error: Required resource not specified.
    See 'kubectl get -h' for help and examples.

while kubectl get --help return

root@k8s-node1:~# kubectl get --help
Display one or many resources.
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
componentstatuses (cs), endpoints (ep), and secrets.
By specifying the output as 'template' and providing a Go template as the value
of the --template flag, you can filter the attributes of the fetched resource(s).
......

kubectl.PossibleResourceTypes missing some resouces such as jobs quota.
describe and explain have the same problem.

i think using valid_resources to replace kubectl.PossibleResourceTypes more suitable.


This change is Reviewable

@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

6 similar comments
@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Aug 19, 2016
@pwittrock
Copy link
Member

ok to test

@pwittrock pwittrock added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Aug 19, 2016
@k8s-bot
Copy link

k8s-bot commented Aug 19, 2016

GCE e2e build/test passed for commit f81fef1.

@pwittrock pwittrock added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 19, 2016
@lavalamp
Copy link
Member

Please remember to apply retest-not-required for changes like this, thanks.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit f81fef1 into kubernetes:master Aug 19, 2016
jessfraz pushed a commit to jessfraz/kubernetes that referenced this pull request Aug 19, 2016
Automatic merge from submit-queue

use valid_resources to replace kubectl.PossibleResourceTypes

```release
Fix resource list printed by kubectl help 
```

 `kubectl get` return 

> 
You must specify the type of resource to get. Valid resource types include:
   * componentstatuses (aka 'cs')
   * configmaps
   * daemonsets (aka 'ds')
   * deployments
   * events (aka 'ev')
   * endpoints (aka 'ep')
   * horizontalpodautoscalers (aka 'hpa')
   * ingress (aka 'ing')
   * jobs
   * limitranges (aka 'limits')
   * nodes (aka 'no')
   * namespaces (aka 'ns')
   * pods (aka 'po')
   * persistentvolumes (aka 'pv')
   * persistentvolumeclaims (aka 'pvc')
   * quota
   * resourcequotas (aka 'quota')
   * replicasets (aka 'rs')
   * replicationcontrollers (aka 'rc')
   * secrets
   * serviceaccounts (aka 'sa')
   * services (aka 'svc')
error: Required resource not specified.
See 'kubectl get -h' for help and examples.

while `kubectl get --help` return

> root@k8s-node1:~# kubectl get --help
Display one or many resources.
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
componentstatuses (cs), endpoints (ep), and secrets.
By specifying the output as 'template' and providing a Go template as the value
of the --template flag, you can filter the attributes of the fetched resource(s).
......

kubectl.PossibleResourceTypes missing some resouces such as jobs quota.
describe and explain have the same problem.

i think using valid_resources to replace kubectl.PossibleResourceTypes more suitable.
@lojies lojies deleted the modifygetresource branch August 22, 2016 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants