Commit Graph

40957 Commits (0c669fe6cc48208ebcdd43fa2ff425fce3c359a0)

Author SHA1 Message Date
Kubernetes Submit Queue 8ccecf93aa Merge pull request #38520 from ixdy/clean-no-docker
Automatic merge from submit-queue

Don't require docker or other tools when running `make clean`

**What this PR does / why we need it**: we don't require `docker` for a local build, so we shouldn't require it for `make clean` either.

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

cc @sebgoa
2016-12-10 15:48:30 -08:00
Clayton Coleman 42e0eda3e4
Sorting printer changed 2016-12-10 18:07:33 -05:00
Clayton Coleman d06be8dc1f
refactor: update swagger specs 2016-12-10 18:05:57 -05:00
Clayton Coleman 9ff68e6667
generated: staging update 2016-12-10 18:05:56 -05:00
Clayton Coleman c52d510a24
refactor: generated 2016-12-10 18:05:53 -05:00
Clayton Coleman 596d9de8fa
update: linted packages 2016-12-10 18:05:37 -05:00
Clayton Coleman 38127a4e7e
Update disruption test 2016-12-10 18:05:37 -05:00
Clayton Coleman 81adce5a3a
Handle sudo cleanly with tmp dir in generation
Also ensure meta/v1 swagger docs are generated.
2016-12-10 18:05:37 -05:00
Clayton Coleman 3c72ee2189
Change references to OwnerReference 2016-12-10 18:05:36 -05:00
Clayton Coleman da521d3768
Remove pkg/api* OwnerReference 2016-12-10 18:05:35 -05:00
Clayton Coleman 7700d38e47
Create a stub metatypes package for backwards compatibility 2016-12-10 18:05:28 -05:00
Clayton Coleman 42d410fdde
Switch to use pkg/apis/meta/v1/unstructured and the new interfaces
Avoid directly accessing an unstructured type if it is not required.
2016-12-10 18:05:28 -05:00
Clayton Coleman c30862a488
Move OwnerReference to pkg/apis/meta/v1 and remove metatypes pkg
OwnerReference is common.
2016-12-10 18:05:28 -05:00
Clayton Coleman 8eb3e9a518
Move unstructured to its own package under v1
It is a versioned type.
2016-12-10 18:05:24 -05:00
Kubernetes Submit Queue bda57b8fb6 Merge pull request #31353 from juanvallejo/jvallejo_fix-duplicate-errors-kubectl-set-env
Automatic merge from submit-queue

fix duplicate validation/field/errors

**Release note**:

``` release-note
release-note-none
```

Related PR: https://github.com/kubernetes/kubernetes/pull/30313

PR #30313 fixed duplicate errors for invalid aggregate errors in
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/util/helpers.go

However, duplicate aggregate errors that went through
https://github.com/kubernetes/kubernetes/blob/master/pkg/util/validation/field/errors.go
were not affected by that patch.

This patch adds duplicate aggregate error checking to
`pkg/util/validation/field/errors.go`
##### Before

`$ kubectl set env rc/idling-echo-1 test-abc=1234`

```
error: ReplicationController "idling-echo-1" is invalid:
[spec.template.spec.containers[0].env[0].name: Invalid value:
"test-abc": must be a C identifier (matching regex
[A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName",
spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc":
must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g.
"my_name" or "MyName", spec.template.spec.containers[0].env[0].name:
Invalid value: "test-abc": must be a C identifier (matching regex
[A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName",
spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc":
must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g.
"my_name" or "MyName"]
```

`$ kubectl set env rc/node-1 test-abc=1234`

```
error: ReplicationController "idling-echo-1" is invalid:
[spec.template.spec.containers[0].env[0].name: Invalid value:
"test-abc": must be a C identifier (matching regex
[A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName",
spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc":
must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g.
"my_name" or "MyName"]
```
##### After

`$ kubectl set env rc/idling-echo-1 test-abc=1234`

```
error: ReplicationController "idling-echo-1" is invalid:
[spec.template.spec.containers[0].env[0].name: Invalid value:
"test-abc": must be a C identifier (matching regex
[A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName",
spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc":
must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g.
"my_name" or "MyName"]
```

`$ kubectl set env rc/node-1 test-abc=1234`

