Commit Graph

178 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
Clayton Coleman 0daee3ad22
Use the UpgradeAwareProxy in `kubectl proxy`
Requires a separate transport that is guaranteed not to be HTTP/2 for
exec/attach/portforward, because otherwise the Go client attempts to
upgrade us to HTTP/2 first.
2017-08-04 12:48:21 -04:00
Alexander Campbell 079883fe44 kubectl: deploy generators don't need to impl Generator iface
I was able to delete some outdated tests as part of this change.
2017-07-31 12:26:17 -07:00
Di Xu ac6ec1a69d rename this file to delete.go to avoid confusion 2017-07-29 03:29:14 +00:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Anthony Yeh bbe3ac9f95
Add test for kubectl resource filter. 2017-07-12 11:44:28 -07:00
ymqytw 8dac9639e4 split util/slice 2017-06-30 23:04:18 -07:00
ymqytw 6660726ce6 eliminate kubectl dependency on k8s.io/kubernetes/pkg/util 2017-06-29 14:49:51 -07:00
Alexander Campbell 63e9c67db8 kubectl: refactor addFromEnvFile, write tests 2017-06-23 09:49:30 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Janet Kuo 2b8f91e549 Update kubectl rollout to consume `.data` of DaemonSet history
Also update tset data to make sure DaemonSet template is replaced, not
merged, when rolling back.
2017-06-10 10:52:33 -07:00
Haoran Wang 896288a1cb StatefulSetHasDesiredReplicas condition should check ObservedGeneration and update statefulset reaper use StatefulSetHasDesiredReplicas 2017-06-09 10:15:34 +08:00
Kenneth Owens 1a784ef86f Auto generated code for StatefulSet update 2017-06-06 13:47:19 -07:00
Janet Kuo edabdac094 Implement kubectl rollout history and undo for DaemonSet 2017-06-03 17:10:57 -07:00
Michail Kargakis 9190a47c37
Generated changes for collision count
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-25 12:23:17 +02:00
Jeffrey Regan 5a9b06b717 **What this PR does / why we need it**:
Remove kubectl's dependence on pkg/api/helper, as part of
broader effort to isolate kubectl from the rest of k8s.
In this case, the code becomes private to kubectl; nobody else uses it.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-05-21 20:44:21 -07:00
Zihong Zheng 5992425588 Autogenerated files 2017-05-16 21:55:51 -07:00
Jeffrey Regan 7abff879d7 Introduce visibility rules to kubernetes code.
**What this PR does / why we need it**:

Visibility rules allow dependency control.  The rules currently in
place make all targets public, to override the default state of
private.  This PR removes public visibility from kubectl code.  It
uses specially named pacakge groups to identify "bad" dependencies on
kubectl code for later refactoring or removal.

**Which issue this PR fixes**

First in a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-05-15 12:50:56 -07:00
mbohlool ea042c6ca0 Update go-restful dependency 2017-05-05 13:57:01 -07:00
Fabiano Franz 2b178ad608 Basic support for kubectl plugins 2017-04-28 01:34:07 -03:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Kubernetes Submit Queue 785299eea5 Merge pull request #43490 from xingzhou/add-testcases
Automatic merge from submit-queue (batch tested with PRs 43304, 41427, 43490, 44352)

Supplement unit tests to `kubectl create rolebinding` command.

Supplement unit tests to `kubectl create rolebinding` command,
including:
1. Unit tests for pkg/kubectl/role.go
2. Unit tests for pkg/kubectl/cmd/create_role.go
2017-04-11 13:46:16 -07:00
Kubernetes Submit Queue 8fc0c708d1 Merge pull request #43509 from xilabao/remove-duplicate-in-create-rolebinding
Automatic merge from submit-queue (batch tested with PRs 42617, 43247, 43509, 43644, 43820)

ignore duplicate resource in create rolebinding
2017-03-29 16:05:23 -07:00
Xing Zhou 65b5b51c82 Supplement unit tests to `kubectl create rolebinding` command.
Supplement unit tests to `kubectl create rolebinding` command,
including:
1. Unit tests for pkg/kubectl/role.go
2. Unit tests for pkg/kubectl/cmd/create_role.go
2017-03-29 16:36:22 +08:00
Kubernetes Submit Queue 0e17e5bd9c Merge pull request #38882 from fraenkel/configmap_env_file
Automatic merge from submit-queue (batch tested with PRs 41139, 41186, 38882, 37698, 42034)

create configmap from-env-file

Allow ConfigMaps to be created from Docker based env files.

See proposal https://github.com/kubernetes/community/issues/165

**Release-note:**
```release-note
1. create configmap has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
2. create secret has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
```
2017-03-24 12:33:25 -07:00
xilabao d2069ab46b ignore duplicate resource in create rolebinding 2017-03-22 17:35:04 +08:00
Jordan Liggitt 939ca532aa
generated files 2017-03-20 23:57:38 -04:00
Anthony Yeh fa23729a6d kubectl: Use v1.5-compatible ownership logic when listing dependents.
In particular, we should not assume ControllerRefs are necessarily set.
However, we can still use ControllerRefs that do exist to avoid
interfering with controllers that do use it.
2017-03-16 12:28:38 -07:00
Maciej Szulik aa4390750c Introduce new generator for apps/v1beta1 deployments 2017-03-10 12:08:01 +01:00
Maciej Szulik 1049dad0a4 Switch generators to use versioned objects 2017-03-10 12:08:01 +01:00
Michael Fraenkel f2815156b0 create secret from-env-file 2017-03-08 07:58:01 -08:00
Anthony Yeh 8c4bcb38fb Deployment: Filter by ControllerRef in Reaper.
We don't want to delete ReplicaSets we don't own.
2017-03-06 15:12:08 -08:00
Matthias Bertschy 336a78aeaf Use natural sorting for strings in sorting_printer
Import new dependency vbom.ml/util/sortorder
Run ./hack/update-bazel.sh
2017-02-28 07:50:44 +01:00
Clayton Coleman 651188d687
generated: bazel 2017-02-23 00:28:32 -05:00
Solly Ross 946ecb549e Update kubectl to work with new HPA objects
This commit updates kubectl to work with the changes to the unversioned
HPA object made to support the HPA v2alpha1 API.
2017-02-07 22:25:28 -05:00
Kubernetes Submit Queue 61d45f5900 Merge pull request #40541 from fabianofranz/fix_sorting_printer_with_missing_fields
Automatic merge from submit-queue (batch tested with PRs 40645, 40541, 40769)

