Commit Graph

48932 Commits (c2667203e44ea836a2c35509d7071f49e0ecf683)

Author SHA1 Message Date
Kubernetes Submit Queue c2667203e4 Merge pull request #45859 from DirectXMan12/refactor/protobuf-for-metrics
Automatic merge from submit-queue

Protobuf generation for k8s.io/metrics

This PR introduces protobuf generation for k8s.io/metrics.  Doing so required:

- fixing a bug in `go-to-protobuf` causing the `cast{key,value,type}` values to not be quoted when coming from struct tags (and not auto-injection by `go-to-protobuf` itself).
- Making sure the proto IDL in k8s.io/client-go had a package name of `k8s.io.client_go.xyz` and not `k8s.io.kubernetes.xyz`.

Additionally, I updated `go-to-protobuf` to skip functions and non-public types when composing the import list, which cuts down on the more bizarre imports in the IDL (like importing the sample API package in every IDL file because it contained `addToScheme`, like every other API package).

We use `castvalue` to force gogo-proto to realize that it should consider the value of the map which underlies `ResourceList` when calculating which imports need to be named.  Otherwise, it ignores the value's type, leading to compilation errors when it later can't find an import it assumed existed.  We accidentally didn't hit this in `k8s.io/kubernetes/pkg/api/v1` since another field coincidentally happens to directly use `resource.Quantity` (the value type of `ResourceList`).

**Release note**:
```release-note
NONE
```
2017-05-27 14:08:46 -07:00
Kubernetes Submit Queue a41763b2aa Merge pull request #46555 from ixdy/bazel-sandbox-tmpfs-path
Automatic merge from submit-queue

Bazel: mount tmpfs on /tmp

**What this PR does / why we need it**: our custom `go_genrule` assumes a hermetic `/tmp/` directory, but Bazel 0.5.0 just mounts the host `/tmp` read-write by default.

As a result, we can run into build failures like:
```
W0526 23:53:12.504] ERROR: /workspace/k8s.io/kubernetes/pkg/generated/openapi/BUILD:7:1: error executing shell command: 'set -e
W0526 23:53:12.504] export GOROOT=$(pwd)/external/io_bazel_rules_go_toolchain/bin/..
W0526 23:53:12.504] export GOPATH=/tmp/gopath
W0526 23:53:12.505] export GO_WORKSPACE=${GOPATH}/src/k8s.io/kubernetes
W0526 23:53:12.505] mkdir -p ${GO_WORKSPACE%/*}
W0526 23:53:12.505] ln -s $(pwd) ${GO_W...' failed: bash failed: error executing command 
W0526 23:53:12.506]   (exec env - \
W0526 23:53:12.506]   /bin/bash -c 'set -e
W0526 23:53:12.506] export GOROOT=$(pwd)/external/io_bazel_rules_go_toolchain/bin/..
W0526 23:53:12.506] export GOPATH=/tmp/gopath
W0526 23:53:12.506] export GO_WORKSPACE=${GOPATH}/src/k8s.io/kubernetes
W0526 23:53:12.507] mkdir -p ${GO_WORKSPACE%/*}
W0526 23:53:12.507] ln -s $(pwd) ${GO_WORKSPACE}
W0526 23:53:12.507] export GENGOPATH=/tmp/gengopath
W0526 23:53:12.508] export GENGO_WORKSPACE=${GENGOPATH}/src/k8s.io/kubernetes
W0526 23:53:12.508] mkdir -p ${GENGO_WORKSPACE%/*}
W0526 23:53:12.508] ln -s $(pwd)/bazel-out/local-fastbuild/genfiles ${GENGO_WORKSPACE}
W0526 23:53:12.508] export GOPATH=${GOPATH}:${GENGOPATH}
W0526 23:53:12.508] cd ${GO_WORKSPACE}
W0526 23:53:12.510] bazel-out/host/bin/cmd/libs/go2idl/openapi-gen/openapi-gen --v 1 --logtostderr --go-header-file hack/boilerplate/boilerplate.go.txt --output-file-base zz_generated.openapi --output-package k8s.io/kubernetes/pkg/generated/openapi --input-dirs k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1,k8s.io/kubernetes/federation/apis/federation/v1beta1,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/admission/v1alpha1,k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication/v1,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization/v1,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/settings/v1alpha1,k8s.io/kubernetes/pkg/apis/storage/v1,k8s.io/kubernetes/pkg/apis/storage/v1beta1,k8s.io/kubernetes/pkg/version,k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource,k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1,k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime,k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr,k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/version,k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1,k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/example/v1,k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/api/v1,k8s.io/kubernetes/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1alpha1,k8s.io/kubernetes/vendor/k8s.io/metrics/pkg/apis/metrics/v1alpha1 && cp pkg/generated/openapi/zz_generated.openapi.go bazel-out/local-fastbuild/genfiles/pkg/generated/openapi')
```

