Clayton Coleman
9f5c2aea1a
Cut a dependency between kubectl and the rest of the repo
...
The types referenced in credentialprovider are part of a long term api
and will not change, and kubectl doesn't need to take a dependency on this
package in order to do minimal validation here.
2018-10-16 12:54:40 -04:00
Clayton Coleman
5e905f1f5f
Move versioned generators into their own package
...
pkg/kubectl has a lot of files. Move everything generator related
into pkg/kubectl/generate (generic) or pkg/kubectl/generate/versioned
(type specific).
Move the DescriberFn and GeneratorFn out of kubectl/cmd/util and into
the respective versioned packages, along with tests.
2018-10-16 12:54:40 -04:00
Clayton Coleman
c291d3d7ed
Consistently print errors to stderr and add newlines to cordon
2018-10-16 11:16:15 -04:00
Pingan2017
2b2d8ba8c1
validte args for kubectl api-versions/api-resources
2018-10-16 19:22:17 +08:00
k8s-ci-robot
c1c718e5ab
Merge pull request #69746 from seans3/printers-fix
...
kubectl: update to use correct printers package
2018-10-15 15:04:42 -07:00
k8s-ci-robot
060218a862
Merge pull request #69412 from tossmilestone/scheduler-factory-test
...
Refactor scheduler factory test
2018-10-15 13:52:41 -07:00
xichengliudui
e394482373
Remove duplicate words
2018-10-15 15:55:49 -04:00
Sean Sullivan
6a2ef97d46
kubectl: update to use correct printers package
2018-10-15 11:02:19 -07:00
Andy Crow
4400996c48
Fix error messages suggesting invalid flag
2018-10-15 16:39:53 +01:00
Ibrahim AshShohail
2fb3ba71f1
Update usages of http.ResponseWriter.WriteHeader to use http.Error
...
Signed-off-by: Ibrahim AshShohail <me@ibrasho.com >
2018-10-14 05:58:00 +03:00
k8s-ci-robot
2129bc9f85
Merge pull request #69742 from apelisse/fix-diff-error
...
Rename KUBERNETES_EXTERNAL_DIFF to KUBECTL_EXTERNAL_DIFF
2018-10-13 09:54:52 -07:00
k8s-ci-robot
a5b489a3a3
Merge pull request #69751 from seans3/tabwriter-fix
...
kubectl: copy printer tabwriter into kubectl
2018-10-13 03:56:17 -07:00
k8s-ci-robot
d84c43120e
Merge pull request #69745 from apelisse/check-dryrun-on-create
...
kubectl dry-run: Check for server didn't work on create
2018-10-12 22:31:28 -07:00
k8s-ci-robot
b66d58c1b6
Merge pull request #69446 from seans3/taint-fix
...
kubectl taint: copy core taintutil dependency into kubectl
2018-10-12 16:01:33 -07:00
Sean Sullivan
d076897be7
kubectl: copy printer tabwriter into kubectl
2018-10-12 15:10:46 -07:00
k8s-ci-robot
3348f9ae23
Merge pull request #69627 from dims/updating-ghodss-yaml-to-latest-version-2
...
Updating ghodss/yaml and gopkg.in/yaml.v2 to latest version 2
2018-10-12 14:48:26 -07:00
k8s-ci-robot
81feb2d03c
Merge pull request #69604 from seans3/podutil-fix
...
kubectl: copy pod utils into util/podutils package
2018-10-12 14:48:11 -07:00
Antoine Pelisse
572a028148
kubectl diff: Print error when something goes wrong
2018-10-12 14:12:32 -07:00
Sean Sullivan
8c196137e8
kubectl taint: copy core taintutil dependency into kubectl
2018-10-12 12:39:15 -07:00
Antoine Pelisse
54889d581a
kubectl dry-run: Check for server didn't work on create
...
We changed the code to verify that the type supports dry-run, but we've
only done it for patch, not for create, which means that people can
create objects they don't want to create. We can actually simplify the
code by moving the check much earlier in the method, which fixes all
possible bug like this.
2018-10-12 11:30:49 -07:00
k8s-ci-robot
8751c1e5a8
Merge pull request #69560 from WanLinghao/clusterrolebinding_description_improve
...
Improve decription of command 'kubectl create clusterrole'
2018-10-12 11:20:11 -07:00
k8s-ci-robot
3f102c3980
Merge pull request #69500 from m1kola/LC_MESSAGES_support
...
Makes kubectl respect the `LC_ALL` and `LC_MESSAGES` env vars
2018-10-12 11:19:59 -07:00
Antoine Pelisse
e31d14cb10
kubectl diff: Rename KUBERNETES_EXTERNAL_DIFF to KUBECTL_EXTERNAL_DIFF
2018-10-12 10:56:16 -07:00
k8s-ci-robot
6fc89ae92d
Merge pull request #69633 from soltysh/move_templates
...
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/templates
2018-10-12 10:07:07 -07:00
He Xiaoxi
a96a390d92
Refactor scheduler factory test
...
Use `k8s.io/client-go/kubernetes/fake.Clientset` as the fake k8s client.
Signed-off-by: He Xiaoxi <xxhe@alauda.io >
2018-10-12 14:39:08 +08:00
k8s-ci-robot
b1ea6dcfbc
Merge pull request #69449 from apelisse/verify-dry-run-support
...
kubectl: Verify dry run support
2018-10-11 13:45:12 -07:00
Maciej Szulik
e0c9189082
Manual changes to package visibility
2018-10-11 22:01:06 +02:00
Maciej Szulik
61899e1654
Generated changes
2018-10-11 22:01:06 +02:00
Maciej Szulik
21789b85a6
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/temlpates
2018-10-11 22:01:03 +02:00
Mikalai Radchuk
75a137616e
Adds support for LC_MESSAGES
and LC_ALL
...
Implements the following locale lookup priority order: `LC_MESSAGES`, `LC_ALL`, `LANG`.
2018-10-11 20:06:38 +01:00
Sean Sullivan
5f8f607c27
kubectl: copy pod utils into util/podutils package
2018-10-11 10:49:52 -07:00
k8s-ci-robot
128b8fe4fe
Merge pull request #69477 from m1kola/port-forward_named_port
...
Adds support of named ports for kubectl port-forward
2018-10-10 16:46:35 -07:00
Antoine Pelisse
f2e2a930f9
dry-run: Verify if the object supports dry-run
...
For each object, first we verify if they have a dryRun parameter in the
openapi for the patch verb. If we can't find the object, we assume that
CRD will behave like "namespace". So we check if namespace supports
dryRun. If it does, then we verify that the resource is a CRD.
2018-10-10 08:56:09 -07:00
Antoine Pelisse
a0460a5238
dry-run: Create class to find if a type is a CRD
...
Finding out if a Group-version-kind is a CRD is useful, since we want to
detect dry-run ability differently for CRDs.
2018-10-10 08:56:09 -07:00
Antoine Pelisse
ae735282ad
Create a method to check dryRun is supported
...
We don't want to run dryRun requests against servers that don't support
dry-run, since they might ignore the flag and just persist the unwanted
changes.
This creates a new method that checks in the OpenAPI if the dryRun
parameter can be used.
2018-10-10 08:55:33 -07:00
Davanum Srinivas
65da81f42e
Fix up test cases
...
Change-Id: Ib9245f78dbfb88f1f37a26ca64bf80d3f78d7497
2018-10-10 10:24:09 -04:00
Sean Sullivan
54a73630f1
kubectl factory client access: Moves remaining internal references into callers
2018-10-09 13:34:30 -07:00
k8s-ci-robot
830e09cc96
Merge pull request #46517 from goblain/cli-port-forward-listen
...
port-forward listen on address
2018-10-09 12:38:55 -07:00
k8s-ci-robot
137193faaf
Merge pull request #69448 from seans3/env-resolve-fix
...
kubectl env resolve: copy core fieldpath and resource dependencies into kubectl
2018-10-09 11:25:43 -07:00
k8s-ci-robot
48086eb7d4
Merge pull request #69543 from seans3/rollback-fix
...
kubectl rollback: remove duplicated code for printing pod template
2018-10-09 10:14:39 -07:00
k8s-ci-robot
637ba154c8
Merge pull request #65189 from juanvallejo/jvallejo/path-fixes-cmd-copy
...
fix paths w shortcuts when copying from pods
2018-10-09 10:14:28 -07:00
juanvallejo
e55a28d169
fix paths w shortcuts when copying from pods
...
Addresses an issue where copying from a remote location containing path
shortcuts (podName:../../../tmp/foo) causes an index out of range panic.
2018-10-09 10:27:54 -04:00
WanLinghao
5958baa163
improve decription of command 'kubectl create clusterrole'
2018-10-09 15:50:30 +08:00
Sean Sullivan
20a54b312c
kubectl rollback: remove duplicated code for printing pod template
2018-10-08 15:39:16 -07:00
Sean Sullivan
50c5b379b7
kubectl env resolve: copy core fieldpath and resource dependencies into kubectl
2018-10-08 14:50:20 -07:00
k8s-ci-robot
d4c4871852
Merge pull request #69413 from seans3/rollback-fix
...
kubectl rollback: remove legacyscheme dependency
2018-10-08 13:02:19 -07:00
Mikalai Radchuk
a19e84e001
Allows to use named ports in the kubectl portforward
2018-10-08 20:58:22 +01:00
Radek Pieczonka
4643c6e95e
port-forward listen on address
...
adds an address flag to kubectl port-forward to allow to bind to a different ip then localhost
2018-10-07 22:18:18 +02:00
Maciej Szulik
add731dff1
Manual changes to package visibility and test dependencies
2018-10-06 18:44:05 +02:00
Maciej Szulik
1d9617d8e1
Generated changes
2018-10-06 18:44:05 +02:00