Commit Graph

5978 Commits (25ca287707e5061291e893fa97a18b4c160b2161)

Author SHA1 Message Date
Chao Xu d3fa25b996 fix kubeproxy in hack/local-up-cluster.sh 2017-11-06 20:56:17 -08:00
Kubernetes Submit Queue 67c9e7419c
Merge pull request #54586 from DirectXMan12/bug/fix-incorrect-scale-and-hpa-gvks
Automatic merge from submit-queue (batch tested with PRs 53645, 54734, 54586, 55015, 54688). 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 Incorrect Scale Subresources and HPA e2e ScaleTargetRefs

The HPA e2es failed to actually set `apiVersion` on the created HPAs, which previous was ignored.  Since the polymorphic scale client was merged, this behavior is no longer tolerated (it was never correct to begin with, but it accidentally worked).

Additionally, the `apps` resources have their own version of scale.  Until `apps/v1beta1` and `apps/v1beta2` go away, we need to support those versions in the scale client.

Together, these broke some of the HPA e2es.

Fixes #54574

```release-note
NONE
```
2017-11-06 15:33:43 -08:00
Kubernetes Submit Queue 2907168a87
Merge pull request #53645 from xiangpengzhao/fix-kubeproxy-cc
Automatic merge from submit-queue. 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>.

move KubeProxyConfiguration out of componentconfig API group

**What this PR does / why we need it**:
move KubeProxyConfiguration out of componentconfig API group

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

**Special notes for your reviewer**:
/cc @thockin @ncdc 

**Release note**:

```release-note
NONE
```
2017-11-06 14:55:02 -08:00
Nikhita Raghunath 355279c866 typed client: add tags and script for code generation 2017-11-05 14:37:27 +05:30
xiangpengzhao 75b9fb28bf auto generated files 2017-11-04 11:38:57 +08:00
Kenneth Owens 5590c1fb94 gets the correct version of kubernetes client for DaemonSet and StatefulSet History and Rollback and updates test-cmd for new versions 2017-11-03 10:16:50 -07:00
Solly Ross 2c9fc43294 [client-go] Add apps.Scale support to Scale client
apps/v1betaX inadventertently contains its own variant of Scale.  In
order to support scaling Deployments, ReplicaSets, etc, we need to support
these versions of Scale as well.
2017-11-02 22:20:39 -04:00
Kubernetes Submit Queue 113ab743b8
Merge pull request #53363 from tcharding/genutils
Automatic merge from submit-queue (batch tested with PRs 52367, 53363, 54989, 54872, 54643). 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>.

cmd: genutils: remove entry from .golint_failures

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

`golint` emits warnings

```
exported function OutDir should have comment or be unexported
strings should not be capitalized or end with punctuation or a newline
```

- Add documentation comment to exported function OutDir.
- Remove newline from error string.
- Remove `hack\.golint_failures` entry for `cmd/genutils`

**Special notes for your reviewer**:
   
Don't know which sig to use?

**Release note**:

```release-note
NONE
```

/kind cleanup
2017-11-02 12:59:16 -07:00
Kubernetes Submit Queue d595003e0d
Merge pull request #54449 from smarterclayton/get_with_options
Automatic merge from submit-queue (batch tested with PRs 54895, 54449). 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>.

Update the get command to follow more conventions of commands

Pure code movement, builds on top of #54446 and only the last commit is new. Will make refactoring get easier.
2017-11-01 21:25:12 -07:00
tcharding 8739ee7bd1 cmd: genutils: remove golint_failure entry
`golint` emits warnings

```
exported function OutDir should have comment or be unexported.
strings should not be capitalized or end with punctuation or a newline
```

- Add documentation comment to exported function OutDir.
- Remove newline from error string.
- Remove `hack\.golint_failures` entry for `cmd/genutils`
2017-11-02 12:48:15 +11:00
Kubernetes Submit Queue 574492aed6
Merge pull request #53553 from bsteciuk/kubeadm-windows
Automatic merge from submit-queue. 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>.

Kubeadm - Added initial support for Windows worker nodes to join cluster using kubeadm

**What this PR does / why we need it**:
This PR adds initial support for adding a Windows worker node to a Kubernetes cluster with kubeadm.  Also adds Windows build of kubeadm to node build targets. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubeadm/issues/364 

**Special notes for your reviewer**:

Depends on #53730 

**Release note**:

```release-note
kubeadm: Add support for adding a Windows node
```
2017-11-01 14:58:58 -07:00
Bob Steciuk 44fbec29c4 Kubeadm - Added initial support for Windows worker nodes to join cluster using kubeadm
Added kubeadm to node build targets