```
error: ReplicationController "node-1" is invalid:
spec.template.spec.containers[0].env[0].name: Invalid value: "test-abc":
must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g.
"my_name" or "MyName"
```
2016-12-10 14:57:43 -08:00
Kubernetes Submit Queue e732ee70f4 Merge pull request #38406 from liggitt/remove-internal-json-annotations
Automatic merge from submit-queue

Remove json serialization annotations from internal types

fixes #3933

Internal types should never be serialized, and including json serialization tags on them makes it possible to accidentally do that without realizing it.

fixes in this PR:

* types
  * [x] remove json tags from internal types
  * [x] fix references from serialized types to internal ObjectMeta
* generation
  * [x] remove generated json codecs for internal types (they should never be used)
* kubectl
  * [x] fix `apply` to operate on versioned object
  * [x] fix sorting by field to operate on versioned object
  * [x] fix `--record` to build annotation patch using versioned object
* hpa
  * [x] fix unmarshaling to internal CustomMetricTargetList in validation
* thirdpartyresources
  * [x] fix encoding API responses using internal ObjectMeta
* tests
  * [x] fix tests to use versioned objects when checking encoded content
  * [x] fix tests passing internal objects to generic printers

follow ups (will open tracking issues or additional PRs):
- [ ] remove json tags from internal kubeconfig types (`kubectl config set` pathfinding needs to work against external type)
- [ ] HPA should version CustomMetricTargetList serialization in annotations
- [ ] revisit how TPR resthandlers encoding objects
- [ ] audit and add tests for printer use (human-readable printer requires internal versions, generic printers require external versions)
- [ ] add static analysis tests preventing new internal types from adding tags
- [ ] add static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- [ ] add more tests for `kubectl get` exercising known and unknown types with all output options
2016-12-10 14:00:17 -08:00
Morgan Jones f82e872a25 Remove Azure Subnet RouteTable check 2016-12-10 21:26:15 +00:00
Kubernetes Submit Queue 818f6193fb Merge pull request #31678 from anguslees/instances-list-die-die-die
Automatic merge from submit-queue

providers: Remove long-deprecated Instances.List()
2016-12-10 10:59:57 -08:00
Marek Grabowski 9716d54ace Merge pull request #38565 from luxas/fix_crossbuild3
Fix the cross-build
2016-12-10 19:38:01 +01:00
Lucas Käldström afefb19ac4 Fix the cross-build 2016-12-10 16:26:21 +02:00
Angus Lees 8a7e103191 providers: Remove long-deprecated Instances.List()
This method has been unused by k8s for some time, and yet is the last
piece of the cloud provider API that encourages provider names to be
human-friendly strings (this method applies a regex to instance names).

Actually removing this deprecated method is part of a long effort to
migrate from instance names to instance IDs in at least the OpenStack
provider plugin.
2016-12-10 22:36:12 +11:00
aaronxu e010435961 unify newline format for benchmark-go.sh 2016-12-10 01:15:30 -08:00
Kubernetes Submit Queue 025c57e62b Merge pull request #37783 from brendandburns/acr
Automatic merge from submit-queue

Add support for Azure Container Registry, update Azure dependencies

@colemickens
2016-12-09 23:52:41 -08:00
Jess Frazelle 1286601c33
Update CHANGELOG.md for v1.4.7. 2016-12-09 21:21:59 -08:00
Jordan Liggitt d8b2799f88
Remove inert incorrect groupName comment for apps API group 2016-12-09 22:19:55 -05:00
Kubernetes Submit Queue 591a0b1e04 Merge pull request #38423 from vmware/panicAttackvmwarerelease-master
Automatic merge from submit-queue (batch tested with PRs 34002, 38535, 37330, 38522, 38423)

Fix panic in vSphere cloud provider

Currently vSphere Cloud Provider triggers panic in controller-manager pod kubernetes. This is because it queries for the cluster name from the VC. We have eliminated that code from the vSphere cloud provider. 

Fixes #36295
2016-12-09 18:21:47 -08:00
Kubernetes Submit Queue 4e7dc587f6 Merge pull request #38522 from Random-Liu/add-default-node-e2e-filter
Automatic merge from submit-queue (batch tested with PRs 34002, 38535, 37330, 38522, 38423)

Node E2E: `make test-e2e-node` runs the same test with pr builder by default.