By specifying this flag, we can restore the old behavior.
/assign @mikedanese @spxtr 

**Release note**:

```release-note
NONE
```
2017-05-27 13:14:45 -07:00
Kubernetes Submit Queue f219f3c153 Merge pull request #46558 from MrHohn/esipp-endpoint-waittime
Automatic merge from submit-queue

Apply KubeProxyEndpointLagTimeout to ESIPP tests

Fixes #46533.

The previous construction of ESIPP tests is weird, so I redo it a bit.

A 30 seconds `KubeProxyEndpointLagTimeout` is introduced, as these tests ain't verifying performance, may be better to not make it too tight.

/assign @thockin 

**Release note**:

```release-note
NONE
```
2017-05-27 11:17:51 -07:00
Kubernetes Submit Queue fc618eb4f1 Merge pull request #46496 from carlory/fix
Automatic merge from submit-queue

fix typo in build.sh

**What this PR does / why we need it**:
fix typo in build.sh
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE
**Special notes for your reviewer**:
NONE
**Release note**:

```release-note
NONE
```
2017-05-27 08:30:40 -07:00
Solly Ross 8d03536d00 Regenerate protobuf and client-go
This commit regenerates the protobuf as per the recent generation
changes (removing erroneous imports, adding k8s.io/metrics), and
syncs the changes to client-go (which also ensures that client-go
protobuf IDL has the correct package names).
2017-05-27 00:37:49 -04:00
Kubernetes Submit Queue b58c7ec456 Merge pull request #46554 from thockin/kubelet-masq-flag
Automatic merge from submit-queue (batch tested with PRs 46302, 44597, 44742, 46554)

Do not install do-nothing iptables rules

Deprecate kubelet non-masquerade-cidr.
Do not install iptables rules if it is set to 0.0.0.0/0.

Fixes #46553
2017-05-26 20:39:58 -07:00
Kubernetes Submit Queue fdb4fa689e Merge pull request #44742 from cheftako/aggregate
Automatic merge from submit-queue (batch tested with PRs 46302, 44597, 44742, 46554)

Change to aggregator so it calls a user apiservice via its pod IP.

proxy_handler now does a sideways call to lookup the pod IPs for aservice.
It will then pick a random pod IP to forward the use apiserver request to.

**What this PR does / why we need it**: It allows the aggregator to work without setting up the full network stack on the kube master (i.e. with kube-dns or kube-proxy)

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-26 20:39:56 -07:00
Kubernetes Submit Queue 6927e7061b Merge pull request #44597 from mengqiy/replacekeys
Automatic merge from submit-queue (batch tested with PRs 46302, 44597, 44742, 46554)

support replaceKeys patch strategy

Implementing according to [this proposal](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/add-new-patchStrategy-to-clear-fields-not-present-in-patch.md).
The revision is in kubernetes/community#620.

```release-note
support replaceKeys patch strategy and directive for strategic merge patch
```
2017-05-26 20:39:54 -07:00
Kubernetes Submit Queue 94312a0ca7 Merge pull request #46302 from caesarxuchao/acc-configuration-manager
Automatic merge from submit-queue

