kubernetes/hack/make-rules
Kubernetes Submit Queue 8fe818b2a1 Merge pull request #45981 from fabianofranz/kubectl_plugins_v1_part1
Automatic merge from submit-queue (batch tested with PRs 46033, 46122, 46053, 46018, 45981)

Command tree and exported env in kubectl plugins

This is part of `kubectl` plugins V1:
- Adds support to several env vars passing context information to the plugin. Plugins can make use of them to connect to the REST API, access global flags, get the path of the plugin caller (so that `kubectl` can be invoked) and so on. Exported env vars include
  - `KUBECTL_PLUGINS_DESCRIPTOR_*`: the plugin descriptor fields
  - `KUBECTL_PLUGINS_GLOBAL_FLAG_*`: one for each global flag, useful to access namespace, context, etc
  - ~`KUBECTL_PLUGINS_REST_CLIENT_CONFIG_*`: one for most fields in `rest.Config` so that a REST client can be built.~
  - `KUBECTL_PLUGINS_CALLER`: path to `kubectl`
  - `KUBECTL_PLUGINS_CURRENT_NAMESPACE`: namespace in use
- Adds support for plugins as child of other plugins so that a tree of commands can be built (e.g. `kubectl myplugin list`, `kubectl myplugin add`, etc)

**Release note**:

```release-note
Added support to a hierarchy of kubectl plugins (a tree of plugins as children of other plugins).

Added exported env vars to kubectl plugins so that plugin developers have access to global flags, namespace, the plugin descriptor and the full path to the caller binary.
```
@kubernetes/sig-cli-pr-reviews
2017-05-19 23:29:32 -07:00
..
helpers wire new staging repo 2017-05-02 08:43:31 -04:00
build.sh Add a verbosity concept to kubernetes scripts 2016-08-04 22:01:22 -07:00
cross.sh Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows 2016-12-17 21:07:18 -08:00
make-help.sh remove hardcoded ansi to tput so that color coding works in multiple platforms including osx. 2017-02-10 10:25:43 -08:00
test-cmd-util.sh kubectl plugins have access config, global flags and environment 2017-05-19 19:17:43 -03:00
test-cmd.sh add --as-group option to cli 2017-05-14 16:21:05 +08:00
test-e2e-node.sh Merge pull request #45707 from Crazykev/cri-experimental 2017-05-19 18:57:34 -07:00
test-federation-cmd.sh Disabling service-dns controller for federation kubectl tests 2017-05-17 10:22:47 +05:30
test-integration.sh add integration tests 2017-05-05 10:50:03 -04:00
test-kubeadm-cmd.sh kubeadm: updated cmd tests as discussed in SIG 2017-02-07 12:47:07 -08:00
test.sh Fix invalid bash script in unit test. 2017-05-15 15:36:27 +08:00
verify.sh hack/cluster: consolidate cluster/ utils to hack/lib/util.sh 2017-03-30 22:34:46 -05:00
vet.sh Disable verify-test-owners.sh and make go vet more obvious 2016-12-21 11:44:04 -08:00