Commit Graph

64 Commits (33f873dbbee58caffcff9e7b44f174a32ec1df92)

Author SHA1 Message Date
Shiyang Wang e6405dccf6 add apply --force --overwrite deployment lables e2e test enhance 2017-11-01 00:21:14 +08:00
Minhan Xia dd7ad4b738 Modify serve-hostname image to handle graceful termination 2017-10-23 14:09:32 -07:00
Nikhita Raghunath 694630724a Rename TPR to CRD to be consistent
TPR has been completely removed. We should rename TPR
to CRD to be consistent with the nomenclature.
2017-10-01 21:13:24 +05:30
Kubernetes Submit Queue 1b93686fe3 Merge pull request #51021 from zjj2wry/scale-selector-all
Automatic merge from submit-queue (batch tested with PRs 51021, 53225, 53094, 53219). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

"fix issue(#49965)kubectl scale also says that it can work based on a label selector or all"

**What this PR does / why we need it**:
Fixes #49965 #44800

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-29 12:38:17 -07:00
Kubernetes Submit Queue ee4e4a5418 Merge pull request #51186 from dixudx/fix_delete_uninitialized_resources
Automatic merge from submit-queue (batch tested with PRs 51186, 50350, 51751, 51645, 51837)

fix bug on kubectl deleting uninitialized resources

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

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51185

**Special notes for your reviewer**:
/assign @caesarxuchao @ahmetb 

**Release note**:

```release-note
fix bug on kubectl deleting uninitialized resources
```
2017-09-05 17:29:59 -07:00
Kubernetes Submit Queue 5c0b265a9b Merge pull request #50497 from dixudx/kubectl-include-uninitialized
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

Introduce new flag "--include-uninitialized" to kubectl

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

Introduce `--include-uninitialized` as a global flag to kubectl

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49035

**Special notes for your reviewer**:
/assign @caesarxuchao @smarterclayton @ahmetb @deads2k 

**Release note**:

```release-note
Add flag "--include-uninitialized" to kubectl annotate, apply, edit-last-applied, delete, describe, edit, get, label, set. "--include-uninitialized=true" makes kubectl commands apply to uninitialized objects, which by default are ignored if the names of the objects are not provided. "--all" also makes kubectl commands apply to uninitialized objects. Please see the [initializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/) doc for more details.
```
2017-09-02 23:50:00 -07:00
Di Xu 5e120cfc68 add tests 2017-09-01 10:46:13 +08:00
Di Xu 8a6a25f5f0 add tests 2017-08-31 16:31:02 +08:00
Kubernetes Submit Queue 4d5fc46536 Merge pull request #50998 from zjj2wry/set-env
Automatic merge from submit-queue (batch tested with PRs 51377, 46580, 50998, 51466, 49749)