Fix sorting printer when sorting by a missing field

**What this PR does / why we need it**:

When calling `kubectl get` with the `--sort-by` flag, the command will error out if the field used for sorting is not present in at least one of the objects returned in the list, *even if it is a field valid in the object's model*. 

For example, taking a list of `ReplicationController` where one of them has `status: { replicas: 0 }` (so nothing in `status.availableReplicas`, even that being a valid object in the model and present in every other object of the list) :

```
$ oc get rc --sort-by=status.availableReplicas
error: availableReplicas is not found
```

This PR now traverses the entire list of objects to be sorted and, if at least one has the field provided in `--sort-by`, we sort correctly and consider the field empty in every other object where the field is not present. If none of the objects has the field, we error out (that will catch really invalid fields, and valid ones but not present in any object in the list, which is acceptable). No swagger validation here.

**Release note**:
```release-note
Fixed an issue where 'kubectl get --sort-by=' would return an error when the specified field were not present in at least one of the returned objects, even that being a valid field in the object model.
```
2017-01-31 22:00:38 -08:00
deads2k c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Fabiano Franz 5eeef81edf Fix sorting printer with missing fields 2017-01-28 19:56:53 -02:00
Jordan Liggitt a57307a429
bazel 2017-01-26 19:59:16 -05:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
Dr. Stefan Schimanski a0137e9b28 Update generated files 2017-01-25 19:49:45 +01:00
deads2k 502bfdf944 client/restclient/fake move to client-go 2017-01-25 08:29:48 -05:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
deads2k 9c6a522882 mechanical results of client auth plugin 2017-01-20 08:05:18 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Kubernetes Submit Queue 6defc30337 Merge pull request #39882 from deads2k/api-59-errors
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

move api/errors to apimachinery

`pkg/api/errors` is a set of helpers around `meta/v1.Status` that help to create and interpret various apiserver errors.  Things like `.NewNotFound` and `IsNotFound` pairings.  This pull moves it into apimachinery for use by the clients and servers.

@smarterclayton @lavalamp First commit is the move plus minor fitting.  Second commit is straight replace and generation.
2017-01-16 10:37:42 -08:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Dr. Stefan Schimanski 918868b115 genericapiserver: cut off certificates api dependency 2017-01-16 14:10:59 +01:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Janet Kuo a8e92e6f2a Fix bug when printing replicas in Deployment Describer 2017-01-11 17:26:01 -08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
deads2k 8b25c21e79 add create rolebinding 2016-12-21 09:03:27 -05:00
Maciej Szulik cdec94523e Remove extensions/v1beta1 Job - generated changes 2016-12-17 00:07:25 +01:00
Chao Xu 6709b7ada2 run hack/update-codegen.sh
run hack/verify-gofmt.sh
update bazel
2016-12-14 12:39:49 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Clayton Coleman c52d510a24
refactor: generated 2016-12-10 18:05:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Michail Kargakis b8fab92600 kubectl: generated changes for new pdb command 2016-12-02 18:42:25 +01:00
Kubernetes Submit Queue 74066816b6 Merge pull request #37098 from deads2k/cli-12-create-cbinding
Automatic merge from submit-queue

add create clusterrolebinding command

Adds `kubectl create clusterrolebinding`.

@kubernetes/sig-cli
2016-12-02 08:44:58 -08:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
deads2k e300f01a1b add create clusterrolebinding command 2016-11-21 08:50:06 -05:00
Brandon Philips 9216057589 kubectl: add less verbose version
The kubectl version output is very complex and makes it hard for users
and vendors to give actionable information. For example during the
recent Kubernetes 1.4.3 TLS security scramble I had to write a one-liner
for users to get out the version number to give to figure out if they
are vulnerable:

    $ kubectl version | grep -i Server | sed  -n 's%.*GitVersion:"\([^"]*\).*%\1%p'

Instead this patch outputs simply output with `--short`

    ./kubectl version --short
    Client Version: v1.4.3
    Server Version: v1.4.3
2016-11-10 14:07:42 -08:00
Marcin 5e83188327 Autogenerated bazel 2016-11-09 13:41:18 +01:00
Anirudh 6d7213dd39 Update bazel 2016-11-03 13:47:09 -07:00
Madhusudan.C.S 1712a190cb [Federation][(Un)join-00] Implement federation/cluster resource generator. 2016-11-01 00:58:54 -07:00
Kubernetes Submit Queue a06a08a906 Merge pull request #34489 from caesarxuchao/time-copy.sh
Automatic merge from submit-queue

Verify and update client-go staging area for every PR

We need to keep the staging area up-to-date to prevent PRs from breaking client-go.

It's marked as "WIP" because we need to decide the [versioning strategy](https://github.com/kubernetes/client-go/issues/9) for client-go first. This PR contains breaking changes for client-go.

This is blocking #29934 and potentially #34441

cc @kubernetes/sig-api-machinery
2016-10-29 16:24:07 -07:00
Chao Xu fd2fdfba89 move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00