Robert Bailey
08e6a43c1d
Revert "Merge pull request #9165 from smarterclayton/graceful"
...
This reverts commit 4f856b595d
, reversing
changes made to d78525a83b
.
Conflicts:
pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Muhammed Uluyol
7c58f94edc
Create an experimental client cache.
...
Previously, we would initialize the experimental client at factory creation
time. This is problematic because the clientConfig loader has values populated
from the command-line flag parsing, and these are not populated until after
Factory creation. Introduce an ExperimentalClientCache to create (and reuse)
ExperimentalClients.
2015-08-18 14:25:38 -07:00
Janet Kuo
44a7a52a94
Hide failed/succeeded pods in 'kubectl get pods' by default
2015-08-18 13:47:19 -07:00
Robert Bailey
5000252e46
Merge pull request #12669 from deads2k/tolerate-missing-template-flag
...
tolerate output without template file
2015-08-18 11:49:53 -07:00
Kris Rousey
ae6c64d9bb
Moving everyone to unversioned client
2015-08-18 10:23:03 -07:00
deads2k
969d526ca5
tolerate output without template file
2015-08-18 08:58:04 -04:00
Clayton Coleman
b842a7dd15
Revert "Revert "Gracefully delete pods from the Kubelet""
...
This reverts commit 98115facfd
.
2015-08-18 08:57:02 -04:00
Brendan Burns
99b8df1812
Add field based sorting to the kubectl command line.
2015-08-12 16:51:36 -07:00
Muhammed Uluyol
fab367230f
Add experimental API support to kubectl
2015-08-11 16:49:55 -07:00
Muhammed Uluyol
01807c1fac
Make ClientCache public
2015-08-11 16:47:57 -07:00
Kris Rousey
565189f5b8
Correcting all go vet errors
2015-08-11 13:55:37 -07:00
Marek Grabowski
5f9cefc1d8
Merge pull request #12441 from vlajos/typofixes-vlajos-20150807
...
typofix - https://github.com/vlajos/misspell_fixer
2015-08-10 16:33:52 +02:00
Marek Grabowski
e27787c9d3
Merge pull request #12292 from brendandburns/stdin3
...
Add support for `--restart`
2015-08-10 14:54:54 +02:00
Clayton Coleman
c46165de19
Extra newlines in error output
...
StandardErrorMessage does not have a newline by default, other
error messages should not end with a newline.
2015-08-09 11:41:52 -04:00
Veres Lajos
9f77e49109
typofix - https://github.com/vlajos/misspell_fixer
2015-08-08 22:31:48 +01:00
Brendan Burns
e42d6aa255
Add --restart support to kubectl run
2015-08-07 13:20:09 -07:00
Eric Paris
7cbb52ce04
Use the pflag StringSlice instead of implementing it ourselves
...
Saves code and makes our code easier to read because we just use normal
[]string instead of custom type.
2015-08-06 19:16:13 -04:00
Mike Danese
17defc7383
run gofmt on everything we touched
2015-08-05 17:52:56 -07:00
Mike Danese
8e33cbfa28
rewrite go imports
2015-08-05 17:30:03 -07:00
Alex Mohr
0e8020f9bb
Merge pull request #11779 from JanetKuo/add-kubectl-annotation
...
Auto commit by PR queue bot
2015-08-04 18:28:12 -07:00
Janet Kuo
7e63213478
Implement kubectl annotation update command. Refactor kubectl annotate to decouple command framework from business logic.
2015-08-03 14:35:56 -07:00
Chao Xu
18d32751fd
improve the error message of update pod
2015-08-02 13:41:53 -07:00
Janet Kuo
0e42d0699a
Add '-o name' to mutations
2015-07-27 14:06:53 -07:00
nikhiljindal
242910e57c
kubectl expose should extract ports from service
2015-07-24 15:17:48 -07:00
Mike Danese
52282b1a36
Merge pull request #11300 from mwielgus/kubectl_replace_tempfile
...
Dump stdin to a temporary file in kubectl replace --force
2015-07-24 11:23:25 -07:00
Marcin Wielgus
866bd7b4e5
Dump stdin to a temporary file in kubectl replace --force
2015-07-23 15:22:23 +02:00
nikhiljindal
c849730116
Fixing the error message
2015-07-16 23:33:16 -07:00
nikhiljindal
496f30a92f
Introduce a new service generator that leaves service port unnamed
2015-07-16 20:40:40 -07:00
Zach Loafman
5dbe90f0ba
Merge pull request #10493 from krousey/namespace
...
Unify command line namespace resolution
2015-07-01 19:33:44 -07:00
nikhiljindal
274792d7bb
Stop exposing v1beta3 by default
2015-07-01 14:38:02 -07:00
Kris Rousey
ffa764d60b
Unify command line namespace resolution
...
This change allows the namespace in kubeconfig to be overridden by
specifying the namespace in the spec file. If namespace is explicitly
provided in the command line flags and the spec file has a different
namespace, this will cause an error.
2015-07-01 12:59:17 -07:00
Janet Kuo
682734bcc7
Implement 'kubectl get ... -o wide'
2015-06-30 14:06:47 -07:00
Alex Robinson
68bbf6c129
Merge pull request #10447 from feihujiang/helpfulErrorForUnsupportedVersion
...
Provide more helpful error when using unsupported api version
2015-06-29 15:00:58 -07:00
Alex Robinson
10a0dc9aae
Merge pull request #9928 from jlowdermilk/version-negotiate-tests
...
Unittest for #9762
2015-06-29 13:34:13 -07:00
feihujiang
878a72228f
Provide more helpful error when using unsupported api version
2015-06-29 15:32:54 +08:00
feihujiang
b41b53122a
Add source in “error from server” message when using kubectl
2015-06-25 14:20:09 +08:00
Anastasis Andronidis
b06ef70057
Print resource labels as columns
2015-06-22 00:44:51 +02:00
Satnam Singh
d69e0b5eb6
Improve error output of kubectl update
2015-06-17 15:55:03 -07:00
Jeff Lowdermilk
57a6355807
Unittest for #9762
...
Started looking at refactoring of the kubectl Factory, which
caused me to experience all 5 stages of grief. There are some options
for improving, but it probably warrants a proposal with some discussion/
feedback. In the meantime this tests `NegotiateVersion` in isolation.
2015-06-16 20:04:51 -07:00
Jeff Lowdermilk
f31191224b
kubectl negotiates apiversion to use based on client,server supported
2015-06-16 10:12:39 -07:00
Anastasis Andronidis
62c766d58d
Add tests
2015-06-10 16:09:43 +02:00
Anastasis Andronidis
b7c485ee9a
make CheckErr testable
2015-06-10 16:09:42 +02:00
krousey
ff474e5d7e
Merge pull request #9376 from feihujiang/createValidateCrash
...
kubetcl create --validate crashes when no apiVersion or kind is provided
2015-06-09 09:59:42 -07:00
feihujiang
37abe11f8a
kubetcl create --validate crashes when no apiVersion or kind is provided
2015-06-09 10:38:43 +08:00
Anastasis Andronidis
bf87f0ec68
Print multiple validation errors
2015-06-08 14:06:20 +02:00
Chao Xu
080da97e1c
fix a comment
2015-06-04 10:35:10 -07:00
Brian Grant
656fa7bea1
Merge pull request #9225 from caesarxuchao/add-v1-tests-general
...
Add v1 tests
2015-06-03 22:18:21 -07:00
Brian Grant
c92b4255b3
Merge pull request #9217 from caesarxuchao/add-v1-tests-to-pkg/kubectl/cmd
...
add v1 tests to kubectl/cmd/*
2015-06-03 22:16:44 -07:00
Chao Xu
6b81c064ed
change v1beta3 to v1 in test cases
2015-06-03 17:50:22 -07:00
Chao Xu
8885025d25
add v1 tests to tests in kubectl/cmd/*
2015-06-03 13:57:54 -07:00
Daniel Smith
67f53d2eff
Make kubectl work inside a container in k8s
2015-06-03 12:48:07 -07:00
Filip Grzadkowski
98115facfd
Revert "Gracefully delete pods from the Kubelet"
2015-06-02 23:40:05 +02:00
Clayton Coleman
72ee028cab
Gracefully delete pods from the Kubelet
...
This commit wires together the graceful delete option for pods
on the Kubelet. When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default. The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.
When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker. When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04:00
Kris
f4e2c738f6
Delete deprecated API versions
...
pkg/service:
There were a couple of references here just as a reminder to change the
behavior of findPort. As of v1beta3, TargetPort was always defaulted, so
we could remove findDefaultPort and related tests.
pkg/apiserver:
The tests were using versioned API codecs for some of their encoding
tests. Necessary API types had to be written and registered with the
fake versioned codecs.
pkg/kubectl:
Some tests were converted to current versions where it made sense.
2015-05-29 17:17:35 -07:00
Jeff Lowdermilk
90a5b8c845
Disable --patch for kubectl update
2015-05-29 09:31:49 -07:00
Chao Xu
9c1153322e
update PodSpec.Host to PodSpec.NodeName in /pkg/api/types.go and /pkg/api/v1beta3/types.go
2015-05-28 14:10:06 -07:00
Anastasis Andronidis
9e3a540940
rename resize to scale
2015-05-27 19:08:06 +02:00
Anastasis Andronidis
d4a47bdb9e
rename run-container to run in kubectl
2015-05-27 19:07:17 +02:00
Anastasis Andronidis
5eae2378d6
Warn for every _ flag user or cmd defined
...
also renames all global _ flags to -
2015-05-27 11:23:52 +02:00
Justin Santa Barbara
973c2e4819
Add Type to ServiceSpec: ClusterIP or LoadBalancer
2015-05-22 19:14:21 -04:00
Masahiro Sano
8ce64ec69e
add --all-namespaces flag to request across all namespaces
2015-05-22 23:25:12 +09:00
deads2k
cd817aebd8
tolerate fatals without newlines
2015-05-20 13:15:49 -04:00
Jeff Lowdermilk
46bd6f298a
Merge pull request #8237 from smarterclayton/continue_on_error
...
Make ContinueOnError actually work
2015-05-15 12:57:29 -07:00
Clayton Coleman
a47716e66d
Make ContinueOnError actually work
...
In resource.Builder ContinueOnError() should actually do so.
Reorganized util.CheckErr() to make it display bulk errors more
effectively and be more reusable. Clarified that CheckErr is not
specific to kubectl in Godoc. Changed the "Error: " prefix to
"error: " to more closely match Unix conventions.
2015-05-15 14:26:14 -04:00
kargakis
ac652d16e6
expose: Re-use labels in case none was specified
2015-05-15 11:54:41 +02:00
Jeff Lowdermilk
ac87ed6516
Merge pull request #8064 from deads2k/death-to-auth-path
...
eliminate auth-path
2015-05-11 15:41:41 -07:00
deads2k
19784dbc4f
remove auth-path from kubeconfig
2015-05-11 10:40:23 -04:00
kargakis
93dc839b19
Load input object for increased safety
2015-05-08 03:17:54 +02:00
kargakis
c9e79a3c28
Setup generators in factory
2015-05-05 12:00:13 +02:00
Eric Paris
6b3a6e6b98
Make copyright ownership statement generic
...
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Eric Paris
a17a26643b
Update kube to support new pflag/cobra
2015-04-29 11:26:30 -04:00
kargakis
e6ee32a6c6
Fix getting services in expose cmd
2015-04-28 14:45:05 +03:00
Tim Hockin
6694eff020
Use pflags word separators to make - and _ equiv.
2015-04-27 15:10:52 -07:00
Jeff Lowdermilk
97e4549170
Merge pull request #6680 from deads2k/deads-change-kubeconfig-chain
...
change kubeconfig loading chain
2015-04-16 13:57:31 -07:00
deads2k
de4be5422c
change kubeconfig loading order
2015-04-16 13:05:09 -04:00
Dan Mace
bd7b719944
Make default impls private
2015-04-15 16:50:08 -04:00
Dan Mace
312ccad3c1
Use narrowly scoped interfaces for client access
...
Use custom narrowly scoped interfaces for client access from the
RollingUpdater and Resizer. This allows for more flexible downstream
integration and unit testing without imposing a burden to implement
the entire client.Interface for just a handful of methods.
2015-04-15 14:28:59 -04:00
Dawn Chen
fb25f9e12c
Merge pull request #6768 from deads2k/deads-allow-flag-elimination
...
allow selective removal of kubeconfig override flags
2015-04-13 16:00:23 -07:00
deads2k
e7baa94404
allow selective removal of kubeconfig override flags
2015-04-13 13:14:23 -04:00
kargakis
ae960552c8
Remove deprecated call to ResourceFromArgs
...
Continuing from #6571
2015-04-11 08:14:25 +02:00
Clayton Coleman
92a68ad7bf
The versioned printer should be initialized with the mapping apiversion
...
VersionedPrinter handles fallback when multiple different APIVersions
are present if multiple arguments are passed (for instance, both Kube
resources at v1beta3 and a third party's API objects which are only
at v1). The cmd PrinterForMapping should always include the current
object's "mapping version" as a fallback in the event the preferred
API version does not map to the actual object.
2015-04-09 15:45:06 -04:00
deads2k
6344cf3c3a
refactor to move kubectl.cmd.Factory to kubect/cmd/util
2015-04-07 14:43:50 -04:00
Clayton Coleman
323a44e54a
Make kubectl errors even more user-friendly
...
Omit glog prefix when v < 2, show multiline errors for configuration
problems, add new generic messages for server errors that hide some
complexity that is not relevant for users.
2015-04-02 01:40:15 -04:00
Tim Hockin
186818d787
WIP: Implement multi-port Services
2015-03-30 19:28:11 -07:00
Jeff Lowdermilk
243de3a472
Fix kubectl log for single-container pods
2015-03-27 12:26:00 -07:00
Clayton Coleman
581d7cd789
Allow resource.Builder commands to take arguments by type/name
...
Will allow xarg behavior to fetch resources across multiple types.
Changes 'create', 'get', 'update', 'stop', and 'delete' to output
<resourceType>/<name>.
2015-03-25 20:39:22 -04:00
Clayton Coleman
022c103699
Update RollingUpdater to use resource.Builder
...
Remove last usage of ResourceFromFile
2015-03-20 00:03:54 -04:00
Dawn Chen
34e9c82c70
Convert RestartPolicy to string for v1beta3.
...
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Jeff Lowdermilk
cd7d78b696
Make kubectl commands return errors and centralize exit handling
2015-03-10 10:19:43 -07:00
Brendan Burns
0ad6e5b48c
Fix the test by using an even more bogus tld.
2015-03-09 14:31:39 -07:00
Alex Mohr
37bfb0d7cf
Merge pull request #5159 from brendandburns/coverage
...
Expand test coverage in master.
2015-03-09 13:26:37 -07:00
Brendan Burns
7c654a3d1b
Expand test coverage in master, kubectl/cmd/util, pkg/registry/resourcequota, and api/rest.
2015-03-07 15:24:39 -08:00
Brendan Burns
f505a33998
Differentiate between server error messages and client error messages in kubectl
2015-03-07 11:39:23 +01:00
Brendan Burns
fb90b56bf6
Embed VolumeSource in v1beta3 and internal.
2015-03-04 02:25:40 -08:00
Mike Danese
25fac68ec4
validate api version in kubectl --patch and --override.
2015-03-02 13:00:45 -08:00
Brian Grant
3f69112e02
Merge pull request #4766 from mikedanese/remove-util-merge
...
Remove pkg/util/merge and replace with evanphx/json-patch
2015-02-25 09:22:01 -08:00
Mike Danese
88e1ab3cbe
replace pkg/util/merge with evanphx/json-patch
2015-02-23 20:55:30 -08:00
Tim Hockin
607b736a3f
Rename volume source types to be consistent.
2015-02-23 12:39:57 -08:00
Clayton Coleman
a8ba77f23b
Remove unused flag helpers
2015-02-21 18:25:55 -05:00
Clayton Coleman
35cc1b0c15
Mark old kubectl/resource.go methods as deprecated
...
Every command should use resource.Builder instead to have consistent
behavior.
2015-02-21 18:22:07 -05:00