Created unix/windows specific conditionally compiled for checks.go and defaults.go
2017-11-01 10:36:37 -04:00
Clayton Coleman d27a5a444e
Error for missing context is no longer altered 2017-10-31 23:36:15 -04:00
Kubernetes Submit Queue ed00d9c062
Merge pull request #54445 from crimsonfaith91/rem
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). 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>.

remove created-by annotation

**What this PR does / why we need it**:
This PR removes `CreatedByAnnotation`.

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

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is no longer added to controller-created objects. Use the  `metadata.ownerReferences` item that has `controller` set to `true` to determine which controller, if any, owns an object.
```
2017-10-31 20:10:21 -07:00
Shiyang Wang e6405dccf6 add apply --force --overwrite deployment lables e2e test enhance 2017-11-01 00:21:14 +08:00
Kubernetes Submit Queue ee3a08a772
Merge pull request #54001 from cblecker/sed-func
Automatic merge from submit-queue. 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>.

Extract gnu-sed detection into a function

**What this PR does / why we need it**:
Moves gnu-sed detection into a reusable function across scripts (considering it's in multiple places).

**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-10-31 03:09:46 -07:00
Kubernetes Submit Queue 81b1fa4588
Merge pull request #53796 from lichuqiang/kubectl_fix_1
Automatic merge from submit-queue. 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 print format of rootScoped resourced in kubectl

**What this PR does / why we need it**:
remove _NAMESPACE_ filed when querying rootScoped resource with kubectl

**Which issue this PR fixes**

fixes #53767

**Special notes for your reviewer**:
/cc @smarterclayton 


**Release note**:
```release-note
NONE
```
2017-10-30 13:47:56 -07:00
Jun Xiang Tee efbfead4ef remove created-by annotation 2017-10-30 12:49:44 -07:00
Kubernetes Submit Queue 12e5db561e
Merge pull request #53768 from smarterclayton/chunking_cli
Automatic merge from submit-queue. 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>.

Support api chunking in kubectl get

This enables chunking in the resource builder to make it easy to
retrieve resources in pages and visit partial result sets. This adds
`--chunk-size` to `kubectl get` only so that users can get comfortable
with the use of chunking in beta. Future changes will enable chunking
for all CLI commands so that bulk actions can be performed more
efficiently.

```
$ kubectl get pods --all-namespaces
... print batch of 500 pods ...
... print second batch of 500 pods ...
...
```

@kubernetes/sig-cli-pr-reviews @kubernetes/sig-api-machinery-pr-reviews

```release-note
`kubectl get` will by default fetch large lists of resources in chunks of up to 500 items rather than requesting all resources up front from the server. This reduces the perceived latency of managing large clusters since the server returns the first set of results to the client much more quickly.  A new flag `--chunk-size=SIZE` may be used to alter the number of items or disable this feature when `0` is passed.  This is a beta feature.
```
2017-10-29 15:59:54 -07:00
m1093782566 7c695c9b48 clean up ipvs proxy startup in local-up.sh 2017-10-28 10:37:52 +08:00
Chao Xu 88cb71c421 Add a e2e test for the admission webhook 2017-10-27 15:58:23 -07:00
Kubernetes Submit Queue 68b9fa2b89
Merge pull request #54288 from Lion-Wei/local-up-ipvs
Automatic merge from submit-queue (batch tested with PRs 54331, 54655, 54320, 54639, 54288). 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>.

local up cluster in ipvs mode by add env 'KUBEPROXY_MODE=ipvs'

**What this PR does / why we need it**:
We can use env 'KUBEPROXY_MODE=ipvs' to up cluster with kube-proxy in ipvs mode.

**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-10-27 15:42:29 -07:00
Kubernetes Submit Queue 27ef37a32d
Merge pull request #54320 from derekwaynecarr/quota-update
Automatic merge from submit-queue (batch tested with PRs 54331, 54655, 54320, 54639, 54288). 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>.

Ability to do object count quota for all namespaced resources

**What this PR does / why we need it**:
- Defines syntax for generic object count quota `count/<resource>.<group>`
- Migrates existing objects to support new syntax with old syntax
- Adds support to quota all standard namespace resources 
- Updates the controller to do discovery and replenishment on those resources
- Updates unit tests
- Tweaks admission configuration around quota
- Add e2e test for replicasets (demonstrate dynamic generic counting)

```
$  kubectl create quota test --hard=count/deployments.extensions=2,count/replicasets.extensions=4,count/pods=3,count/secrets=4
resourcequota "test" created
$ kubectl run nginx --image=nginx --replicas=2
$ kubectl describe quota
Name:                         test
Namespace:                    default
Resource                      Used  Hard
--------                      ----  ----
count/deployments.extensions  1     2
count/pods                    2     3
count/replicasets.extensions  1     4
count/secrets                 1     4
```

**Special notes for your reviewer**:
- simple object count quotas no longer require writing code
- deferring support for custom resources pending investigation about how to share caches with garbage collector.  in addition, i would like to see how this integrates with downstream quota usage in openshift.

**Release note**:
```release-note
Object count quotas supported on all standard resources using `count/<resource>.<group>` syntax
```
2017-10-27 15:42:24 -07:00
Clayton Coleman 4780ad0297
Support api chunking in kubectl get
This enables chunking in the resource builder to make it easy to
retrieve resources in pages and visit partial result sets. This adds
`--chunk-size` to `kubectl get` only so that users can get comfortable
with the use of chunking in beta. Future changes will enable chunking
for all CLI commands so that bulk actions can be performed more
efficiently.
2017-10-27 17:23:36 -04:00
Chao Xu ca8131877a remove the nesting directory webhook/webhook 2017-10-27 10:09:46 -07:00
Derek Carr a9765bcebe Update e2e and integration tests 2017-10-27 11:08:30 -04:00
fabriziopandini 65070227f5 kubeadm-doc 2017-10-27 09:57:25 +02:00
Maru Newby adc338d330 Remove all traces of federation 2017-10-26 13:37:37 -07:00
David Eads 8c1fe1f61a move webhook admission to generic apiserver 2017-10-26 07:45:49 -04:00
David Eads 86f90ecbb8 enable webhook admission in local up cluster 2017-10-26 07:45:49 -04:00
Kubernetes Submit Queue 3f5f9c3df9 Merge pull request #54600 from marun/enable-federation-vendoring
Automatic merge from submit-queue (batch tested with PRs 54081, 54271, 51783, 54600, 54594). 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>.

Update to latest kube-openapi and kazel

- update vendored kube-openapi to include https://github.com/kubernetes/kube-openapi/pull/14
 - update hash of repo infra used for bazel generation so kazel includes https://github.com/kubernetes/repo-infra/pull/48

This is the final step in enabling federation to generate openapi code for itself and vendored kube (#54335).

/sig multicluster testing
2017-10-26 02:43:51 -07:00
Kubernetes Submit Queue 75115b081d Merge pull request #53997 from tallclair/docs-owners
Automatic merge from submit-queue (batch tested with PRs 52717, 54568, 54452, 53997, 54237). 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>.

Copy api/OWNERS to docs/api-reference

So that API changes can be approved by API approvers. Also, create api-{approvers,reviewers} aliases.

Suggested by @cblecker in https://github.com/kubernetes/kubernetes/pull/53911#issuecomment-336612394
2017-10-25 23:10:37 -07:00
Maru Newby 55fcc45c7b Update kazel hash to latest 2017-10-25 21:50:06 -07:00
Dr. Stefan Schimanski 024122a9c6 import-verifier: use yaml for inline comments 2017-10-25 16:53:26 +02:00
Dr. Stefan Schimanski d51d7fd26f hack: rename verify-{staging- -> }imports.sh 2017-10-25 13:31:56 +02:00
Kubernetes Submit Queue 06776c2ab3 Merge pull request #54327 from freehan/hostname
Automatic merge from submit-queue. 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>.

Modify serve-hostname image to handle graceful termination

```release-note
NONE
```
2017-10-24 22:24:53 -07:00
Lion-Wei a6af827898 local up cluster in ipvs mode by add env 'KUBEPROXY_MODE=ipvs' 2017-10-25 09:55:31 +08:00
Kubernetes Submit Queue 2ad7d6f711 Merge pull request #54083 from juanvallejo/jvallejo/update-resource-builder-cmd-drain
Automatic merge from submit-queue. 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>.

update resource selector - kubectl drain

Followup to https://github.com/kubernetes/kubernetes/pull/52917

**Release note**:
```release-note
NONE
```

Updates resource builder in cmd/drain.go to parse resource args similar to other commands.

cc @liggitt
2017-10-24 14:16:39 -07:00
Kubernetes Submit Queue 6949b518d6 Merge pull request #54245 from deads2k/cli-03-postraw
Automatic merge from submit-queue. 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>.

add kubectl create --raw -f

Adds `--raw` to `kubectl create` to match `kubectl get --raw`.  It re-uses the transport, reads the input stream (stdin or a single file for now) and posts directly to the endpoint specified.  This let's you direct data directly at a subresource (as a for instance).  I'd like to see this extended to `kubectl replace` too, so that we have full access to subresources via scripting without having to reproduce the transports.

@kubernetes/sig-cli-pr-reviews 

```release-note
add `--raw` to `kubectl create` to POST using the normal transport
```
2017-10-23 17:16:01 -07:00
Minhan Xia dd7ad4b738 Modify serve-hostname image to handle graceful termination 2017-10-23 14:09:32 -07:00
Kubernetes Submit Queue ca8d97d673 Merge pull request #53743 from DirectXMan12/feature/polymorphic-scale-client
Automatic merge from submit-queue (batch tested with PRs 53743, 53564). 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>.

Polymorphic Scale Client

This PR introduces a polymorphic scale client based on discovery information that's able to scale scalable resources in arbitrary group-versions, as long as they present the scale subresource in their discovery information.

Currently, it supports `extensions/v1beta1.Scale` and `autoscaling/v1.Scale`, but supporting other versions of scale if/when we produce them should be fairly trivial.

It also updates the HPA to use this client, meaning the HPA will now work on any scalable resource, not just things in the `extensions/v1beta1` API group.

**Release note**:
```release-note
Introduces a polymorphic scale client, allowing HorizontalPodAutoscalers to properly function on scalable resources in any API group.
```

Unblocks #29698
Unblocks #38756
Unblocks #49504 
Fixes #38810
2017-10-23 13:39:07 -07:00
David Eads 58f39a15de add kubectl create --raw -f 2017-10-23 12:50:46 -04:00
Kubernetes Submit Queue c9151459a4 Merge pull request #52965 from CaoShuFeng/clean_time_go
Automatic merge from submit-queue. 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>.

clean up pkg/apis/meta/v1/time.go

This file has been moved to staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

**Release note**:
```
NONE
```
/assign @sttts
2017-10-21 15:42:10 -07:00
Kubernetes Submit Queue c3d47b683b Merge pull request #53031 from vishh/device-id
Automatic merge from submit-queue. 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>.

Make AllocateResponse artifacts global across all devices per container in device plugin API

The current version of Device plugins returns artifacts (env vars, mounts, devices) per device, per container. This is not necessary and results in complex merging issues on kubelet side

There can still be a conflict if the artifacts returned by device plugin conflicts with the pod spec. In that case, I'd recommend failing pods in kubelet. This is yet to be addressed.

The go package name for device plugin apis is updated from `pkg/kubelet/apis/deviceplugin/v1alpha1` to `pkg/kubelet/apis/deviceplugin/v1alpha` (sub-version dropped) because we expect the alpha version to change until it graduates to beta and changing the go package everytime the actual alpha version changes is too tedious.

```release-note
Device plugin Alpha API no longer supports returning artifacts per device as part of AllocateResponse.
```

TODO:
- [x] Bump kubelet side API version
- [X] Post an updated device plugin image that works with the new API version
- [ ] Stabilize e2es (This PR needs to be merged since there is a dependency on the plugin side for vendoring)
2017-10-19 12:43:52 -07:00
Vishnu kannan e0032af916 bump device plugin version to v1alpha2 to reflect the change to AllocateResponce API
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-10-19 10:35:24 -07:00
Solly Ross f22bfcd65a [client-go] Add fake scale client
This adds a new fake scale client (for use in testing) to match the
new polymorphic scale client.
2017-10-19 13:21:03 -04:00
Solly Ross 55e1f6a541 [make-rules] test grep should treat binary as text
The output of `go test` is passed throug a grep filter that's used when
producing junit output.  Unfortunately, when testing round-trip
conversions with random strings, grep can become convinced that the test
output is binary, and will truncate a failed test before any output is
displayed, showing "binary file (standard input) matches".

This forces grep to consider test output to be text, so that we always
see test results.
2017-10-19 13:21:03 -04:00
Solly Ross d61a2d9037 [client-go] Polymorphic Scale Client
This introduces a polymorphic scale client capable of operating against
scale subresources which return different group-versions of Scale.  The
scale subresources may be in group-versions different than the scale
itself, so that we no longer need a copy of every scalable resource in
the extensions API group.

To discovery which Scale group-versions go to which subresources,
discovery is used.

The scale client maintains its own internal versions and conversions to
several external versions, with a "hub" version that's a copy of the
autoscaling internal version.

It currently supports the following group-versions for Scale subresources:

- extensions/v1beta1.Scale
- autoscaling/v1.Scale
2017-10-19 11:01:45 -04:00
juanvallejo bb86297edf
minor test fixes; update test-cmd tests to match updated resource selector behavior 2017-10-19 10:13:20 -04:00
Kubernetes Submit Queue 9a7800f7d2 Merge pull request #52753 from munnerz/sample-controller
Automatic merge from submit-queue. 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>.

sample-controller: add example CRD controller

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

Adds a sample-controller example repository

fixes #52752

**Special notes for your reviewer**:

This is currently based on the sttts:sttts-codegen-scripts branch and should not be merged until that is (ref https://github.com/kubernetes/kubernetes/pull/52186)

**Release note**:

```
Add sample-controller repository
```

/cc @sttts @nikhita @colemickens
2017-10-19 02:32:12 -07:00