Commit Graph

3005 Commits (acca01bcc206004ec8227669fab3b86c7a92cb7c)

Author SHA1 Message Date
Wojciech Tyczynski 924e9a5b3a Unified unstructured converter interface and setup 2017-02-17 21:07:04 +01:00
Wojciech Tyczynski edb36d4df7 Minor cleanup in unstructured converter 2017-02-17 18:56:55 +01:00
Kubernetes Submit Queue 22e6bd4c8d Merge pull request #40915 from tanshanshan/api-groupversion-unittest
Automatic merge from submit-queue

Improve code coverage for pkg/api/util

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

Improve code coverage for pkg/api/util .

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-16 23:15:43 -08:00
Kubernetes Submit Queue f2888c0a30 Merge pull request #41544 from sttts/sttts-core-group-announce-registered
Automatic merge from submit-queue (batch tested with PRs 41505, 41484, 41544, 41514, 41022)

pkg/api/install: use apimachinery/announce+registered

Make core group a little bit less special.
2017-02-16 14:28:19 -08:00
Kubernetes Submit Queue 8ecc256e88 Merge pull request #41014 from gmarek/promote_helpers
Automatic merge from submit-queue

Promote taint helpers from e2e/framework to util/taints

cc @kevin-wangzefeng
2017-02-16 02:43:27 -08:00
Dr. Stefan Schimanski 9156981e73 pkg/api/install: use apimachinery/announce+registered 2017-02-16 11:20:43 +01:00
gmarek e1e4370ecd Promote taint addition/removal to api/v1/helpers.go 2017-02-16 09:25:27 +01:00
Kubernetes Submit Queue df4e69bb3b Merge pull request #36718 from k82cn/filed_err_msg
Automatic merge from submit-queue

Replace raw string with const var.

Replace raw string with const string var.
2017-02-16 00:12:15 -08:00
Kubernetes Submit Queue 2a7c50add6 Merge pull request #41311 from gmarek/taints-comments
Automatic merge from submit-queue

Apply davidopps comments to TaintController PR

Fix #41318

cc @timothysc @kevin-wangzefeng
2017-02-15 21:38:09 -08:00
Kubernetes Submit Queue 97212f5b3a Merge pull request #37953 from liggitt/automount
Automatic merge from submit-queue (batch tested with PRs 37137, 41506, 41239, 41511, 37953)

Add field to control service account token automounting

Fixes https://github.com/kubernetes/kubernetes/issues/16779

* adds an `automountServiceAccountToken *bool` field to `ServiceAccount` and `PodSpec`
* if set in both the service account and pod, the pod wins
* if unset in both the service account and pod, we automount for backwards compatibility

```release-note
An `automountServiceAccountToken *bool` field was added to ServiceAccount and PodSpec objects. If set to `false` on a pod spec, no service account token is automounted in the pod. If set to `false` on a service account, no service account token is automounted for that service account unless explicitly overridden in the pod spec.
```
2017-02-15 20:05:13 -08:00
Jordan Liggitt 0c9fd4fbe7
generated files 2017-02-15 16:04:10 -05:00
Jordan Liggitt 0d6e877de2
Add automountServiceAccountToken field to PodSpec and ServiceAccount types 2017-02-15 16:04:09 -05:00
deads2k 2d5fe9d855 add sample fuzzing tests 2017-02-15 10:34:44 -05:00
gmarek de6c9bd535 Apply davidopps comments to TaintController PR 2017-02-15 09:37:26 +01:00
Mike Danese ad42b42949 move kubeadm api group testing to kubeadm package 2017-02-14 16:02:13 -08:00
deads2k db0b0bd0f5 move metav1 conversions to metav1 2017-02-14 11:47:23 -05:00
Kubernetes Submit Queue 1f4e2efc5b Merge pull request #41184 from liggitt/subject-apigroup
Automatic merge from submit-queue (batch tested with PRs 41357, 41178, 41280, 41184, 41278)

Switch RBAC subject apiVersion to apiGroup in v1beta1

Referencing a subject from an RBAC role binding, the API group and kind of the subject is needed to fully-qualify the reference.

The version is not, and adds complexity around re-writing the reference when returning the binding from different versions of the API, and when reconciling subjects.

This PR:
* v1beta1: change the subject `apiVersion` field to `apiGroup` (to match roleRef)
* v1alpha1: convert apiVersion to apiGroup for backwards compatibility
* all versions: add defaulting for the three allowed subject kinds
* all versions: add validation to the field so we can count on the data in etcd being good until we decide to relax the apiGroup restriction

```release-note
RBAC `v1beta1` RoleBinding/ClusterRoleBinding subjects changed `apiVersion` to `apiGroup` to fully-qualify a subject. ServiceAccount subjects default to an apiGroup of `""`, User and Group subjects default to an apiGroup of `"rbac.authorization.k8s.io"`.
```

@deads2k @kubernetes/sig-auth-api-reviews @kubernetes/sig-auth-pr-reviews
2017-02-13 21:07:10 -08:00
Jordan Liggitt 2a76fa1c8f
Switch RBAC subject apiVersion to apiGroup in v1beta1 2017-02-13 15:33:09 -05:00
Kubernetes Submit Queue a75b61d7a3 Merge pull request #39928 from humblec/iscsi-multipath-backuptp
Automatic merge from submit-queue

Add mulitpath support to iscsi plugin

#issue https://github.com/kubernetes/kubernetes/issues/39345
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-13 12:18:55 -08:00
Joe Beda 20e1f8ea9b
Creates constants for bootstrap tokens.
Move these form core API to a separate package (pkg/bootstrap/api).

