Jeffrey Regan
dbc22ad6fd
Remove kubectl's dependence on schema file in pkg/api/validation.
...
**What this PR does / why we need it**:
Makes functions in validation/schema.go private to kubectl,
further isolating kubectl.
**Which issue this PR fixes**
Part of a series of PRs to address kubernetes/community#598
**Release note**:
```release-note
NONE
```
2017-08-16 16:38:28 -07:00
Haoran Wang
c536614509
do not close os.Stdin manually
2017-07-16 09:55:08 +08:00
AdoHe
5ed1ab66a2
refactor edit to remove cobra dependency and also make it reusable
2017-04-18 20:44:25 +08:00
Jordan Liggitt
5b805bc18a
Simplify 'kubectl edit' logic
...
edit: make editFn operate on arguments regardless of mode
edit: simplify short-circuiting logic when re-editing a file containing an error
edit: factor out visitor building
edit: use resource builder to get results from edited file
2017-02-14 14:51:06 -05:00
Clayton Coleman
469df12038
refactor: move ListOptions references to metav1
2017-01-23 17:52:46 -05:00
deads2k
77b4d55982
mechanical
2017-01-16 09:35:12 -05:00
deads2k
6a4d5cd7cc
start the apimachinery repo
2017-01-11 09:09:48 -05:00
Brendan Burns
8e561d9ae7
Add support for loading utf16 files.
2016-12-21 14:57:26 -08:00
Jordan Liggitt
3654d63766
Compute apply patch using versioned object
2016-12-09 16:26:04 -05:00
Kubernetes Submit Queue
910912ea3b
Merge pull request #37364 from foxyriver/status-code
...
Automatic merge from submit-queue
use status code const to express http status
<!-- Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->
**What this PR does / why we need it**:
Using status code const to express http status.
**Special notes for your reviewer**:
**Release note**:
<!-- Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access)
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`.
-->
```release-note
```
2016-12-07 22:47:46 -08:00
Clayton Coleman
35a6bfbcee
generated: refactor
2016-11-23 22:30:47 -06:00
foxyriver
ee6568a52a
use status code const to express http status
2016-11-24 09:07:04 +08:00
Mike Danese
5f2569c16d
allow kubectl -f to filter by selector
2016-09-30 00:42:35 -07:00
Brendan Burns
23c7c2e3e7
Add namespace error checking if a resource is not found.
2016-09-14 06:51:36 -07:00
Kara Alexandra
d12a66a422
Rename IsEmpty to Empty
...
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-19 14:19:19 -07:00
Kris
24c441e96d
kubectl/resource: Remove thirdparty special casing
...
And also remove some duplicate code while I'm at it.
2016-08-15 22:07:54 -07:00
Andrey Kurilin
91cace347d
Fix various typos in kubectl
2016-08-02 19:51:51 +03:00
Wang Xing
6cabb084c3
Remove redundant ToJSON
2016-07-22 11:28:21 +08:00
David McMahon
ef0c9f0c5b
Remove "All rights reserved" from all the headers.
2016-06-29 17:47:36 -07:00
Cesar Wong
0800ed834c
Fix URLVisitor error message
2016-05-26 09:20:42 -04:00
Phillip Wittrock
b9f9d130d7
Address PR comments 2
2016-05-09 16:23:15 -07:00
Phillip Wittrock
3d08c73767
Address PR Comments 1
2016-05-09 16:21:30 -07:00
Phillip Wittrock
75417ba3e4
Retry fetching http urls passed to '-f' in kubectl.
...
Closes #24089 .
2016-05-09 15:58:17 -07:00
Wojciech Tyczynski
89585237cd
Rename RawJSON to Raw in runtime.RawExtension and add ContentType & ContentEncoding.
2016-03-18 12:35:27 +01:00
Jordan Liggitt
560b02b3ec
Prefer fetched version when determining HPA group version kind
2016-03-11 00:03:38 -05:00
Avesh Agarwal
ad6dfa0370
Fix kubectl create to create all resources in a url.
...
https://github.com/kubernetes/kubernetes/issues/18751 .
2016-03-02 18:08:24 -05:00
Clayton Coleman
2fd38a7dc0
Break kubectl from assuming details of codecs
...
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.
Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.
React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
Brendan Burns
4123a61df7
Add the client side bits of kubectl export
2015-12-22 10:41:59 -08:00
feihujiang
ad79fa6e84
Move list functions from runtime to meta package
2015-11-20 09:20:55 +08:00
k8s-merge-robot
77207d75e1
Merge pull request #15667 from JanetKuo/kubectl-watch-list
...
Auto commit by PR queue bot
2015-10-19 06:28:35 -07:00
eulerzgy
f8f9afb874
alias local packagename for pkg/util/errors
2015-10-18 09:37:46 +08:00
Janet Kuo
33b9235312
Better error handling for watching a list of resources specified in a file
2015-10-14 16:38:03 -07:00
Janet Kuo
5823ef771b
Make --validate default on and shows how to turn if off
2015-08-25 03:18:32 -07: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
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
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
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
Mike Danese
0c8f71aa0b
make rolling update check if the replication controller has been defaulted
2015-06-25 12:29:21 -07:00
feihujiang
b41b53122a
Add source in “error from server” message when using kubectl
2015-06-25 14:20:09 +08: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
7b7d8ccb77
print various errors which is useful when ContinueOnError is set on the Resource struct
2015-06-06 15:47:01 -07: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