k8s-merge-robot
07929972a3
Merge pull request #18835 from brendandburns/3rdparty
...
Automatic merge from submit-queue
Add support for 3rd party objects to kubectl
@deads2k @jlowdermilk
Instructions for playing around with this:
Run an apiserver with third party resources turned on (`--runtime-config=extensions/v1beta1=true,extensions/v1beta1/thirdpartyresources=true`)
Then you should be able to:
```
kubectl create -f rsrc.json
```
```json
{
"metadata": {
"name": "foo.company.com"
},
"apiVersion": "extensions/v1beta1",
"kind": "ThirdPartyResource",
"versions": [
{
"apiGroup": "group",
"name": "v1"
},
{
"apiGroup": "group",
"name": "v2"
}
]
}
```
Once that is done, you should be able to:
```
curl http://<server>/apis/company.com/v1/foos
```
```
curl -X POST -d @${HOME}/foo.json http://localhost:8080/apis/company.com/v1/namespaces/default/foos
```
```json
{
"kind": "Foo",
"apiVersion": "company.com/v1",
"metadata": {
"name": "baz"
},
"someField": "hello world",
"otherField": 1
}
```
After this PR, you can do:
```
kubectl create -f foo.json
```
```
kubectl get foos
```
etc.
2016-03-31 18:09:56 -07:00
Brendan Burns
be6c5b332b
Add third party support to kubectl
2016-03-31 10:53:32 -07:00
Janet Kuo
c1596e6711
Update guestbook examples; replace RC concepts with Deployment
2016-03-30 14:16:52 -07:00
Mike Metral
7403878ac0
allow kubectl cmd to process dirs recursively
...
reqs:
- the kubectl cmd must support the -f | --filename flag
- the kubectl cmd must support visiting a dir one level deep,
or using more than one resource
2016-03-28 12:44:21 -07:00
Wojciech Tyczynski
89585237cd
Rename RawJSON to Raw in runtime.RawExtension and add ContentType & ContentEncoding.
2016-03-18 12:35:27 +01:00
Wojciech Tyczynski
218d3e5923
Rename RawJSON to Raw in runtime.Unknown and add ContentType & ContentEncoding.
2016-03-16 16:43:58 +01:00
deads2k
5bd161a9cc
allow resource.version.group in kubectl
2016-03-11 10:21:50 -05: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
Kris
e664ef922f
Move restclient to its own package
2016-02-29 12:05:13 -08:00
deads2k
9c42d219bc
allow disambiguation of resouces
2016-02-25 07:35:23 -05:00
Clayton Coleman
d23c531869
Can't replace a generic resource that is cluster scoped
...
It should be allowed to invoke kubectl replace with a JSON file that has
no resource version set. Namespaced resources were working correctly,
but cluster resources were silently failing to lookup the current state
of the object to get the resource version because we weren't using
NamespaceIfScoped(). Added a failing test.
2016-02-12 16:20:37 -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
nikhiljindal
2ad642d370
Merge registered and latest and move to apimachinery
2016-01-21 14:42:21 -08:00
David Oppenheimer
8ac484793d
Comment out calls to httptest.Server.Close() to work around
...
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
k8s-merge-robot
356487c951
Merge pull request #18101 from brendandburns/kubectl6
...
Auto commit by PR queue bot
2015-12-29 12:43:42 -08:00
k8s-merge-robot
500493a3ac
Merge pull request #18925 from caesarxuchao/refactor-registration
...
Auto commit by PR queue bot
2015-12-24 15:19:36 -08:00
Chao Xu
2b5b708b70
Refactor the API registration and installation
2015-12-23 22:44:25 -08:00
Brendan Burns
4123a61df7
Add the client side bits of kubectl export
2015-12-22 10:41:59 -08:00
deads2k
20f9c2c545
find partial resource matches
2015-12-21 09:26:06 -05:00
k8s-merge-robot
649855128d
Merge pull request #18627 from caesarxuchao/oneline-fix
...
Auto commit by PR queue bot
2015-12-19 00:50:31 -08:00
k8s-merge-robot
00c754108f
Merge pull request #18165 from fabianofranz/fixes_get_show_all
...
Auto commit by PR queue bot
2015-12-18 20:01:20 -08:00
Abhishek Shah
6f63875165
Reverting 18442
2015-12-17 16:57:29 -08:00
Fabiano Franz
717896eae3
Fixes get --show-all
2015-12-17 18:35:54 -02:00
deads2k
41b78ad2b6
find partial resource matches
2015-12-16 10:19:31 -05:00
Chao Xu
5ba4f836f8
some small fix
2015-12-15 12:00:48 -08:00
deads2k
d0aaf13920
use constants for group names
2015-12-14 10:04:10 -05:00
deads2k
519b4e80d1
update NewObject for groupversionkind
2015-12-09 08:13:15 -05:00
deads2k
2ee3dfe415
update testapi to eliminate redundant fields
2015-12-07 15:54:26 -05:00
deads2k
f764e0099c
Update ObjectTyper to GroupVersion
2015-12-07 08:35:05 -05:00
Chao Xu
6e192760e3
refactoring latest.go GroupVersion;
...
clean up latest.go GroupVersions;
remove latest.GroupMeta.Group;
remove latest.GroupMeta.Version.
2015-11-30 11:30:21 -08:00
deads2k
8679925847
update RESTMapping API to be properly typed
2015-11-25 14:02:37 -05:00
deads2k
5c4fb5bcbe
make RESTMapper.KindFor
2015-11-25 14:02:37 -05:00
deads2k
5077e9b644
make register.GroupVersion use GroupVersion
2015-11-24 09:45:36 -05:00
feihujiang
ad79fa6e84
Move list functions from runtime to meta package
2015-11-20 09:20:55 +08:00
deads2k
303bcad398
use groupversion in RESTMapping
2015-11-16 09:22:11 -05:00
Kris
eacf65ddce
Renaming HTTPClientFunc to CreateHTTPClient
2015-11-11 11:54:58 -08:00
Kris
4a4d195419
Exposing http.Client for configurable timeouts
2015-11-10 13:40:51 -08:00
k8s-merge-robot
a9534bfd33
Merge pull request #16441 from liggitt/helper_codec
...
Auto commit by PR queue bot
2015-10-30 11:29:17 -07:00
Fabiano Franz
d9161cb3b5
stdin is not a valid file extension for bash completions
2015-10-29 00:00:34 -02:00
Jordan Liggitt
b58e62e7d4
Pass runtime.Object to Helper.Create/Replace
2015-10-28 12:43:21 -04:00
Clayton Coleman
be868e934c
Revert resource.Builder changes from 57388f9
...
57388f9f94
2015-10-21 16:23:33 -04: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
Chao Xu
fe7b85f6ea
run goimports
2015-10-12 13:33:13 -07:00
Chao Xu
8654227c08
run grep-sed
2015-10-12 13:33:13 -07:00
Chao Xu
58ed8fd6fe
run goimports
2015-10-12 13:33:13 -07:00
Chao Xu
654ceb6e5a
run grep-sed
2015-10-12 13:33:13 -07:00
Chao Xu
50a2c4c643
grep-sed
2015-10-12 13:31:45 -07:00
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