This also creates the constant for the new kube-public namespace.
2017-02-10 12:47:25 -08:00
Kubernetes Submit Queue a7a74b56da Merge pull request #40355 from gmarek/nc-taint-handling
Automatic merge from submit-queue (batch tested with PRs 39418, 41175, 40355, 41114, 32325)

TaintController

```release-note
This PR adds a manager to NodeController that is responsible for removing Pods from Nodes tainted with NoExecute Taints. This feature is beta (as the rest of taints) and enabled by default. It's gated by controller-manager enable-taint-manager flag.
```
2017-02-10 04:50:42 -08:00
Wojciech Tyczynski 449aade4ee Implement runtime.Object <-> map[string]interface{} conversion 2017-02-10 10:53:27 +01:00
Kubernetes Submit Queue 64f34eb5fa Merge pull request #41201 from deads2k/api-01-round-trip
Automatic merge from submit-queue (batch tested with PRs 41112, 41201, 41058, 40650, 40926)

make round trip testing generic

RoundTrip testing is something associated with a scheme and everyone who writes an API will want to do it.  In the end, we should wire each API group separately in a test scheme and have them all call this general function.  Once `kubeadm` is out of the main scheme, we'll be able to remove the one really ugly hack.

@luxas @sttts @kubernetes/sig-apimachinery-pr-reviews @smarterclayton
2017-02-10 01:40:42 -08:00
Kubernetes Submit Queue 45d122dd6b Merge pull request #36033 from DirectXMan12/feature/hpa-v2
Automatic merge from submit-queue (batch tested with PRs 40796, 40878, 36033, 40838, 41210)

HPA v2 (API Changes)

**Release note**:
```release-note
Introduces an new alpha version of the Horizontal Pod Autoscaler including expanded support for specifying metrics.
```

Implements the API changes for kubernetes/features#117.

This implements #34754, which is the new design for the Horizontal Pod Autoscaler.  It includes improved support for custom metrics (and/or arbitrary metrics) as well as expanded support for resource metrics.  The new HPA object is introduces in the API group "autoscaling/v1alpha1".

Note that the improved custom metric support currently is limited to per pod metrics from Heapster -- attempting to use the new "object metrics" will simply result in an error.  This will change once #34586 is merged and implemented.
2017-02-10 00:04:48 -08:00
gmarek 2f0e436677 Taint controller - first commit 2017-02-10 02:13:45 +01:00
deads2k 0a74353118 make round trip testing generic 2017-02-09 11:42:22 -05:00
Wojciech Tyczynski 3aebc4c003 Implement ttl controller 2017-02-09 13:53:32 +01:00
Solly Ross 86c430b881 Introduce HPA v2 API Objects
This commit introduces the autoscaling/v2alpha1 API group, which
currently contains the first alpha of the new HorizontalPodAutoscaler
object.
2017-02-07 17:20:14 -05:00
Kubernetes Submit Queue 9dec47dc28 Merge pull request #39369 from CallMeFoxie/validation-hostip
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Validate unique  against HostPort/Protocol/HostIP

**What this PR does / why we need it**:
We can bind to specific IPs however validation will fail for different HostIP:HostPort combination. This is a small fix to check combination of HostPort/Protocol/HostIP rather than just HostPort/Protocol.

Sample configuration
...
"ports": [
              {
                "protocol": "TCP",
                "containerPort": 53,
                "hostPort": 55,
                "hostIP": "127.0.0.1",
                "name": "dns-local-tcp"
              },
              {
                "protocol": "TCP",
                "containerPort": 53,
                "hostPort": 55,
                "hostIP": "127.0.0.2",
                "name": "dns-local-tcp2"
              }
]

Before:
* spec.template.spec.containers[1].ports[2].hostPort: Duplicate value: "55/TCP"
* spec.template.spec.containers[1].ports[3].hostPort: Duplicate value: "55/TCP"

After applying the patch:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:55            0.0.0.0:*               LISTEN      3644/docker-proxy
tcp        0      0 127.0.0.2:55            0.0.0.0:*               LISTEN      3629/docker-proxy

Thanks
Ashley

**Release note**:

```release-note
```
2017-02-06 20:57:18 -08:00
Humble Chirammal 72f0a5219a Update specs for iscsi volume source.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-06 17:21:33 +05:30
Humble Chirammal 332e26dc8c Add portals field to iscsi volume source to achieve multipathing.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-06 17:06:33 +05:30
Ashley Reese 10117cc815 Validate unique host ports with host IPs as well 2017-02-06 09:28:41 +01:00
Kubernetes Submit Queue 6adf3e5268 Merge pull request #40877 from yujuhong/rm_mirror_annotation
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Remove the temporary fix for pre-1.0 mirror pods

The fix was introduced to fix #15960 for pre-1.0 pods. It should be safe to remove
this fix now.
2017-02-04 04:43:06 -08:00
Kubernetes Submit Queue 9642104e82 Merge pull request #39914 from kevin-wangzefeng/forgiveness-library-changes
Automatic merge from submit-queue (batch tested with PRs 40696, 39914, 40374)

Forgiveness library changes

**What this PR does / why we need it**:
Splited from #34825, contains library changes that are needed to implement forgiveness:

1. ~~make taints-tolerations matching respect timestamps, so that one toleration can just tolerate a taint for only a period of time.~~ As TaintManager is caching taints and observing taint changes, time-based checking is now outside the library (in TaintManager). see #40355.
2. make tolerations respect wildcard key.
3. add/refresh some related functions to wrap taints-tolerations operation.