Configuration manager for dynamic admission control registration

Implementing this [section](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-admission-control-configuration.md#synchronization-of-admission-control-configurations) of https://github.com/kubernetes/community/pull/611

Adding a configuration manager that reads the ExternalAdmissionHookConfigurations and InitializerConfigurations periodically, and returns the merged configuration.

cc @smarterclayton @whitlockjc
2017-05-26 20:34:07 -07:00
Kubernetes Submit Queue bf60e7e286 Merge pull request #46522 from MrHohn/fix-proxy-healthz
Automatic merge from submit-queue (batch tested with PRs 46252, 45524, 46236, 46277, 46522)

Add /healthz back to kube-proxy metrics server

Fixes #46447.

/healthz is removed from kube-proxy metrics server by #44968 and that breaks our upgrade test, which run 1.6 tests on 1.7 cluster. It seems harmless to continue holding /healthz on metrics server as well, so that we won't break other potential users.

/assign @bowei 
cc @dchen1107 

**Release note**:

```release-note
NONE
```
2017-05-26 19:48:04 -07:00
Kubernetes Submit Queue 1720e20059 Merge pull request #46277 from zjj2wry/credentials
Automatic merge from submit-queue (batch tested with PRs 46252, 45524, 46236, 46277, 46522)

add test in create authinfo

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-26 19:48:01 -07:00
Kubernetes Submit Queue 761a75218c Merge pull request #46236 from abgworrall/abw-45738
Automatic merge from submit-queue (batch tested with PRs 46252, 45524, 46236, 46277, 46522)

Support sandbox images from private registries

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

The --pod-infra-container-image parameter allows the user to specify
an arbitrary image to be used as the pod infra container (AKA
sandbox), an internal piece of the dockershim implementation of the
Container Runtime Interface.

The dockershim does not have access to any of the pod-level image pull
credentials configuration, so if the user specifies an image from a
private registry, the image pull will fail.

This change allows the dockershim to read local docker configuration
(e.g. /root/.docker/config.json) and use it when pulling the pod infra
container image.

**Which issue this PR fixes**: fixes #45738

**Special notes for your reviewer**:
The changes to fake_client for writing local config files deserve some
attention.

**Release note**:

```release-note
NONE
```
2017-05-26 19:47:59 -07:00
Kubernetes Submit Queue daee6d4826 Merge pull request #45524 from MrHohn/l4-lb-healthcheck
Automatic merge from submit-queue (batch tested with PRs 46252, 45524, 46236, 46277, 46522)

Make GCE load-balancers create health checks for nodes

From #14661. Proposal on kubernetes/community#552. Fixes #46313.

Bullet points:
- Create nodes health check and firewall (for health checking) for non-OnlyLocal service.
- Create local traffic health check and firewall (for health checking) for OnlyLocal service.
- Version skew: 
   - Don't create nodes health check if any nodes has version < 1.7.0.
   - Don't backfill nodes health check on existing LBs unless users explicitly trigger it.

**Release note**:

```release-note
GCE Cloud Provider: New created LoadBalancer type Service now have health checks for nodes by default.
An existing LoadBalancer will have health check attached to it when:
- Change Service.Spec.Type from LoadBalancer to others and flip it back.
- Any effective change on Service.Spec.ExternalTrafficPolicy.
```
2017-05-26 19:47:57 -07:00
Kubernetes Submit Queue f8c90e04cd Merge pull request #46252 from perotinus/cs
Automatic merge from submit-queue (batch tested with PRs 46252, 45524, 46236, 46277, 46522)

[Federation] Refactor the cluster selection logic in the sync controller

This is intended to make it easier to define the interaction between cluster selection and scheduling preferences in the sync controller when used for workload types.

**Release note**:

```release-note
NONE
```
2017-05-26 19:47:56 -07:00
Kubernetes Submit Queue ef1febf789 Merge pull request #46367 from bobveznat/master
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

Move MountVolume.SetUp succeeded to debug level

This message is verbose and repeated over and over again in log files
creating a lot of noise. Leave the message in, but require a -v in
order to actually log it.

**What this PR does / why we need it**: Moves a verbose log message to actually be verbose.

**Which issue this PR fixes** fixes #46364
Fixes #29059
2017-05-26 18:49:04 -07:00
Kubernetes Submit Queue b30ed6d7b8 Merge pull request #46019 from YuPengZTE/devAnalysePods
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

check err

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



**What this PR does / why we need it**:
When the err in not nil, the podStatus is nil, it is dangerous "podStatus[cluster.Name].RunningAndReady".
**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
```
2017-05-26 18:49:02 -07:00
Kubernetes Submit Queue 63857a35ba Merge pull request #46453 from emaildanwilson/fedClusterSelectorIngress
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

Add ClusterSelector to Ingress Controller

This pull request adds ClusterSelector to the Federated Ingress Controller ref: design #29887 
This back ports the same functionality from the sync controller (merged pull #40234) in order to make this feature available across all Controllers for the 1.7 release.

cc: @kubernetes/sig-federation-pr-reviews @shashidharatd

**Release note**:
```
The annotation `federation.alpha.kubernetes.io/cluster-selector` can be used with Ingress objects to target federated clusters by label.
```
2017-05-26 18:49:00 -07:00
Kubernetes Submit Queue 72a398240c Merge pull request #46272 from zjj2wry/selector
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

add test for set selector

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-26 18:48:58 -07:00
Kubernetes Submit Queue 25dc892a97 Merge pull request #46450 from MrHohn/fix-proxy-healthcheck-nilpointer
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

Fix potential nil pointer dereference for kube-proxy healthcheck

Found error log from https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubernetes-e2e-gce-slow/5222:
```
I0524 20:22:35.554156       7 healthcheck.go:226] Not saving endpoints for unknown healthcheck "kube-system/kubernetes-dashboard"
I0524 20:22:35.554172       7 proxier.go:923] syncProxyRules took 40.047209ms
I0524 20:22:35.554218       7 healthcheck.go:175] Healthcheck "e2e-tests-esipp-f7djn/external-local" closed: accept tcp [::]:32027: use of closed network connection
I0524 20:22:37.416133       7 logs.go:41] http: panic serving 169.254.169.254:49216: runtime error: invalid memory address or nil pointer dereference
goroutine 1623 [running]:
net/http.(*conn).serve.func1(0xc420b27220)
	/usr/local/go_k8s_patched/src/net/http/server.go:1721 +0xd0