This PR makes `make test-e2e-node` run non-serial, non-flaky, non-slow test by default.
This will make it easier to use.

/cc @timstclair
2016-12-09 18:21:45 -08:00
Kubernetes Submit Queue f26fc760a0 Merge pull request #37330 from janetkuo/stateful-e2e-rename-pet
Automatic merge from submit-queue (batch tested with PRs 34002, 38535, 37330, 38522, 38423)

Rename pet to stateful pods in statefulset e2e tests logs

Follow up https://github.com/kubernetes/kubernetes/pull/37243#discussion_r89193790

Note that only mentions of pet in logs are renamed, but not variable name, or file name / import path 

@foxish 

```release-note
NONE
```
2016-12-09 18:21:43 -08:00
Kubernetes Submit Queue 161c01a741 Merge pull request #38535 from caesarxuchao/precommit
Automatic merge from submit-queue

Remove hack/verify-munge-docs.sh from pre-commit hooks

Follow up of #38309
2016-12-09 17:50:38 -08:00
Kubernetes Submit Queue c2aaac9178 Merge pull request #34002 from xiaoping378/fix-broken-cluster/centos4
Automatic merge from submit-queue

fix broken cluster/centos and enhance the style

replace the PR #33818
2016-12-09 17:50:30 -08:00
ymqytw b6cfa9aa98 warn user if they try to apply on an object without the annotation 2016-12-09 17:29:31 -08:00
Random-Liu 486ddae35a `make test-e2e-node` runs the same test with pr builder by default. 2016-12-09 16:06:18 -08:00
juanvallejo 7410acf4ab
Prevent "patched" output on obj not patched
This patch compares an original object against a patched object returned
from the server and only announces that the object was successfully
patched if the object returned from the server does not equal the
original object.
2016-12-09 19:01:27 -05:00
Janet Kuo 0e2b0a6f55 Rename pet to stateful pods in statefulset e2e tests logs 2016-12-09 16:01:13 -08:00
Kubernetes Submit Queue f7e3668867 Merge pull request #37611 from yarntime/fix_typo_in_pet_set
Automatic merge from submit-queue

fix typo in pet_set

fix typo in pet_set.
2016-12-09 15:38:19 -08:00
Chao Xu 15d0984b93 remove hack/verify-munge-docs.sh from pre-commit hooks 2016-12-09 15:17:18 -08:00
Kubernetes Submit Queue beb895f2cd Merge pull request #38519 from dims/fix-url-parse-in-golang-1.8
Automatic merge from submit-queue (batch tested with PRs 37677, 38519)

Better deal with failures under golang 1.8beta1

If there is any error in the initial parsing then we should just
try adding the scheme.

url.Parse(base) has changed in 1.8. Please see the following change
c5ccbdd22b

Fixes #38380
2016-12-09 15:03:10 -08:00
Kubernetes Submit Queue fe9c4d69a7 Merge pull request #37677 from wojtek-t/fix_hanging_cacher_2
Automatic merge from submit-queue

Proper fix for non-receiving watchers

Follow up on #37195
2016-12-09 14:54:47 -08:00
Kubernetes Submit Queue b72c006eb3 Merge pull request #34554 from derekwaynecarr/quota-storage-class
Automatic merge from submit-queue (batch tested with PRs 37270, 38309, 37568, 34554)

Ability to quota storage by storage class

Adds the ability to quota storage by storage class.
1. `<storage-class>.storageclass.storage.k8s.io/persistentvolumeclaims` - quota the number of claims with a specific storage class
2. `<storage-class>.storageclass.storage.k8s.io/requests.storage` - quota the cumulative request for storage in a particular storage class.

For example:

```
$ cat quota.yaml
apiVersion: v1
kind: ResourceQuota
metadata:
  name: storage-quota
spec:
  hard:
    requests.storage: 100Gi
    persistentvolumeclaims: 100
    gold.storageclass.storage.k8s.io/requests.storage: 50Gi
    gold.storageclass.storage.k8s.io/persistentvolumeclaims: 5
    silver.storageclass.storage.k8s.io/requests.storage: 75Gi
    silver.storageclass.storage.k8s.io/persistentvolumeclaims: 10
    bronze.storageclass.storage.k8s.io.kubernetes.io/requests.storage: 100Gi
    bronze.storageclass.storage.k8s.io/persistentvolumeclaims: 15
$ kubectl create -f quota.yaml
$ cat pvc-bronze.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  generateName: pvc-bronze-
  annotations:
    volume.beta.kubernetes.io/storage-class: "bronze"
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 8Gi
$ kubectl create -f pvc-bronze.yaml
$ kubectl get quota storage-quota -o yaml
apiVersion: v1
kind: ResourceQuota
...
status:
  hard:
    bronze.storageclass.storage.k8s.io/persistentvolumeclaims: "15"
    bronze.storageclass.storage.k8s.io/requests.storage: 100Gi
    gold.storageclass.storage.k8s.io/persistentvolumeclaims: "5"
    gold.storageclass.storage.k8s.io/requests.storage: 50Gi
    persistentvolumeclaims: "100"
    requests.storage: 100Gi
    silver.storageclass.storage.k8s.io/persistentvolumeclaims: "10"
    silver.storageclass.storage.k8s.io/requests.storage: 75Gi
  used:
    bronze.storageclass.storage.k8s.io/persistentvolumeclaims: "1"
    bronze.storageclass.storage.k8s.io/requests.storage: 8Gi
    gold.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
    gold.storageclass.storage.k8s.io/requests.storage: "0"
    persistentvolumeclaims: "1"
    requests.storage: 8Gi
    silver.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
    silver.storageclass.storage.k8s.io/requests.storage: "0"
```
2016-12-09 14:11:21 -08:00
Kubernetes Submit Queue ac05e7135a Merge pull request #37568 from luxas/various_kubeadm_improvements
Automatic merge from submit-queue (batch tested with PRs 37270, 38309, 37568, 34554)

kubeadm UX improvements for the v1.5 stable release

This PR targets the next stable kubeadm release.

It's work in progress, but please comment on it and review, since there are many changes.

I tried to group the commits logically, so you can review them separately.

Q: Why this large PR? Why not many small?
A: Because of the Submit Queue and the time it takes.

PTAL @kubernetes/sig-cluster-lifecycle

_Edit:_ This work was splitted up in three PRs in total
2016-12-09 14:11:19 -08:00
Kubernetes Submit Queue 971d713a18 Merge pull request #38309 from caesarxuchao/disable-verify-mungers
Automatic merge from submit-queue (batch tested with PRs 37270, 38309, 37568, 34554)

Remove update/verify-munge-docs.sh

These scripts are no long needed because:
1. most docs are moved to other repos
2. the mungers are pre-processing the docs for gh pages, which are created with a whole different process now.

cc @bgrant0607 @thockin
2016-12-09 14:11:17 -08:00
Kubernetes Submit Queue 68b17c2942 Merge pull request #37270 from xilabao/remove-duplicate-get-errs
Automatic merge from submit-queue (batch tested with PRs 37270, 38309, 37568, 34554)

Remove duplicate get errs

old:
```shell
$ kubectl get ns
NAME          STATUS    AGE
default       Active    2m
kube-system   Active    2m

$ kubectl get ns --all-namespaces
NAMESPACE   NAME      STATUS    AGE
error: namespace is not namespaced
error: namespace is not namespaced
```
new:
```shell
$ kubectl get ns --all-namespaces
NAMESPACE   NAME      STATUS    AGE
error: namespace is not namespaced
```
2016-12-09 14:11:14 -08:00
Derek Carr af6c8a2479 Reduce max container runtime wait time 2016-12-09 16:40:13 -05:00
Jordan Liggitt 4536388909
Update bazel 2016-12-09 16:26:06 -05:00
Jordan Liggitt 2d868441d8
Make sorting work on versioned objects 2016-12-09 16:26:06 -05:00
Jordan Liggitt d080246442
Make thirdpartyresource encode objectmeta correctly 2016-12-09 16:26:05 -05:00
Jordan Liggitt 8b34e0ed53
Make --record compute patch using versioned object 2016-12-09 16:26:05 -05:00
Jordan Liggitt 12806be2bf
Fix tests using internal types for generic printing 2016-12-09 16:26:05 -05:00
Jordan Liggitt cc7a44f545
Fix tests using internal types for serialization 2016-12-09 16:26:05 -05:00
Jordan Liggitt 6676bab9c3
Fix unmarshaling into internal version of CustomMetricTargetList in validation 2016-12-09 16:26:05 -05:00