**Which issue this PR fixes**: 
Related issue: #1574
Related PR: #34825, #39469 
~~Please note that the first 2 commits in this PR come from #39469 .~~

**Special notes for your reviewer**:

~~Since currently we have `pkg/api/helpers.go` and `pkg/api/v1/helpers.go`, there are some duplicated periods of code laying in these two files.~~

~~Ideally we should move taints-tolerations related functions into a separate package (pkg/util/taints), and make it a unified set of implementations. But I'd just suggest to do it in a follow-up PR after Forgiveness ones done, in case of feature Forgiveness getting blocked to long.~~

**Release note**:

```release-note
make tolerations respect wildcard key
```
2017-02-03 15:05:55 -08:00
tanshanshan bd0ebc9dba add unit test for groupversion 2017-02-03 17:37:42 +08:00
Dominika Hodovska adf7cf1934 Init containers in GA - generated code 2017-02-03 01:08:25 +01:00
Dominika Hodovska a856188b96 Show InitContainers and InitContainerStatus in PodSpec 2017-02-03 00:25:47 +01:00
Yu-Ju Hong 999f8dff8e Remove the temporary fix for pre-1.0 mirror pods 2017-02-02 10:37:19 -08:00
Kubernetes Submit Queue 62c9cb4684 Merge pull request #40853 from sttts/sttts-more-cutoffs-7
Automatic merge from submit-queue (batch tested with PRs 35782, 35831, 39279, 40853, 40867)

genericapiserver: cut off more dependencies – episode 7

Follow-up of https://github.com/kubernetes/kubernetes/pull/40822

approved based on #40363
2017-02-02 09:53:52 -08:00
Kubernetes Submit Queue f66679a4e9 Merge pull request #35782 from piosz/remove-hpa-ext
Automatic merge from submit-queue

Removed HPA objects from extensions api group

fix #29778

``` release-note
HorizontalPodAutoscaler is no longer supported in extensions/v1beta1 version. Use autoscaling/v1 instead.
```

 cc @kubernetes/autoscaling
2017-02-02 09:42:33 -08:00
Dr. Stefan Schimanski de2eee391a Update bazel 2017-02-02 15:19:04 +01:00
Dr. Stefan Schimanski ef8bb4e7e7 Move pkg/api.FinanlizerOrphan into metav1 2017-02-02 15:17:34 +01:00
Dr. Stefan Schimanski 871fc426b3 pkg/storage: move errors here from pkg/api/errors/storage 2017-02-02 15:17:34 +01:00
Piotr Szczesniak a35ad8f6ba Removed HPA objects from extensions api group 2017-02-02 14:09:54 +01:00
deads2k 46767fcbac move genericvalidation to apimachinery 2017-02-02 07:37:00 -05:00
deads2k 9cbf557c07 snip validation link back to pkg/api 2017-02-02 07:35:51 -05:00
Dr. Stefan Schimanski ad3dc2584f Update generated files 2017-02-02 06:58:58 +01:00
Dr. Stefan Schimanski b51252ab5b Update protobufs 2017-02-02 06:58:29 +01:00
Dr. Stefan Schimanski 161ca53f49 k8s.io/apiserver: add example api group 2017-02-02 06:58:28 +01:00
Dr. Stefan Schimanski 55466b51bf pkg/api/testing: cut off fuzzers from static codecs 2017-02-02 06:58:28 +01:00
Jordan Liggitt ff977e5c7c
Add internal/external DNS node address types 2017-02-01 23:10:32 -05:00
Dr. Stefan Schimanski 7a6366bea0 Update bazel 2017-02-01 13:49:28 +01:00
Dr. Stefan Schimanski d6adb51e6c pkg/api: move HasObjectMetaSystemFieldValues into apimachinery 2017-02-01 13:37:41 +01:00
Kubernetes Submit Queue 76550cf2de Merge pull request #40710 from deads2k/client-21-record
Automatic merge from submit-queue (batch tested with PRs 40638, 40742, 40710, 40718, 40763)

move client/record

An attempt at moving client/record to client-go.  It's proving very stubborn and needs a lot manual intervention and near as I can tell, no one actually gets any benefit from the sink and source complexity it adds.

@sttts @caesarchaoxu
2017-01-31 20:40:45 -08:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k 1ef5d26079 move pkg/storage to apiserver 2017-01-31 19:07:33 -05:00
Kevin b410f3f4c2 address review comments 3 2017-01-31 21:39:17 +08:00
Kevin 3c550c32fb address review comments 2 2017-01-31 21:39:17 +08:00
Kevin 6a2ef1646b address review comments 2017-01-31 21:39:17 +08:00
Kevin 36dcb57407 forgiveness library changes 2017-01-31 21:39:17 +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
Dr. Stefan Schimanski 79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski 6b6b6c747e pkg/api/testing: split fuzzer between apimachinery and kube 2017-01-29 21:41:44 +01:00
Kubernetes Submit Queue a3f8ee6578 Merge pull request #39135 from xingzhou/kube-39110
Automatic merge from submit-queue

Improve error messages for ValidateObject method.

Improved error messages for #ValidateObject method
in pkg/api/validation/schema.go.

Fixed #39110
2017-01-29 06:02:35 -08:00
Kubernetes Submit Queue 760a51f03a Merge pull request #39469 from kevin-wangzefeng/forgiveness-API-changes
Automatic merge from submit-queue (batch tested with PRs 39469, 40557)

Forgiveness api changes