panic(0x1c07e40, 0x2b11ee0)
	/usr/local/go_k8s_patched/src/runtime/panic.go:489 +0x2cf
k8s.io/kubernetes/pkg/proxy/healthcheck.hcHandler.ServeHTTP(0xc4201aea60, 0x15, 0xc4203233a0, 0xe, 0xc4203aa280, 0x2ab51a0, 0xc420ae4d20, 0xc4202e7a00)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/proxy/healthcheck/healthcheck.go:200 +0x86
k8s.io/kubernetes/pkg/proxy/healthcheck.(*hcHandler).ServeHTTP(0xc420798390, 0x2ab51a0, 0xc420ae4d20, 0xc4202e7a00)
	<autogenerated>:8 +0x87
net/http.serverHandler.ServeHTTP(0xc4208d0210, 0x2ab51a0, 0xc420ae4d20, 0xc4202e7a00)
	/usr/local/go_k8s_patched/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc420b27220, 0x2ab66e0, 0xc420945380)
	/usr/local/go_k8s_patched/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go_k8s_patched/src/net/http/server.go:2668 +0x2ce
```

So seems like it's possible healthcheck server is still serving traffic after service entry is removed.

/assign @freehan 

**Release note**:

```release-note
NONE
```
2017-05-26 18:48:56 -07:00
Zihong Zheng e332828690 Apply KubeProxyEndpointLagTimeout to ESIPP tests 2017-05-26 18:14:20 -07:00
Kubernetes Submit Queue 58e98cfc25 Merge pull request #46545 from nicksardo/gce-reviewers
Automatic merge from submit-queue

Add reviewers for GCE cloud provider

**Release note**:
```release-note
NONE
```
2017-05-26 17:43:11 -07:00
Kubernetes Submit Queue 1c15d1c20d Merge pull request #46485 from zjj2wry/spark
Automatic merge from submit-queue

Fix  spelling in example/spark

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-26 17:43:03 -07:00
Jeff Grafton 122499621b Bazel: mount tmpfs on /tmp 2017-05-26 17:02:18 -07:00
Tim Hockin 252646b8de Deprecate kubelet non-masquerade-cidr
Also do not install iptables rules if it is set to 0.0.0.0/0
2017-05-26 17:01:58 -07:00
Solly Ross d72cbcb339 [k8s.io/metrics] proto tags for metrics/v1alpha1
This commit adds proto tags to
`k8s.io/metrics/pkg/apis/metrics/v1alpha1`.  The tags are more-or-less
what's suggested by `go-to-protobuf`, with the exception of the use of
`castvalue`.

`castvalue` is used to force gogo-proto to realize that the value of
`ResourceList` (which is `map[ResourceName]Quantity`) is actually a type
that it should consider when recording which packages are used.
Otherwise, it ignores the type, using an unnamed import for the
`k8s.io/apimachinery/pkg/api/resource`, which causes compilation errors.
2017-05-26 19:59:27 -04:00
Solly Ross 85c3ca1013 [go-to-protobuf] Quote tag cast{key,value,type}
When using a `cast{key,value,type}` that was injected via struct tag, we
need to make sure to quote the value when transfering it over to proto
tags.  Otherwise, it'll come through as unquoted, resulting in invalid
proto.

This was previously not a problem, since all values of `castkey` and
`casttype` were actually coming from the auto-injecting code which deals
with maps and aliases, which does correctly quote values.
2017-05-26 19:59:27 -04:00
Solly Ross 7b8e572d8a [go-to-protobuf] generate proto for k8s.io/metrics
This commit adds the `k8s.io/metrics` APIs to the list of packages for
which to generate protobuf.  Additionally, it adds
`k8s.io/client-go/pkg/apis/v1` as a non-generated (referenced) package.
2017-05-26 19:59:27 -04:00
Kubernetes Submit Queue e903c58c9e Merge pull request #45614 from yujuhong/container-metrics
Automatic merge from submit-queue (batch tested with PRs 45809, 46515, 46484, 46516, 45614)

CRI: add methods for container stats

**What this PR does / why we need it**:
Define methods in CRI to get container stats.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
Part of  https://github.com/kubernetes/features/issues/290; addresses #27097

**Special notes for your reviewer**:
This PR defines the *minimum required* container metrics for the existing components to function, loosely based on the previous discussion on [core metrics](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/core-metrics-pipeline.md) as well as the existing cadvisor/summary APIs.
 
Two new RPC calls are added to the RuntimeService: `ContainerStats` and `ListContainerStats`. The former retrieves stats for a given container, while the latter gets stats for all containers in one call.
 
The stats gathering time of each subsystem can vary substantially (e.g., cpu vs. disk), so even though the on-demand model preferred due to its simplicity, we’d rather give the container runtime more flexibility to determine the collection frequency for each subsystem*. As a trade-off, each piece of stats for the subsystem must contain a timestamp to let kubelet know how fresh/recent the stats are. In the future, we should also recommend a guideline for how recent the stats should be in order to ensure the reliability (e.g., eviction) and the responsiveness (e.g., autoscaling) of the kubernetes cluster.
 
The next step is to plumb this through kubelet so that kubelet can choose consume container stats from CRI or cadvisor. 
 
**Alternatively, we can add calls to get stats of individual subsystems. However, kubelet does not have the complete knowledge of the runtime environment, so this would only lead to unnecessary complexity in kubelet.*


**Release note**:

```release-note
Augment CRI to support retrieving container stats from the runtime.
```
2017-05-26 16:59:08 -07:00
Solly Ross 64b5124595 [update-staging] convert package name in IDL
This commit converts the package names in the proto IDL in client-go.
This allows third parties (and repositories in staging) who make use of
types in client-go to generate proto IDL themselves properly.
2017-05-26 19:59:06 -04:00
Kubernetes Submit Queue 71e0204f6a Merge pull request #46516 from derekwaynecarr/kubelet-neg-allocatable
Automatic merge from submit-queue (batch tested with PRs 45809, 46515, 46484, 46516, 45614)

kubelet was sending negative allocatable values

**What this PR does / why we need it**:
if you set reservations > node capacity, the node sent negative values for allocatable values on create.  setting negative values on update is rejected.

**Which issue this PR fixes**
xref https://bugzilla.redhat.com/show_bug.cgi?id=1455420

**Special notes for your reviewer**:
at this time, the node is allowed to set status on create.  without this change, a node was being registered with negative allocatable values.  i think we need to revisit letting node set status on create, and i will send a separate pr to debate the merits of that point.

```release-note
Prevent kubelet from setting allocatable < 0 for a resource upon initial creation.
```
2017-05-26 16:59:06 -07:00
Solly Ross fb40658f9d [go-to-protobuf] Skip private types and functions
Since go-to-protobuf doesn't care about functions or private types (only
public types), we can skip them.  This helps to clean up the generated
IDL: previously, the IDL contained erroneous imports due to matching
functions and private types which were not actually converted to protobuf,
but which were the same as functions and private types in other packages.
2017-05-26 19:59:06 -04:00
Kubernetes Submit Queue 2b084af6dd Merge pull request #46484 from guoyunxian/remove
Automatic merge from submit-queue (batch tested with PRs 45809, 46515, 46484, 46516, 45614)

Remove the reduplicated case judement

This patch remove the  reduplicated case judgement
2017-05-26 16:59:04 -07:00
Kubernetes Submit Queue bd1311a0a4 Merge pull request #46515 from ncdc/vet
Automatic merge from submit-queue (batch tested with PRs 45809, 46515, 46484, 46516, 45614)

Fix incorrect printf format

**What this PR does / why we need it**: changes `%s` to `%d` for something that is actually an `int` (found via `make vet`).

**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-05-26 16:59:02 -07:00
Kubernetes Submit Queue 899b6c00ba Merge pull request #45809 from CaoShuFeng/non-resource-url-create-rolebinding
Automatic merge from submit-queue

support NonResourceURL for kubectl create clusterrole

Release note:
```release-note
add --non-resource-url to kubectl create clusterrole
```
2017-05-26 16:47:06 -07:00
Nick Sardo 5b00c38fd9 Add approvers for GCE cloud provider 2017-05-26 16:42:20 -07:00
Walter Fender ad8a83a7c1 Change to aggregator so it calls a user apiservice via its pod IP.
proxy_handler now uses the endpoint router to map the cluster IP to
appropriate endpoint (Pod) IP for the given resource.
Added code to allow aggregator routing to be optional.
Updated bazel build.
Fixes to cover JLiggit comments.
Added util ResourceLocation method based on Listers.
Fixed issues from verification steps.
Updated to add an interface to obfuscate some of the routing logic.
Collapsed cluster IP resolution in to the aggregator routing
implementation.
Added 2 simple unit tests for ResolveEndpoint
2017-05-26 16:10:01 -07:00
Chao Xu dce3f69b20 generated 2017-05-26 16:06:12 -07:00
Kubernetes Submit Queue 6d6413175f Merge pull request #46417 from resouer/fix-digest-nit
Automatic merge from submit-queue (batch tested with PRs 42256, 46479, 45436, 46440, 46417)

Log out digest when digest is invalid

Notice this in frakti: missing image ref when logging it out.

**Release note**:

```release-note
NONE
```
2017-05-26 15:59:05 -07:00
Kubernetes Submit Queue 3be6879bde Merge pull request #46440 from deads2k/crd-03-invert
Automatic merge from submit-queue (batch tested with PRs 42256, 46479, 45436, 46440, 46417)

move CRD behind TPR

Second attempt at https://github.com/kubernetes/kubernetes/pull/46297

@liggitt since @sttts is out can you take a look and hopefully find me a different, more sane way to do this? It's a little crazy, but I left a large comment explaining why I think its the only way.
2017-05-26 15:59:03 -07:00
Kubernetes Submit Queue 09a2b6b7d1 Merge pull request #45436 from verb/nit-kubelet-featuregate-template
Automatic merge from submit-queue (batch tested with PRs 42256, 46479, 45436, 46440, 46417)

Fix features template comment to match current usage

**What this PR does / why we need it**: Corrects a comment in pkg/features

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-26 15:59:01 -07:00
Kubernetes Submit Queue 55e2bfde0e Merge pull request #46479 from zjj2wry/cm
Automatic merge from submit-queue (batch tested with PRs 42256, 46479, 45436, 46440, 46417)

Fix naming and comments in Container Manage

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-26 15:59:00 -07:00
Kubernetes Submit Queue f3406bfe16 Merge pull request #42256 from shiywang/edit
Automatic merge from submit-queue (batch tested with PRs 42256, 46479, 45436, 46440, 46417)

Add `kubectl apply edit-last-applied` subcommand

third command of https://github.com/kubernetes/community/pull/287
Fixes https://github.com/kubernetes/kubernetes/issues/44905
@pwittrock @AdoHe @ymqytw @kubernetes/sig-cli-feature-requests could you guys have an early review ? cause some of feature I'm not sure about, will add unit tests if you think it's ok.
2017-05-26 15:58:57 -07:00
Chao Xu d7c1a92e0c the configuration manager 2017-05-26 15:11:53 -07:00
ymqytw 16e07c7d55 Support replaceKeys patch strategy and directive 2017-05-26 15:05:38 -07:00
Kubernetes Submit Queue 9f3a3e3c88 Merge pull request #46534 from mengqiy/addSMPOwner
Automatic merge from submit-queue

add owners file for strategic merge patch

`staging/src/k8s.io/apimachinery/pkg/util/strategicpatch` is the strategic merge patch pkg
`staging/src/k8s.io/apimachinery/pkg/util/mergepatch` is the util pkg for strategic merge patch and json merge patch
`staging/src/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS` is another util pkg used by strategic merge patch

cc: @pwittrock @grodrigues3 @apelisse
2017-05-26 14:46:10 -07:00
Zihong Zheng 897da549bc Autogenerated files 2017-05-26 13:19:14 -07:00
Zihong Zheng a61cc7f477 Update firewall e2e test for LB healthcheck firewall 2017-05-26 13:18:50 -07:00
Zihong Zheng b4633b0600 Create nodes health checks for non-OnlyLocal services 2017-05-26 13:18:50 -07:00
Kubernetes Submit Queue 7bc6da0b77 Merge pull request #46294 from caesarxuchao/dynamic-registration-prototype
Automatic merge from submit-queue (batch tested with PRs 46383, 45645, 45923, 44884, 46294)

Dynamic registration prototype

Implementing the api proposed in https://github.com/kubernetes/community/pull/611.
Wiring the code to serve the api via apiserver.
```release-note
Adding admissionregistration API group which enables dynamic registration of initializers and external admission webhooks. It is an alpha feature.
```
2017-05-26 12:58:07 -07:00
Kubernetes Submit Queue f8cfeef174 Merge pull request #44884 from verult/master
Automatic merge from submit-queue (batch tested with PRs 46383, 45645, 45923, 44884, 46294)

Created unit tests for GCE cloud provider storage interface.

- Currently covers CreateDisk and DeleteDisk, GetAutoLabelsForPD
- Created ServiceManager interface in gce.go to facilitate mocking in tests.



**What this PR does / why we need it**:
Increasing test coverage for GCE Persistent Disk.

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

**Release note**:

```release-note
NONE
```
2017-05-26 12:58:05 -07:00