k3s/pkg/kubectl
Kubernetes Submit Queue 850a75fe13 Merge pull request #47675 from alexandercampbell/refactor-long-kubectl-function
Automatic merge from submit-queue (batch tested with PRs 47675, 48001)

cmd/create_deployment: refactor long function

Refactor the `createDeployment` function under `pkg/kubectl/cmd`.

- [x] Behavior has been extracted to two helper functions.
- [x] Behavior remains identical.
- [x] Logic has been made explicit through function naming and comments.

This is essentially the pattern I've been following in my larger branches (the ones that are pending the merge of #46468). Want to get some design feedback before I get too far away from `master`.

Thanks!

cc @apelisse @mengqiy @droot 

**Release note**:

```release-note
NONE
```
2017-06-27 16:11:03 -07:00
..
cmd Merge pull request #47675 from alexandercampbell/refactor-long-kubectl-function 2017-06-27 16:11:03 -07:00
metricsutil
plugins
resource run hack/update-all 2017-06-22 11:31:03 -07:00
testing
util
BUILD kubectl: refactor addFromEnvFile, write tests 2017-06-23 09:49:30 -07:00
OWNERS
apply.go kubectl: simplify code with help of linter 2017-06-23 09:49:30 -07:00
autoscale.go
bash_comp_utils.go
cluster.go run hack/update-all 2017-06-22 11:31:03 -07:00
cluster_test.go run hack/update-all 2017-06-22 11:31:03 -07:00
clusterrolebinding.go
configmap.go fix comment of isDir 2017-06-02 09:26:13 +08:00
configmap_test.go
deployment.go run hack/update-all 2017-06-22 11:31:03 -07:00
deployment_test.go run hack/update-all 2017-06-22 11:31:03 -07:00
doc.go kubectl: rewrite docstrings in several files 2017-06-23 09:49:30 -07:00
env_file.go kubectl: refactor addFromEnvFile, write tests 2017-06-23 09:49:30 -07:00
env_file_test.go kubectl: refactor addFromEnvFile, write tests 2017-06-23 09:49:30 -07:00
explain.go
generate.go kubectl: rewrite docstrings in several files 2017-06-23 09:49:30 -07:00
generate_test.go
history.go run hack/update-all 2017-06-22 11:31:03 -07:00
interfaces.go
kubectl.go kubectl: rewrite docstrings in several files 2017-06-23 09:49:30 -07:00
kubectl_test.go
namespace.go
namespace_test.go Add test case for namespace 2017-06-03 14:35:49 +08:00
pdb.go
proxy_server.go kubectl: rewrite docstrings in several files 2017-06-23 09:49:30 -07:00
proxy_server_test.go
quota.go
quota_test.go
resource_filter.go run hack/update-all 2017-06-22 11:31:03 -07:00
rolebinding.go
rolebinding_test.go
rollback.go run hack/update-all 2017-06-22 11:31:03 -07:00
rolling_updater.go kubectl: simplify code with help of linter 2017-06-23 09:49:30 -07:00
rolling_updater_test.go
rollout_status.go Update StatefulSet rollout status for parameterized RollingUpdate 2017-06-12 10:07:07 -07:00
rollout_status_test.go Update StatefulSet rollout status for parameterized RollingUpdate 2017-06-12 10:07:07 -07:00
run.go kubectl: simplify code with help of linter 2017-06-23 09:49:30 -07:00
run_test.go run hack/update-all 2017-06-22 11:31:03 -07:00
scale.go
scale_test.go
secret.go
secret_for_docker_registry.go
secret_for_docker_registry_test.go
secret_for_tls.go
secret_for_tls_test.go
secret_test.go
service.go
service_basic.go
service_basic_test.go
service_test.go
serviceaccount.go
serviceaccount_test.go
sorting_printer.go run hack/update-all 2017-06-22 11:31:03 -07:00
sorting_printer_test.go run hack/update-all 2017-06-22 11:31:03 -07:00
stop.go kubectl: note a bug with a comment 2017-06-23 09:49:30 -07:00
stop_test.go
versioned_client.go Update kubectl rollout to consume `.data` of DaemonSet history 2017-06-10 10:52:33 -07:00