feat(#21648 )Add kubectl set env command.

**What this PR does / why we need it**:
#21648
Moved from OpenShift to Kubenetes.
@kargakis @smarterclayton 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-29 22:57:06 -07:00
ymqytw 838c47ee10 add apply test for retainKeys 2017-08-28 16:37:23 -07:00
zhengjiajin f441de6be8 Add bash test for kubectl scale --selector and --all 2017-08-27 15:42:20 +08:00
zhengjiajin 04be0131d0 Add bash test for kubectl set env command 2017-08-25 20:37:46 +08:00
crimsonfaith91 ebdbafd2c5 statefulSet kubectl rollout command 2017-08-24 16:43:03 -07:00
Shiyang Wang 1010916c1a add cmd-test for sort-by command 2017-08-11 15:53:31 +08:00
Eric Chiang e2f2ab67f2 *: remove --insecure-allow-any-token option
e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```
2017-07-18 16:03:15 -07:00
mbohlool 222f6ae37f Add test from #47578 2017-06-21 10:56:00 -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
Janet Kuo edabdac094 Implement kubectl rollout history and undo for DaemonSet 2017-06-03 17:10:57 -07:00
Jordan Liggitt ad116026d9
Remove vestiges of defaulting from conversion path, switch to top-level default registration only 2017-04-12 13:36:15 -04:00
Janet Kuo d0b5de855f Add a test for semantically equal DaemonSet updates 2017-03-21 16:06:34 -07:00
ymqytw 710d904998 add apply cmd tests for TPR 2017-02-02 15:20:45 -08:00
Anastasis Andronidis 4bdcc03c0b
test for explicit null value propagation in apply 2017-01-31 14:22:24 -05:00
Mike Danese 96c146c8f2 promote certificates.k8s.io to beta 2017-01-19 13:13:20 -08:00
nikhiljindal 5424d50c03 Adding test-federation-cmd.sh to test kubectl with federation apiserver 2017-01-04 11:17:05 -08:00
Janet Kuo b88bebded5 Remove initialized annotation from statefulset examples 2016-11-23 10:40:42 -08:00
Kubernetes Submit Queue fac05d9c81 Merge pull request #36174 from JacobTanenbaum/v2resource_fixes
Automatic merge from submit-queue

V2resource fixes

when using kubectl set resources it resets all resource fields that are not being set.

for example
$ kubectl set resources deployments nginx --limits=cpu=100m

followed by

$ kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

you must specify an update to requests or limits or (in the form of --requests/--limits)

corrected to

you must specify an update to requests or limits (in the form of --requests/--limits)

Implemented both the dry run and local flags.

Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112

The original PR associated with these fixes where reverted due to causing a flake in hack/make-rules/test-cmd.sh, I gave the 'kubectl set resources' tests there own deployment and set the terminationGracePeriodSeconds to 0 and have run test-cmd.sh for hours without hitting the flake
2016-11-15 21:03:06 -08:00
Mike Danese 584689f182 implement kubectl procelain csr commands 2016-11-08 06:33:46 -08:00
Jimmy Cuadra d42eabd9d2 Rename PetSet to StatefulSet in docs and examples. 2016-11-05 00:17:28 -07:00
Kubernetes Submit Queue e4edd817af Merge pull request #35220 from MrHohn/kubectl-apply-type
Automatic merge from submit-queue

Implement --prune-whitelist(-w) flag to overwrite default whitelist for --prune

From #34274.

Updates:

As suggested, the new commits implement a default whitelist for `kubectl apply --prune`, which could be overwritten by using `--prune-whitelist`or `-w` flag. The default whitelist and example as below.

Also supports `--dry-run` for `--prune` to fix #35222.

whitelist:

```
type pruneResource struct {
    group      string
    version    string
    kind       string
    namespaced bool
}

*pruneResources = []pruneResource{
    {"", "v1", "ConfigMap", true},
    {"", "v1", "Endpoints", true},
    {"", "v1", "Namespace", false},
    {"", "v1", "PersistentVolumeClaim", true},
    {"", "v1", "PersistentVolume", false},
    {"", "v1", "Pod", true},
    {"", "v1", "ReplicationController", true},
    {"", "v1", "Secret", true},
    {"", "v1", "Service", true},
    {"batch", "v1", "Job", true},
    {"extensions", "v1beta1", "DaemonSet", true},
    {"extensions", "v1beta1", "Deployment", true},
    {"extensions", "v1beta1", "HorizontalPodAutoscaler", true},
    {"extensions", "v1beta1", "Ingress", true},
    {"extensions", "v1beta1", "ReplicaSet", true},
    {"apps", "v1beta1", "StatefulSet", true},
}
```

example:

```
$ kubectl apply -f /path/to/file --prune -l test=true \
      -w core/v1/Pod \
      -w core/v1/Service \
      -w extensions/v1beta1/Deployment 
```

@mikedanese
2016-11-03 18:46:17 -07:00
Jacob Tanenbaum 13afa70c81 Implemented both the dry run and local flags.
Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112

The previous attempt at the PR (PR#35050) was reverted for causeing a flake.
I believe that setting the deployments terminationGracePeriodSeconds to 0 should
take care of it. I ran hack/make-rules/test-cmd.sh 50 times in a row without encountering
the flake
2016-11-03 12:55:19 -04:00
Janet Kuo c15b9470f5 Replace apps/v1alpha1 with apps/v1beta1 and manually remove generated apps/v1alpha1 files
Manually remove generated apps/v1alpha1 types, protobuf, and api-reference doc files
Manually remove apps/v1alpha1 folder from 1.5 generated client
2016-11-02 15:16:23 -07:00
Zihong Zheng 4523ce8f32 Adds a test for apply --prune --prune-whitelist 2016-11-01 14:02:31 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Mike Danese c17a8a773d kubectl: apply prune should fallback to basic delete when a resource has no reaper 2016-10-14 15:04:38 -07:00
Mike Danese 62960aace7 add a test for kubectl apply --prune 2016-10-06 17:49:02 -07:00
Mike Danese 6339d915a7 add a test to test-cmd.sh for apply -f with label selector 2016-09-30 00:42:35 -07:00
bprashanth 05aa040b0f Allow changes to container image for updates 2016-08-18 16:33:51 -07:00
Michael Fraenkel b1e7e6cf46 Service names conform to RFC 1035 2016-08-02 08:42:15 -06:00
k8s-merge-robot 7d3d784655 Merge pull request #27902 from caesarxuchao/fix-test-cmd
Automatic merge from submit-queue

fix test-cmd multi-resource test

See inline descriptions.
2016-06-25 14:47:30 -07:00
k8s-merge-robot b4c81a073a Merge pull request #25709 from asalkeld/null-deref
Automatic merge from submit-queue

Check for an empty value in validateField

```release-note
* Fix a panic when args was not supplied with any values.
```

reflect.TypeOf() can take a nil (it then returns a nil), but
Kind() panics on a nil.

Now the user gets the following output:
./kubectl.sh --server=http://localhost:8080 create -f ../../test-files/test-rc.yaml
error validating "../../test-files/test-rc.yaml": error validating data: unexpected nil value for field spec.template.spec.containers[0].args[0]; if you choose to ignore these errors, turn validation off with --validate=false

fixes #20627 and fixes #26927
2016-06-25 02:31:01 -07:00
Chao Xu 27f4eca5b3 fix test-cmd multi-resource test 2016-06-22 14:58:07 -07:00
Michail Kargakis f3d2e3ff22 controller: proportionally scale paused and rolling deployments
Enable paused and rolling deployments to be proportionally scaled.
Also have cleanup policy work for paused deployments.
2016-06-20 12:13:35 +02:00
Angus Salkeld 5dcbc7ce5b Check for an empty value in validateField
reflect.TypeOf() can take a nil (it then returns a nil), but
Kind() panics on a nil.

Fixes #20627
2016-05-30 14:12:18 +10:00
k8s-merge-robot 39f0c6ba25 Merge pull request #24719 from bprashanth/kubectl_tls
Automatic merge from submit-queue

Add a kubectl create secret tls command

A somewhat hasty implementation that enables progress along: https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-177409516, https://github.com/kubernetes/kubernetes/issues/24669, https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-198142836 if associated parties have spare cycles. @kubernetes/kubectl

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24719)
<!-- Reviewable:end -->
2016-05-22 09:40:42 -07:00
Janet Kuo 4332472bde Add 'kubectl set image' 2016-05-18 21:23:17 -07:00
Prashanth Balasubramanian daa8e29c5b Add a kubectl create secret tls command 2016-05-16 22:38:56 -07:00
Phillip Wittrock 680b2b9d09 Kubectl support for validating nested objects with different ApiGroups (e.g. Lists containing objects in different api groups). Closes #24089 2016-05-09 19:38:40 -07:00
Muhammed Uluyol f3690e2d5e
build/pause: write in C
Builds statically against glibc. References to the old pause
image have been updated.
2016-05-04 21:45:52 -04:00
Mike Metral 999c8e211e allow kubectl subcmds to process multiple resources
- use resource.Visit() to recursively process resources, as well as, aggregate
errors where possible
2016-05-01 20:27:37 -07:00
k8s-merge-robot bfc953cd4b Merge pull request #23890 from pmorie/kubectl-describe-envs
Automatic merge from submit-queue

Correctly handle secret and configMap envs in kubectl describe

Fixes #23679 

cc @kubernetes/kubectl @jwforres
2016-04-16 17:08:58 -07:00