**What this PR does / why we need it**:
Splited from #34825 , contains api changes that are needed to implement forgiveness:
1. update toleration api types to support forgiveness, added a new field forgivenessSeconds to indicate the duration of time it tolerates a taint.
2. update taint api types, added a new field to indicate the time the taint is added.

**Which issue this PR fixes** : 
Related issue: #1574
Related PR: #34825 

**Special notes for your reviewer**:

**Release note**:

```release-note
forgiveness alpha version api definition
```
2017-01-27 10:38:31 -08:00
deads2k c6fd6941a1 move pkg/api/validation/path to apimachinery 2017-01-27 08:49:29 -05:00
Kevin d72b32b9d2 update generated files 2017-01-27 20:55:31 +08:00
Kevin 72a19819a6 api changes of forgiveness phase1 2017-01-27 20:55:24 +08:00
Timothy St. Clair bfe41927ba Cleaup Affinity post conversion from annotations to fields 2017-01-25 08:32:28 -06:00
Kubernetes Submit Queue df42444742 Merge pull request #40216 from sttts/sttts-more-cutoffs
Automatic merge from submit-queue (batch tested with PRs 39260, 40216, 40213, 40325, 40333)

genericapiserver: more dependency cutoffs

- cut-off pkg/api.Resource and friends - lgtm
- authn plugins -> k8s.io/apiserver - 
- webhook authz plugin -> k8s.io/apiserver - lgtm
- ~~pkg/cert -> k8s.io/apimachinery (will rebase on @deads2k's PR also moving it)~~
- split pkg/config into kubelet config merger and flags - lgtm
- split feature gate between generic apiserver and kube - lgtm
- move pkg/util/flag into k8s.io/apiserver - lgtm
2017-01-24 16:26:00 -08:00
Dr. Stefan Schimanski 2b8e938128 Update generated files 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski d00c9a33f9 Add TODO for AppArmor validation depending on feature gate 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski a6b2ebb50c pkg/flag: make feature gate extensible and split between generic and kube 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 56d60cfae6 pkg/util: move flags from pkg/util/config to pkg/util/flags 2017-01-24 20:56:03 +01:00
Clayton Coleman be6d2933df
refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
Clayton Coleman 7b1c715496
generated: Move references to metav1.*Options 2017-01-24 13:41:48 -05:00
Clayton Coleman fca7e00608
Move all *Options to metav1 2017-01-24 13:15:26 -05:00
Kubernetes Submit Queue 43286a82c6 Merge pull request #39981 from fraenkel/optional_configmaps_secrets
Automatic merge from submit-queue

Optional configmaps and secrets

Allow configmaps and secrets for environment variables and volume sources to be optional

Implements approved proposal c9f881b7bb

Release note:
```release-note
Volumes and environment variables populated from ConfigMap and Secret objects can now tolerate the named source object or specific keys being missing, by adding `optional: true` to the volume or environment variable source specifications.
```
2017-01-23 23:06:35 -08:00
Michael Fraenkel ca207be4a3 Generated code 2017-01-23 20:12:24 -07:00
Michael Fraenkel 4e466040d9 Allow Optional ConfigMap and Secrets
- ConfigMaps and Secrets for Env or Volumes are allowed to be optional
2017-01-23 18:59:49 -07:00
Xing Zhou 0177cbae75 Improve error messages for ValidateObject method.
Improved error messages for method #ValidateObject in
pkg/api/validation/schema.go.
2017-01-24 09:12:06 +08:00
Clayton Coleman 9009c1ac14
generated: informer,client 2017-01-23 17:52:47 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Clayton Coleman c12344b3b8
Tests that check metav1 2017-01-23 16:53:19 -05:00
Clayton Coleman 4f865efdb9
Create meta/internalversion for ListOptions
Move over only the conversions that are needed, create a new scheme that
is private to meta and only accessible via ParameterCodec. Move half of
pkg/util/labels/.readonly to pkg/apis/meta/v1/labels.go
2017-01-23 16:53:18 -05:00
Clayton Coleman 6ea557d4b2
Fix tests after new defaulted value added 2017-01-23 12:37:21 -05:00
Clayton Coleman e6d35b0362
generated: api 2017-01-23 12:26:35 -05:00
Clayton Coleman be3ce22dd3
Add TerminationMessagePolicy 2017-01-23 12:26:00 -05:00
deads2k 7cc9702402 separate announce factories 2017-01-23 08:02:14 -05:00
Kubernetes Submit Queue 36aa4a9ac0 Merge pull request #40225 from shiywang/newtest
Automatic merge from submit-queue (batch tested with PRs 40066, 36250, 40255, 40225, 40204)

Fix validation errors in cli are cryptic

fix issue https://github.com/kubernetes/kubernetes/issues/39811

now the error message is like: 
`error validating "/home/shiywang/template/test.yaml": error validating data: field ports for v1.ServiceSpec: is required; if you choose to ignore these errors, turn validation off with --validate=false`

still need add some unit test, plz don't test now
2017-01-23 02:29:09 -08:00
Kubernetes Submit Queue 5775b57f36 Merge pull request #40255 from k82cn/rm_short_pkg_name
Automatic merge from submit-queue (batch tested with PRs 40066, 36250, 40255, 40225, 40204)

Remove short pkg name.

Remove un-necessary short pkg name.
2017-01-23 02:29:08 -08:00
Michail Kargakis e634c90c64 api: rename non-convertible annotation prefix to be valid 2017-01-21 23:42:55 +01:00
Michail Kargakis 1d3748d7e5 registry: invalidate updates to non-convertible selectors 2017-01-21 23:42:55 +01:00
Klaus Ma 72c76a3b0a Remove short pkg name. 2017-01-21 18:51:01 +08:00
Kubernetes Submit Queue 88257cfb19 Merge pull request #39797 from fraenkel/portforward_ws_api
Automatic merge from submit-queue

Port forward over websockets API

The API changes for port forwarding over websockets
2017-01-20 15:05:33 -08:00
deads2k dfd8db8ae9 allow API groups to be installed and registered in multiple schemes 2017-01-20 12:19:49 -05:00
shiywang 6f5b8af725 fix validation errors in cli are cryptic
typo
2017-01-21 00:44:48 +08:00
Michael Fraenkel 08d0c86629 Generated code 2017-01-20 10:06:24 -06:00
Michael Fraenkel eb5d59467e Portforward API 2017-01-20 09:48:05 -06:00
Kubernetes Submit Queue 2d4d2f913f Merge pull request #39446 from fraenkel/env_secrets
Automatic merge from submit-queue (batch tested with PRs 39446, 40023, 36853)

Create environment variables from secrets

Allow environment variables to be populated from entire secrets.

**Release note**:
```release-note
Populate environment variables from a secrets.
```
2017-01-19 18:53:45 -08:00
Kubernetes Submit Queue 51919b4e1e Merge pull request #39772 from mikedanese/v1beta1
Automatic merge from submit-queue

promote certificates api to beta

Mostly posting to see what breaks but also this API is ready to be promoted.

```release-note
Promote certificates.k8s.io to beta and enable it by default. Users using the alpha certificates API should delete v1alpha1 CSRs from the API before upgrading and recreate them as v1beta1 CSR after upgrading.
```

@kubernetes/api-approvers @jcbsmpsn @pipejakob
2017-01-19 17:48:16 -08:00
Mike Danese 96c146c8f2 promote certificates.k8s.io to beta 2017-01-19 13:13:20 -08:00
Garrett Rodrigues ad1e5e98c2 Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00
Michael Fraenkel 5048c01861 Generated code 2017-01-19 14:07:10 -05:00
Michael Fraenkel 13d693d220 Secrets can populate environment variables 2017-01-19 13:46:05 -05:00
Kubernetes Submit Queue 6e268e6f83 Merge pull request #40144 from wojtek-t/unstructured_benchmark
Automatic merge from submit-queue (batch tested with PRs 40150, 40144)

Unstructured benchmark

Ref #39017
2017-01-19 10:17:09 -08:00
Kubernetes Submit Queue e9d4e4341c Merge pull request #40087 from deads2k/generic-24-move-fields
Automatic merge from submit-queue

move pkg/fields to apimachinery

Purely mechanical move of `pkg/fields` to apimachinery.  

Discussed with @lavalamp on slack.  Moving this an `labels` to apimachinery.

@liggitt any concerns?  I think the idea of field selection should become generic and this ends up shared between client and server, so this is a more logical location.
2017-01-19 08:48:17 -08:00
Kubernetes Submit Queue 05c2a0825e Merge pull request #38871 from k82cn/k8s_25318
Automatic merge from submit-queue

Made multi-scheduler graduated to Beta and then v1.

fixes #25318
2017-01-19 07:58:51 -08:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Wojciech Tyczynski 91f8dcf44a Test runtime.Object <-> map[string]interface{} conversion 2017-01-19 13:54:38 +01:00
Klaus Ma 604957c11c Added generated codes. 2017-01-19 20:20:08 +08:00
Klaus Ma c8c4b81963 Made multi-scheduler graduated to Beta and then v1. 2017-01-19 20:16:01 +08:00
Andrew Rynhard f46bf42ba0 Add authorization mode to kubeadm 2017-01-18 14:02:53 -08:00
Kubernetes Submit Queue eee819039d Merge pull request #39851 from liggitt/taint-versioned
Automatic merge from submit-queue

Use versioned Taint/Toleration/AvoidPods objects when marshalling

fixes #39847

`kubectl taint`, the kubelet's `--register-with-taints` option, and several Taint/Toleration/AllowPod annotation helpers were marshaling/unmarshaling using internal structs
2017-01-18 11:30:36 -08:00
Jordan Liggitt e49554501f
Use versioned Taint/Toleration/AllowPods objects when marshalling 2017-01-18 12:52:14 -05:00
deads2k e74efe41a0 add rbac v1beta1 2017-01-18 09:49:33 -05:00
Wojciech Tyczynski 39506d2219 Fix incorrect testapi groups 2017-01-18 14:02:01 +01:00
Kubernetes Submit Queue fe69dcf861 Merge pull request #40018 from sttts/sttts-genericapiserver-storage-dep
Automatic merge from submit-queue (batch tested with PRs 40008, 40005, 40018)

Fix wrong rename pkg/storage.Is{TestFail -> Conflict}
2017-01-18 04:04:49 -08:00
Clayton Coleman 660095776a
generated: staging 2017-01-17 16:17:20 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
Clayton Coleman 54d8ed001d
Move ObjectMeta to metav1 2017-01-17 16:17:13 -05:00
Kubernetes Submit Queue e5fe366eaf Merge pull request #39894 from deads2k/client-03-remove-old
Automatic merge from submit-queue

Remove packages which are now apimachinery

Removes all the content from the packages that were moved to `apimachinery`.  This will force all vendoring projects to figure out what's wrong.  I had to leave many empty marker packages behind to have verify-godep succeed on vendoring heapster.

@sttts straight deletes and simple adds
2017-01-17 12:00:00 -08:00
deads2k 26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00
deads2k a6b655fb6a add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
deads2k 67fac70ea3 remove files moved to apimachinery 2017-01-17 07:46:34 -05:00
Dr. Stefan Schimanski 7271921405 Fix wrong rename pkg/storage.Is{TestFail -> Conflict} 2017-01-17 13:18:11 +01:00
Kubernetes Submit Queue f0b0cd0399 Merge pull request #39945 from sttts/sttts-cutoff-pkg-serviceaccount-dep
Automatic merge from submit-queue

genericapiserver: cut off pkg/serviceaccount dependency

**Blocked** by pkg/api/validation/genericvalidation to be split up and moved into apimachinery.
2017-01-17 03:09:21 -08:00
Dr. Stefan Schimanski 3a17d433aa Move first pkg/api/validation's into apimachinery 2017-01-17 10:30:35 +01:00
Dr. Stefan Schimanski 8fe0958ba0 Update bazel 2017-01-17 09:30:48 +01:00
Dr. Stefan Schimanski e561d5c1c9 Move pkg/api/rest into pkg/genericapiserver/api/rest 2017-01-17 09:29:13 +01:00
deads2k a3e71b2cef move name generation to generic api server storage helpers 2017-01-16 16:04:04 -05:00
deads2k 8686d67c80 move pkg/util/rand 2017-01-16 16:04:03 -05:00
deads2k 7993e7c8aa move openapi types to pkg/openapi 2017-01-16 13:40:14 -05:00
deads2k dd7cd951ce move meta/v1/validation to apimachinery 2017-01-16 13:40:13 -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
Kubernetes Submit Queue 9118a1252f Merge pull request #39915 from pmorie/serialization-test
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

Make api serialization test easier to follow

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

This PR makes the serialization test easier to understand and is informed by the recent experience of writing a new serialization test in SIG service catalog.

**Release note**:

```release-note
NONE
```
2017-01-16 09:26:19 -08:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
deads2k 680ce72c07 move api/errors to apimachinery 2017-01-16 09:19:15 -05:00
Kubernetes Submit Queue eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
Paul Morie 7408e6292e Make api serialization test easier to follow 2017-01-14 10:44:15 -05:00
Kubernetes Submit Queue 616038db1b Merge pull request #39675 from apprenda/dns_case_insensitive
Automatic merge from submit-queue

Don't blame DNS spec on Kubernetes requirement for lower-case DNS labels.

**What this PR does / why we need it**: #39635 was rejected because it wasn't clear to the author (me) that lower-case DNS labels are in fact a [Kubernetes requirement](https://github.com/kubernetes/kubernetes/pull/39635#issuecomment-271404975) rather than from the [DNS RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) or/and [DNS RFC 1123](https://www.ietf.org/rfc/rfc1123.txt).

**Special notes for your reviewer**: @thockin this is a first pass to make the error messages clearer about the fact that DNS specs are not to _blame_.
2017-01-14 02:07:30 -08:00
deads2k 31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
Clayton Coleman dcd6e1d833
generated: protobuf for types 2017-01-13 16:20:04 -05:00
Kubernetes Submit Queue a6fa5c2bfd Merge pull request #39814 from deads2k/api-58-multi-register
Automatic merge from submit-queue

replace global registry in apimachinery with global registry in k8s.io/kubernetes

We'd like to remove all globals, but our immediate problem is that a shared registry between k8s.io/kubernetes and k8s.io/client-go doesn't work.  Since client-go makes a copy, we can actually keep a global registry with other globals in pkg/api for now.

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @sttts
2017-01-13 12:37:02 -08:00
Paulo Pires 3856d91ed8
Don't blame DNS spec on Kubernetes requirement for lower-case DNS labels. 2017-01-13 13:40:27 +00:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Kubernetes Submit Queue 082ce00eca Merge pull request #39478 from rrati/pod-affinity-api-fields
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

[scheduling] Moved pod affinity and anti-affinity from annotations to api fields #25319

Converted pod affinity and anti-affinity from annotations to api fields

Related: #25319
Related: #34508

**Release note**:
```Pod affinity and anti-affinity has moved from annotations to api fields in the pod spec.  Pod affinity or anti-affinity that is defined in the annotations will be ignored.```
2017-01-12 15:06:33 -08:00
Kubernetes Submit Queue 0abdcfbec8 Merge pull request #39698 from mikedanese/default-csr
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

default a CSR's allowed usage to key encipherment and digital signing

Some pretty safe and sane defaults.

@liggitt
2017-01-12 15:06:29 -08:00
deads2k 05eb75612f replace global registry in apimachinery with global registry in k8s.io/kubernetes 2017-01-12 15:14:07 -05:00
Robert Rati 6a3ad93d6c [scheduling] Moved pod affinity and anti-affinity from annotations to api
fields. #25319
2017-01-12 14:54:29 -05:00
Kubernetes Submit Queue e73d66ce44 Merge pull request #37557 from sttts/sttts-update-ugorji
Automatic merge from submit-queue

Update ugorji/go/codec godep

In order to pick-up https://github.com/ugorji/go/issues/119 and to get rid of the workaround at https://github.com/kubernetes/kubernetes/pull/36909/files#diff-a09eb061a0fb0ef3c9ef9d696f1ad0b4R426.
2017-01-12 02:36:16 -08:00
Mike Danese 06077ac088 default a CSR's allowed usage to key encipherment and digital signing 2017-01-11 14:57:26 -08:00
Dr. Stefan Schimanski 2741eb7fdb Update generated files 2017-01-11 21:54:07 +01:00
Dr. Stefan Schimanski 4a1d507756 Update bazel 2017-01-11 18:53:24 +01:00
Dr. Stefan Schimanski cf60bec396 Split out server side code from pkg/apis/rbac/validation 2017-01-11 18:31:58 +01:00
Dr. Stefan Schimanski 57e3a57c10 Split pkg/genericapiserver/api/request from ObjectMeta 2017-01-11 18:26:33 +01:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
deads2k facc34fea5 move tests which need to stay in k8s.io/kubernetes for API scheme 2017-01-10 10:04:32 -05:00
Kubernetes Submit Queue 73727e3791 Merge pull request #39439 from smarterclayton/version_watch
Automatic merge from submit-queue (batch tested with PRs 37845, 39439, 39514, 39457, 38866)

Move watch/versioned to pkg/apis/meta/v1/watch.go

Watch is a part of the server API
2017-01-09 13:15:16 -08:00
Kubernetes Submit Queue 124b3a7943 Merge pull request #36243 from kargakis/validate-status-replicas-correctly
Automatic merge from submit-queue (batch tested with PRs 39394, 38270, 39473, 39516, 36243)

Update status validation for ds/deploy/rs/rc
2017-01-09 12:05:25 -08:00
Kubernetes Submit Queue 59b1f4a12e Merge pull request #39473 from php-coder/improve_err_msg_about_privileged
Automatic merge from submit-queue (batch tested with PRs 39394, 38270, 39473, 39516, 36243)

Improve an error message when privileged containers are disallowed on the cluster

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

At present when user creates privileged pod and creation of privileged containers disallowed globally by a system administrator (kubelet and api-server were running with `--allow-privileged=false`), user will get the following error message:
```console
$ kubectl create -f nginx.pod 
The Pod "nginx" is invalid: spec.containers[0].securityContext.privileged: Forbidden: disallowed by policy
```
"Disallowed by policy" may give a wrong assumption to a user that creation of privileged containers disallowed by [`PodSecurityPolicy`](http://kubernetes.io/docs/user-guide/pod-security-policy/) while it's not.

This commit improves error message and tries to point user to the right direction:
```console
$ kubectl create -f nginx.pod 
The Pod "nginx" is invalid: spec.containers[0].securityContext.privileged: Forbidden: privileged containers are disallowed on this cluster by a system administrator
```

**Release note**:

```release-note
NONE
```

PTAL @pweil-
2017-01-09 12:05:21 -08:00
Slava Semushin 7e4b047743 Improve an error message when privileged containers are disallowed globally on the cluster. 2017-01-09 12:38:57 +01:00
Clayton Coleman f07c6486ba
Rename metav1.Event to metav1.WatchEvent to avoid swagger collision
The kind on this object was always WatchEvent
2017-01-06 23:45:04 -05:00
Clayton Coleman c5d755dbec
Refactor tests to match new versioned code structure 2017-01-06 23:45:03 -05:00
Clayton Coleman e5019de260
refactor: Move versioned/watch to meta/v1 2017-01-06 23:45:03 -05:00
Kubernetes Submit Queue 07ce35a325 Merge pull request #39490 from deads2k/generic-16-bump-gengo
Automatic merge from submit-queue (batch tested with PRs 39466, 39490, 39527)

bump gengo to latest

bumping gengo to limit surprises while working on https://github.com/kubernetes/kubernetes/pull/39475

@kubernetes/sig-api-machinery-misc
2017-01-06 11:30:13 -08:00
deads2k f86447c9a0 files regenerated after update 2017-01-06 11:45:40 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Klaus Ma 1586c2f463 Replace raw string with const var. 2017-01-05 19:11:27 +08:00
deads2k 80143ee0b4 snip links from genericapiserver to api/validation 2017-01-04 15:17:18 -05:00
Kubernetes Submit Queue 819535b96a Merge pull request #36245 from fraenkel/env_configmap
Automatic merge from submit-queue (batch tested with PRs 38433, 36245)

Allow pods to define multiple environment variables from a whole ConfigMap

Allow environment variables to be populated from ConfigMaps

- ConfigMaps represent an entire set of EnvVars
- EnvVars can override ConfigMaps


fixes #26299
2017-01-03 23:28:09 -08:00
Kubernetes Submit Queue 064132d84a Merge pull request #39284 from bowei/remove-host-record
Automatic merge from submit-queue (batch tested with PRs 39284, 39367)

Remove HostRecord annotation (beta feature)

The annotation has made it to GA so this code should be deleted.

**Release note**:
```release-note
The 'endpoints.beta.kubernetes.io/hostnames-map' annotation is no longer supported.  Users can use the 'Endpoints.subsets[].addresses[].hostname' field instead.
```
2017-01-03 19:20:08 -08:00
Kubernetes Submit Queue 04d10d27d7 Merge pull request #30932 from derekwaynecarr/fix-30909
Automatic merge from submit-queue

Service with type=NodePort and clusterIP=None is not allowed

Fixes https://github.com/kubernetes/kubernetes/issues/30908
2017-01-03 15:25:29 -08:00
Michael Fraenkel 94866b3bee Generated code 2017-01-03 11:45:38 -05:00
Michael Fraenkel 2d803afc98 ConfigMaps populate environment variables 2017-01-03 11:02:15 -05:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Dr. Stefan Schimanski 2d58ffc129 Move pkg/{apiserver -> genericapiserver/api} 2017-01-03 14:54:03 +01:00
Kubernetes Submit Queue cc0b17eaa1 Merge pull request #38574 from k82cn/k8s_38542
Automatic merge from submit-queue

Add default imagePullPolicy for initContainers.

fixes #38542
2017-01-02 06:03:05 -08:00
Michail Kargakis 6ce2d4e7f3 Update status validation for ds/deploy/rs/rc 2017-01-02 13:54:24 +01:00
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Bowei Du 589f58ca39 Remove HostRecord annotation (beta feature)
The annotation has made it to GA so this code should be deleted.
2016-12-28 12:47:08 -08:00
Kubernetes Submit Queue 59bd66ce3e Merge pull request #39152 from liggitt/json-tags
Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)

Add test for json tags on internal and external types

Follow up from https://github.com/kubernetes/kubernetes/pull/38406

- adds static analysis tests preventing internal types from adding new json or protobuf tags
- adds static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- fixes issues found by the tests
2016-12-27 17:10:11 -08:00
Kubernetes Submit Queue 24b3f6c494 Merge pull request #39181 from lukaszo/defaulting
Automatic merge from submit-queue (batch tested with PRs 38460, 39181)

Increase number of iterations in TestDefaulting
2016-12-23 10:51:28 -08:00
Kubernetes Submit Queue 58d319e589 Merge pull request #39093 from dgoodwin/token-default
Automatic merge from submit-queue

kubeadm: Default to using token discovery.

Recent changes to support multiple methods for discovery meant that
"kubeadm init" no longer was sufficient and users would need to add
"--discovery token://" to achieve the same results.

Instead lets assume discovery if the user does not specify anything else
to maintain parity and the brevity of our original instructions.


**Release note**:

```release-note
NONE
```

CC @mikedanese @luxas
2016-12-23 01:20:00 -08:00
Kubernetes Submit Queue c200f27245 Merge pull request #38090 from xingzhou/kube-37654
Automatic merge from submit-queue (batch tested with PRs 38920, 38090)

Improve error message for name/label validation.

Instead of just providing regex in name/label validation error output, we need to add the naming rules of the name/label, which is more end-user readable.

Fixed #37654
2016-12-22 22:00:30 -08:00
Łukasz Oleś 84d0a5d1d9 Increase number of iterations in TestDefaulting
Fixes #39180
2016-12-23 03:04:32 +01:00
Kubernetes Submit Queue 0a750599fd Merge pull request #37188 from NickrenREN/context_test
Automatic merge from submit-queue (batch tested with PRs 39006, 39078, 37188, 39118)

add test functions in context_test.go
2016-12-22 17:47:30 -08:00
Devan Goodwin bf69fb1747 kubeadm: Default to using token discovery.
Recent changes to support multiple methods for discovery meant that
"kubeadm init" no longer was sufficient and users would need to add
"--discovery token://" to achieve the same results.

Instead lets assume discovery if the user does not specify anything else
to maintain parity and the brevity of our original instructions.
2016-12-22 12:54:34 -04:00
Jordan Liggitt 0a80b412ef
Fix json tags 2016-12-22 09:32:58 -05:00
Klaus Ma cd6792ae08 Add default imagePullPolicy for initContainers. 2016-12-22 09:29:43 +08:00
NickrenREN 00123c343b add test functions in context_test.go
add test functions in context_test.go( pkg/api/context_test.go)
2016-12-22 09:25:40 +08:00
Kubernetes Submit Queue 52df372f9b Merge pull request #35805 from dgoodwin/token-mgmt
Automatic merge from submit-queue

Implement kubeadm bootstrap token management

Creates bootstrap tokens as secrets per the specification in #30707 

_WARNING_: These are not currently hooked up to the discovery service or the token it creates.

Still TODO:
- [x] delete tokens
- [x] merge with #35144 and adopt it's testing approach
- [x] determine if we want wholesale json output & templating like kubectl (we do not have an API object with the data we want here) may require a bit of plumbing.
- [x] allow specifying a token duration on the CLI
- [x] allow configuring the default token duration
- [x] hook up the initial token created during init

Sample output:

```
(root@centos1 ~) $ kubeadm token create
Running pre-flight checks
<cmd/token> Token secret created: f6dc69.c43e491752c4a0fd
(root@centos1 ~) $ kubeadm token create
Running pre-flight checks
<cmd/token> Token secret created: 8fad2f.e7b78c8a5f7c7b9a
(root@centos1 ~) $ kubeadm token list  
Running pre-flight checks
ID        TOKEN                     EXPIRATION
44d805    44d805.a4e78b6cf6435e33   23h
4f65bb    4f65bb.d006a3c7a0e428c9   23h
6a086e    6a086e.2ff99f0823236b5b   23h
8fad2f    8fad2f.e7b78c8a5f7c7b9a   23h
f6dc69    f6dc69.c43e491752c4a0fd   23h
f81653    f81653.9ab82a2926c7e985   23h
```
2016-12-20 14:44:40 -08:00
Devan Goodwin bfe345dd86 Implement kubeadm bootstrap token management.
Adds kubeadm subcommands to create, list, and delete bootstrap tokens.
Tokens can be created with a TTL duration, or 0 for tokens that will not
expire. The create command can also be used to specify your own token
(for use when bootstrapping masters and nodes in parallel), or update an
existing token's secret or ttl.

Marked "ex" for experimental for now as the boostrap controllers are not
yet hooked up in core.
2016-12-20 11:43:55 -04:00
Wojciech Tyczynski d5e235c831 Reduce timeout for waiting for resource version 2016-12-20 10:05:38 +01:00
Xing Zhou cfe1599983 Improve error message for name/label validation.
This patch added user readable naming rules to the output of
the error messages for name/label validation.
2016-12-19 02:53:26 +00:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00