Commit f81fef1f authored by lojies's avatar lojies

use valid_resources to replace kubectl.PossibleResourceTypes

parent 57ad590d
...@@ -51,8 +51,7 @@ var ( ...@@ -51,8 +51,7 @@ var (
will first check for an exact match on TYPE and NAME_PREFIX. If no such resource will first check for an exact match on TYPE and NAME_PREFIX. If no such resource
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX. exists, it will output details for every resource that has a name prefixed with NAME_PREFIX.
`) + `) + valid_resources
kubectl.PossibleResourceTypes
describe_example = dedent.Dedent(` describe_example = dedent.Dedent(`
# Describe a node # Describe a node
......
...@@ -39,7 +39,7 @@ var ( ...@@ -39,7 +39,7 @@ var (
explainLong = dedent.Dedent(` explainLong = dedent.Dedent(`
Documentation of resources. Documentation of resources.
`) + kubectl.PossibleResourceTypes `) + valid_resources
) )
// NewCmdExplain returns a cobra command for swagger docs // NewCmdExplain returns a cobra command for swagger docs
......
...@@ -42,7 +42,7 @@ var ( ...@@ -42,7 +42,7 @@ var (
get_long = dedent.Dedent(` get_long = dedent.Dedent(`
Display one or many resources. Display one or many resources.
`) + kubectl.PossibleResourceTypes + dedent.Dedent(` `) + valid_resources + dedent.Dedent(`
This command will hide resources that have completed. For instance, pods that are in the Succeeded or Failed phases. This command will hide resources that have completed. For instance, pods that are in the Succeeded or Failed phases.
You can see the full results for any resource by providing the '--show-all' flag. You can see the full results for any resource by providing the '--show-all' flag.
......
...@@ -30,12 +30,6 @@ import ( ...@@ -30,12 +30,6 @@ import (
const ( const (
kubectlAnnotationPrefix = "kubectl.kubernetes.io/" kubectlAnnotationPrefix = "kubectl.kubernetes.io/"
// TODO: auto-generate this
PossibleResourceTypes = `Possible resource types include (case insensitive): pods (aka 'po'), services (aka 'svc'), deployments (aka 'deploy'),
replicasets (aka 'rs'), replicationcontrollers (aka 'rc'), nodes (aka 'no'), events (aka 'ev'), limitranges (aka 'limits'),
persistentvolumes (aka 'pv'), persistentvolumeclaims (aka 'pvc'), resourcequotas (aka 'quota'), namespaces (aka 'ns'),
serviceaccounts (aka 'sa'), ingresses (aka 'ing'), horizontalpodautoscalers (aka 'hpa'), daemonsets (aka 'ds'), configmaps (aka 'cm'),
componentstatuses (aka 'cs), endpoints (aka 'ep'), petsets (alpha feature, may be unstable) and secrets.`
) )
type NamespaceInfo struct { type NamespaceInfo struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment