Commit Graph

216 Commits

Author SHA1 Message Date
Jeff Lowdermilk
4f552053f1 Merge pull request #6789 from eparis/bash-custom-functions
Add bash completion custom functions
2015-04-14 11:54:22 -07:00
deads2k
bac5cbbe82 add flattening and minifying options to config view 2015-04-14 10:23:10 -04:00
Eric Paris
c75ecbd8e3 bash_completions: annotate kubectl get with resources which can be 'gotten'
A user types:
  kubectl get $resource

This will cause the bash completions to suggest the possible objects the
user can ask for.  The complete list right now is:

endpoints
event
limitrange
namespace
node
persistentvolume
persistentvolumeclaim
pod
replicationcontroller
resourcequota
secret
service
status

But this list should stay up2date as api objects are added or deleted
2015-04-13 19:11:26 -04:00
Eric Paris
f6878aed3c Add bash completion custom functions
These functions call out to kubectl to get information about running
resources.  They give us completions which are kubernetes aware and thus
obviously better than just cobra subcommands and flags.
2015-04-13 18:49:28 -04:00
Eric Paris
26149bd83d Doc generation should remove old doc files
Right now, our doc generation scripts notice if you make changes and
don't regen docs, don't include new docs, etc.  But they miss it if your
changes should have REMOVED a doc.  Both kubectl-apiversion and
kubectl-clusterinfo should have been removed, but weren't.

This patch starts tracking all generated doc files and will cause
problems if files should be removed and aren't.
2015-04-13 17:48:24 -04:00
Eric Paris
ebb0affc21 Automatically generate bash completions for kubectl 2015-04-13 15:27:55 -04:00
Eric Paris
d5f7d5eadf Fix bash completions and update to latest 2015-04-07 20:30:57 -04:00
Eric Paris
931044be01 update the actual bash completions using this code! 2015-04-06 18:44:03 -04:00
Jeff Lowdermilk
197059b65d Remove kubecfg, cleanup a few stray references. 2015-02-10 16:43:12 -08:00
deads2k
bc93de314a remove --ns-path option from .kubeconfig file, kick tests 2015-02-03 14:22:55 -05:00
Eric Paris
45a71bb8f3 fix kubectl log completion
When kubectl started returning the right object it changed the template
that needed to be used to get the name of the containers inside the pod.
2014-11-19 14:17:51 -05:00
Joe Beda
5b9bb1ff6f Merge branch 'eparis-rename-to-kube'
* eparis-rename-to-kube:
  rename kube server binaries to kube-
2014-11-17 09:55:11 -08:00
Eric Paris
a99c3c7963 rename kube server binaries to kube-
apiserver becomes kube-apiserver
controller-manager -> kube-controller-manager
scheduler and proxy similarly.

Only thing I promise is that right now hack/build-go.sh and
build/release.sh exit with 0.  That's it.  Who knows if any of this
actually works....
2014-11-13 20:08:26 -05:00
Eric Paris
2ec36f71ce bash completion update
add flags for namespace
add get events
add log
remove 'table' output format
add 'templatefile' output format
add 'apply' (but pretend createall doesn't exist becaues it sux when you
    want to complete on just 'create')
2014-11-07 16:41:43 -05:00
Eric Paris
a160c0f06b bash completions for kubectl
Support pre command flags:
--api-version=
-a, --auth-path=
--certificate-authority=
--client-certificate=
--client-key=
--insecure-skip-tls-verify=
--match-server-version=
-s, --server=

And commands:
get
describe
create
update
delete

Tries to be smart about things like

kubectl get -o template  requires a template file

It also tries to accept both sigular and plural versions of all
resources.  Even though it will only complete to the plural version.
2014-10-21 12:54:43 -04:00
Tim Hockin
af3983464c move completions from misc to contrib 2014-10-07 22:20:32 -07:00