hurf
e1b88c6942
Integrate convertion tool to kubectl
...
Added 'convert' subcommand to kubectl to convert config files
between different API versions.
2015-10-09 10:15:30 +08:00
k8s-merge-robot
b0d748efb0
Merge pull request #14461 from JanetKuo/kubectl-api-group-cmd
...
Auto commit by PR queue bot
2015-10-07 07:29:10 -07:00
Janet Kuo
57388f9f94
Support kubectl group/resource name
2015-10-06 13:12:32 -07:00
Paul Morie
227dd82119
Add PodSecurityContext and backward compatibility tests
2015-10-05 21:05:27 -04:00
Kris
f4ad00d9ae
Moving Status object to a common package
2015-09-17 14:09:53 -07:00
feihujiang
ba38a8764b
Remove useless codes about minion
2015-09-16 14:22:53 +08:00
Chao Xu
ac5481d089
move client/unversioned/fake.go to its own package
2015-09-11 17:33:54 -07:00
Chao Xu
64bf839e9f
refactor tests to use testapi rather than latest directly
2015-09-11 17:32:23 -07:00
Chao Xu
dd6c121d7f
massive changes
2015-09-11 17:31:47 -07:00
tummychow
78ce5da988
Move util.StringSet into its own package
...
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Chao Xu
9fc79e9d99
refactor testapi and test scripts to prepare for multiple API groups.
2015-09-04 18:01:32 -07:00
Jeff Lowdermilk
cb65cfa746
Print recognized file extensions in resource builder error
2015-09-03 11:01:13 -07:00
Yu-Ju Hong
5dfc904c18
Merge pull request #10979 from kargakis/resource-builder-name-method
...
Support default types in the resource builder
2015-08-25 10:08:00 -07:00
Janet Kuo
5823ef771b
Make --validate default on and shows how to turn if off
2015-08-25 03:18:32 -07:00
kargakis
f3c63ba16b
Support default types in the resource builder
...
Right now there is no method in the resource builder for specifying just the name of a resource. NameParam is useful when a default type is already specified with ResourceTypes.
Signed-off-by: kargakis <mkargaki@redhat.com>
2015-08-25 10:36:37 +03:00
Nikhil Jindal
4c88aeeda2
Merge pull request #13093 from hurf/nit
...
Fix docstring for InfoForObejct func
2015-08-24 11:37:50 -07:00
Nikhil Jindal
e690f3b3e8
Merge pull request #12900 from feihujiang/deleteMultipleResourcesWithTheSameName
...
Allow delete multiple resources with the same name
2015-08-24 10:40:41 -07:00
hurf
5bec41d0b6
Fix docstring for InfoForObejct func
2015-08-24 21:46:49 +08:00
feihujiang
943c57ff4e
Allow delete multiple resources with the same name
2015-08-24 15:14:01 +08:00
Zach Loafman
5ca0ca3d3f
Merge pull request #9787 from feihujiang/acceptErrorLikeGoPath
...
Make a change to visitor to allow it to accept an error, like Go's pa…
2015-08-21 15:17:58 -07:00
Clayton Coleman
02dbb95447
Add TerminationGracePeriodSeconds to API
...
Set defaulting for pod spec
2015-08-20 11:03:38 -04:00
feihujiang
29dc7f6ec2
Make a change to visitor to allow it to accept an error, like Go's path walker
2015-08-20 10:57:28 +08:00
Saad Ali
49a569a457
Merge pull request #12675 from pweil-/dont-swallow-errors
...
don't swallow bad request errors
2015-08-19 17:01:51 -07:00
Saad Ali
d42864b0ad
Merge pull request #12112 from JanetKuo/update-kubectl-get-pods-running
...
Hide terminated pods in 'kubectl' Printer by default
2015-08-19 12:51:18 -07:00
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
Janet Kuo
44a7a52a94
Hide failed/succeeded pods in 'kubectl get pods' by default
2015-08-18 13:47:19 -07:00
Kris Rousey
ae6c64d9bb
Moving everyone to unversioned client
2015-08-18 10:23:03 -07:00
Clayton Coleman
b842a7dd15
Revert "Revert "Gracefully delete pods from the Kubelet""
...
This reverts commit 98115facfd
.
2015-08-18 08:57:02 -04:00
Paul Weil
f1d0835235
don't swallow bad request errors
2015-08-13 14:31:56 -04:00
feihujiang
4b9afc516e
Kubectl label command accepts a filename param
2015-08-13 10:21:38 +08:00
Mike Danese
8326697055
rewrite all links to prs to k8s links
2015-08-05 21:11:11 -07:00
Mike Danese
8e33cbfa28
rewrite go imports
2015-08-05 17:30:03 -07:00
feihujiang
4553e410d3
Remove the duplicate source (filename) in error message
2015-07-31 10:20:45 +08:00
Mike Danese
4c52257be3
Merge pull request #11571 from kargakis/handle-aliases-in-comma-sep-args
...
Handle aliases in comma-separated args
2015-07-24 13:08:28 -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
kargakis
4fcb4b7f8d
Handle aliases in comma-separated args
2015-07-23 09:32:33 +02:00
Jeff Lowdermilk
8d4167e7f6
kubectl resource builder: don't check extension for single files
...
`kubectl create -f filename` doesn't need to check the extension
of filename. This fixes that behavior.
2015-07-07 13:48:29 -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
Alex Robinson
764d34d363
Merge pull request #10468 from caesarxuchao/add-cmd-replace
...
Add command "kubectl replace"
2015-06-29 16:06:33 -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
Anastasis Andronidis
697e07f864
Correctly parse multiple resources from files
...
Refactored how files, directories and stdin are handled. Every file must pass
through the FileVisitor and then streamed through StreamVisitor. FileVisitor
takes care of opening/closing files and StreamVisitor is parsing multiple
resources.
2015-06-29 23:11:46 +02:00
Chao Xu
9b3d42c090
Add command "kubectl replace". "kubectl update" is still supported as an alias.
...
"kubectl replace --patch" is NOT supported. It's moved to "kubectl patch" as a separate command in another commit.
2015-06-29 12:14:24 -07:00
feihujiang
878a72228f
Provide more helpful error when using unsupported api version
2015-06-29 15:32:54 +08:00
Mike Danese
0c8f71aa0b
make rolling update check if the replication controller has been defaulted
2015-06-25 12:29:21 -07:00
Maxwell Forbes
d90895adfd
Merge pull request #10221 from feihujiang/addSourceForErrorFromServerMessage
...
Add source in “error from server” message when using kubectl
2015-06-25 10:56:46 -07:00
feihujiang
b41b53122a
Add source in “error from server” message when using kubectl
2015-06-25 14:20:09 +08:00
Chao Xu
59b654c996
fix tests for 22f1b07858
2015-06-22 17:10:09 -07:00
Satnam Singh
a3ffb05004
Merge pull request #9972 from smarterclayton/split_versioned_object
...
Split AsVersionedObjects so it can be reused
2015-06-19 08:04:23 -07:00
Mike Danese
3de11e2fa8
reenable patch serverside using strategic-merge-patch
2015-06-18 12:06:46 -07:00
Clayton Coleman
1707c5d28c
Split AsVersionedObjects so it can be reused
2015-06-17 16:33:53 -04:00
krousey
687e866d80
Merge pull request #9418 from mikedanese/kubectl-version-err
...
kubectl should error if versionless yaml is passed to resource builder
2015-06-09 11:55:48 -07: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
Mike Danese
627b2f9a24
kubectl should use UnstructuredJSONScheme to decode version and kind, as it throws errors if either are missing]
2015-06-08 11:51:37 -07:00
Mike Danese
7b7d8ccb77
print various errors which is useful when ContinueOnError is set on the Resource struct
2015-06-06 15:47:01 -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
Masahiro Sano
8ce64ec69e
add --all-namespaces flag to request across all namespaces
2015-05-22 23:25:12 +09:00
Clayton Coleman
0a28e50511
Revert "Revert "Enhance error message from kubectl when 'kind' is empty""
2015-05-20 17:32:23 -04:00
Clayton Coleman
633c56f8c0
Revert "Enhance error message from kubectl when 'kind' is empty"
2015-05-20 10:32:56 -04:00
feihujiang
6c8a1cdb17
Enhance error message from kubectl when 'kind' is empty
...
Enhance error message from kubectl when 'kind' is empty
Enhance error message
2015-05-20 15:23:47 +08: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
Brendan Burns
ea3852ec69
Fix a bug where IgnoreErrors was inverted.
...
Also make an error message a little more verbose.
2015-05-13 16:26:01 +01:00
Clayton Coleman
964bc8afda
Verify namespace is not set on root objects
2015-05-11 15:51:04 -04:00
Brendan Burns
7f11585972
Fix validation by moving it into the resource builder.
...
Also always print an error for unknown field.
2015-05-08 14:00:33 -07: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
Clayton Coleman
12ba4e2452
Do not automatically decode runtime.RawExtension
...
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.
Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00
Brian Grant
38ea531487
Merge pull request #7194 from nikhiljindal/example
...
Updating the guestbook example to v1beta3
2015-04-23 15:26:47 -07:00
nikhiljindal
1e323d77bc
Updating the guestbook example to v1beta3
2015-04-23 14:34:36 -07:00
Mark Maglana
4927d70dd0
Add .yml to the list of recognized file extensions
2015-04-23 08:57:45 -07:00
Clayton Coleman
1bc4912f51
Merge pull request #7030 from liggitt/skip_fetch_delete
...
Skip fetching from server when deleting a named resource
2015-04-20 19:38:10 -04:00
Jordan Liggitt
feb8ba9c4e
Allow resource builder to avoid fetching objects
2015-04-20 15:00:52 -04:00
Clayton Coleman
545a5a865f
List output with differing types should be more resilient
...
kubectl get can output a series of objects as a List in versioned
form, but not all API objects are available in the same schema.
Make the act of converting a []runtime.Object to api.List more
robust and add a test to verify its behavior in Get.
Makes it easier for client code to output unified objects.
2015-04-20 14:44:16 -04:00
Clayton Coleman
4b85c0866a
Don't insert duplicate arguments in SplitResourceArgs
2015-04-17 11:36:25 -04:00
Clayton Coleman
4833578a57
Merge pull request #6958 from smarterclayton/args_remain_in_order
...
`kubectl get rc,pods` should invoke in that order
2015-04-17 11:30:09 -04:00
kargakis
9d056c6bd8
Support setting up aliases for groups of resources
...
Closes #5278
2015-04-17 16:31:59 +02:00
Clayton Coleman
2c11835612
`kubectl get rc,pods` should invoke in that order
...
SplitResourceArguments should not use a golang map
2015-04-17 00:57:02 -04:00
Daniel Smith
44bc29631e
compute query parameter names in the client.
2015-04-06 16:54:26 -07:00
Kris Rousey
6904c4d585
Fixing a lot of string formatting issues with regards to:
...
* Improper format specifier (e.g. %s for bools or %s for ints)
* More or less parameters than format specifiers
* Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
2015-03-31 16:47:10 -07:00
feihujiang
6b79dcaa4d
add source filename in error message
2015-03-27 09:28:48 +08:00
Clayton Coleman
1e496696ca
Merge pull request #5903 from smarterclayton/support_resources_by_type_and_name
...
Allow resource.Builder commands to take arguments by type/name
2015-03-26 14:23:03 -04:00
gmarek
5a11748018
Move Capacity from NodeSpec to NodeStatus
2015-03-26 15:28:48 +01: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
nikhiljindal
7e3b7f9673
Updating unit tests so that they pass with v1beta3 api
2015-03-24 12:13:53 -07:00
Clayton Coleman
6918a4d32e
Replace automatic YAML decoding with opt-in YAML decoding
...
Base codecs no longer automically handle YAML. Instead, clients
must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
2015-03-20 00:03:56 -04:00
Salvatore Dario Minonne
31ddefc347
Finalize fields.Selector
2015-03-17 22:55:43 +01:00
Brian Grant
2f9a41b898
Merge pull request #5233 from brendandburns/labels
...
Make label and field selector query strings versionable.
2015-03-16 16:01:37 -07:00
Dawn Chen
34e9c82c70
Convert RestartPolicy to string for v1beta3.
...
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Brendan Burns
266234f3b9
Make label and field selector query strings versionable.
2015-03-12 12:24:07 -07:00
Brendan Burns
2700871b04
Merge pull request #5013 from smarterclayton/misc_fixup
...
Small cleanups to a number of client behaviors
2015-03-06 15:41:34 +01:00
Salvatore Dario Minonne
75f2efb500
moving ParseSelector to Parse for labels only.
2015-03-05 22:39:36 +01:00
Clayton Coleman
a97635e643
Use IsListType instead of checking ItemPtr in resourcebuilder
2015-03-04 10:48:05 -05:00
rsokolowski
635281ebe3
Update guestbook example to use replication controller.
2015-02-24 20:21:13 +01:00
Karl Beecher
ecbb91cc08
Adds support for multiple resources to kubectl
...
You can specify multiple resources by name when using the delete, get
and stop commands.
2015-02-20 16:18:57 +01:00
Brian Grant
876d651737
Merge pull request #4395 from smarterclayton/split_naming
...
Fix cross-namespace LIST and WATCH
2015-02-17 09:40:09 -08:00
Clayton Coleman
3e2e4714a2
Always set ?namespace in query if specified
...
Revise our code to only call Request.Namespace() if a namespace
*should* be present. For root scoped resources, namespace should
be ignored. For namespaced resources, it is an error to have
Namespace=="".
2015-02-16 00:23:38 -05:00
Salvatore Dario Minonne
fda17c1b7a
kubectl delete resource : remove all resources
2015-02-13 18:25:41 +01:00
derekwaynecarr
0bd0e12bbc
Add support for Namespace as Kind
...
Add example for using namespaces
2015-02-10 09:50:50 -05:00
Clayton Coleman
52c6c60b15
Use name from server when displaying create/update
...
Allows generated names from files to be displayed so users can
interact with them.
2015-02-08 21:40:47 -05:00
Yu-Ju Hong
4a72addaeb
Factor out API defaulting from validation logic
...
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).
* This change is based on pull request 2587.
* Most defaulting has been migrated to defaults.go where the defaulting
functions are added.
* validation_test.go and converter_test.go have been adapted to not testing the
default values.
* Fixed all tests with that create invalid objects with the absence of
defaulting logic.
2015-02-03 00:55:42 -08:00
derekwaynecarr
0851ca9522
Do not provide a namespace on request url if resource does not require it
2015-02-02 10:26:19 -05:00
derekwaynecarr
a8449732e0
Make the FilterNamespace function the last visitor
2015-02-02 10:26:19 -05:00
derekwaynecarr
4c33e36a88
Plumb restmapper properly through apiserver and tests
2015-02-02 10:26:19 -05:00
derekwaynecarr
f911784c98
Cherry pick test from #3901
2015-02-02 10:26:19 -05:00
derekwaynecarr
71ec444d63
Make a RESTMapper scope aware
2015-02-02 10:26:19 -05:00
Clayton Coleman
6894d4feed
Merge pull request #3460 from mnagy/handle-selector-error
...
Fix panic if selector uses malformed syntax
2015-01-14 13:49:22 -05:00
Clayton Coleman
ccdc20d90c
Ignore empty objects from streams and error when nothing passed to create
...
Passing zero objects to create should be an error
2015-01-14 13:12:33 -05:00
Clayton Coleman
31413c8727
Add more tests around JSON/YAML decoding from the CLI
...
Switch the ignore stream errors behavior to print a Warningf on
failure to parse, not v(2)
2015-01-14 12:38:36 -05:00
Martin Nagy
9340781d21
Fix panic if selector uses malformed syntax
2015-01-14 17:13:58 +01:00
Clayton Coleman
ec803cb809
Allow resource.Builder to stream YAML from the CLI
...
Add both JSON and YAML STDIN tests in test-cmd
2015-01-14 00:50:13 -05:00
Clayton Coleman
d24c5b145e
Allow errors to be ignored by the builder
2015-01-09 13:31:24 -05:00
Clayton Coleman
d1ab27762b
Create should be able to accept multiple resources
2015-01-09 13:30:31 -05:00
Clayton Coleman
d75a3d5021
Move Resource functionality to its own package
...
Create a unified Builder object for working with files, selectors,
types, and items that makes it easier to get multi-object functionality.
Supports all of the behaviors previously in resource.go, but with
additional flexibility to allow multi-type retrieval and access, directories,
URLs, nested objects, and lists.
2015-01-09 11:59:06 -05:00