Commit Graph

3005 Commits (acca01bcc206004ec8227669fab3b86c7a92cb7c)

Author SHA1 Message Date
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
Robert Rati 11c577f092 [scheduling] Auto-generated file updates from moving node affinity from
annotations to api fields. #35518
2016-12-16 11:42:43 -05:00
Robert Rati 91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Mike Danese 690c7e578b kubeadm: refactor discovery behind an interface 2016-12-15 13:54:49 -08:00
derekwaynecarr 023bf87c38 Service with type=NodePortr and clusterIP=None is not allowed 2016-12-14 14:51:00 -05:00
Kubernetes Submit Queue b1acd15046 Merge pull request #38699 from deads2k/auth-07-better-message
Automatic merge from submit-queue (batch tested with PRs 38724, 38699)

improve the forbidden message

Improves the forbidden message to include more details about what was denied.

`User "foo" cannot list replicasets.extensions in the namespace "default". `
`User "foo" cannot list replicasets.extensions at the cluster scope. `

@xilabao looks like you looking in a similar area, but focused on errors.
@sttts a lot of usual reviewers are out.
2016-12-14 08:21:48 -08:00
deads2k f6829bbde7 improve the forbidden message 2016-12-14 09:53:55 -05:00
Kubernetes Submit Queue e338afbca7 Merge pull request #38533 from DirectXMan12/bug/priority-restmapper-versions
Automatic merge from submit-queue (batch tested with PRs 38720, 38533)

Priority REST Mapper: Actually honor user choice

```release-note
Fixes bug in resolving client-requested API versions
```

RESTMapping takes a desired GroupKind, and a set of versions, and
returns a rest mapper for the first matching version.  It also has a
list of built-in discovered prioritized versions, to which it appends
the user versions.

However, when it goes to parse the versions, it parses them as
GroupVersions.  Since only a version was passed, the group will be the
empty group (""), which will only match rest mappings for the empty
group, ergo, none of the user's versions will match if they are
attempting a match for a non-emtpy-group GroupKind.

This fixes that by taking the parsed GroupVersion, and overriding the
Group with the Group from the passed-in GroupKind.
2016-12-14 05:52:48 -08:00
Kubernetes Submit Queue af23f40f82 Merge pull request #37272 from brendandburns/cleanup
Automatic merge from submit-queue

Remove 'minion' from the code in two places in favor of 'node'

Part of https://github.com/kubernetes/kubernetes/issues/1111
2016-12-14 00:09:43 -08:00
Kubernetes Submit Queue 702f545aab Merge pull request #37968 from sjenning/qos-pod-status-field
Automatic merge from submit-queue (batch tested with PRs 38171, 37968)

add QoS pod status field

Right now, applications retrieving pod information must reimplement the QoS classification logic on the client side if they wish to know the QoS class of the pod.

The PR adds the QoS class to the pod status so it can be used directly by clients.

This is a step toward addressing #33255

@ConnorDoyle @derekwaynecarr @vishh
2016-12-13 11:51:35 -08:00
Seth Jennings 12b254db93 add QoS pod status field 2016-12-12 21:22:03 -06:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Solly Ross d1ec1b363d Priority REST Mapper: Actually honor user choice
RESTMapping takes a desired GroupKind, and a set of versions, and
returns a rest mapper for the first matching version.  It also has a
list of built-in discovered prioritized versions, to which it appends
the user versions.

However, when it goes to parse the versions, it parses them as
GroupVersions.  Since only a version was passed, the group will be the
empty group (""), which will only match rest mappings for the empty
group, ergo, none of the user's versions will match if they are
attempting a match for a non-emtpy-group GroupKind.

This fixes that by taking the parsed GroupVersion, and overriding the
Group with the Group from the passed-in GroupKind.
2016-12-12 10:54:47 -05:00
Kubernetes Submit Queue b7559ad4c5 Merge pull request #37934 from xilabao/improve-the-result-of-checking-role-name
Automatic merge from submit-queue (batch tested with PRs 38527, 37934)

improve the result of checking role name

Get all error messages before return.
2016-12-11 21:08:01 -08:00
xilabao ce2085594e improve the result of checking role name 2016-12-12 11:44:16 +08:00
Clayton Coleman c52d510a24
refactor: generated 2016-12-10 18:05:53 -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
Jordan Liggitt 4536388909
Update bazel 2016-12-09 16:26:06 -05:00
Jordan Liggitt cc7a44f545
Fix tests using internal types for serialization 2016-12-09 16:26:05 -05:00
Jordan Liggitt 711986876b
Remove generated codecs for internal types 2016-12-09 16:26:04 -05:00
Jordan Liggitt d5afb71cf4
Remove json serialization annotations from internal types 2016-12-09 16:26:03 -05:00
Kubernetes Submit Queue 63da5cfec7 Merge pull request #37860 from derekwaynecarr/add-missing-doc
Automatic merge from submit-queue

Add documentation for FinalizerName

Fixes https://github.com/kubernetes/kubernetes.github.io/issues/1829

/cc @caesarxuchao
2016-12-09 13:03:23 -08:00
Kubernetes Submit Queue 129f5d8b95 Merge pull request #38278 from hodovska/external-name-no-ports
Automatic merge from submit-queue

API v1: do not require ports for all types of services

Ports values had to be specified for all types of services but object with service type "ExternalName" does't define ports. That's why we had to remove required condition.
Presence of ports in service types where ports are actually required is verified here: 
https://github.com/kubernetes/kubernetes/blob/master/pkg/api/validation/validation.go#L2439

For more information about ExternalName services see:
http://kubernetes.io/docs/user-guide/services/#services-without-selectors

Fixes https://github.com/kubernetes/kubernetes/issues/34394
2016-12-08 23:43:14 -08:00
Alejandro Escobar 1e84257691 fixed a few kublet typos. 2016-12-07 11:23:12 -08:00
Dominika Hodovska cb82ef8a60 API v1: ports are not required for all services 2016-12-07 12:20:28 +01:00
Kubernetes Submit Queue d6b9a7aa60 Merge pull request #37693 from wojtek-t/pipe_get_options_to_storage
Automatic merge from submit-queue (batch tested with PRs 37693, 38085)

Pipe get options to storage

Ref #37473
2016-12-07 00:52:26 -08:00
mbohlool a9cee59f69 Fix pods/log OpenAPI/Swagger spec to return string instead of v1.Pod 2016-12-06 13:59:20 -08:00
Kubernetes Submit Queue 653fd97ba0 Merge pull request #37966 from p0lyn0mial/unify_restmapping_and_restmappings
Automatic merge from submit-queue (batch tested with PRs 38185, 37966)

decided to extract common logic for RESTMapping and RESTMappings to a…

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: the changes introduced in this PR extract common logic of RESTMapping and RESTMappings to one common method. 

**Special notes for your reviewer**: this is my first PR - be polite.



The only change in logic to what was before is when calling commonRESTMappings from RESTMapping
we search all defaultGroupVersion as opposed to just one when no mapping was found for provided versions.
2016-12-06 06:49:25 -08:00
Wojciech Tyczynski 61d9fd6afc Register GetOptions in all api groups 2016-12-06 11:48:37 +01:00
Wojciech Tyczynski 3432fea8b2 Pipe GetOptions to storage 2016-12-06 11:48:37 +01:00
Eric Paris 78798f6191 Remove girishkalele from most places
This also updates the maintainers list and reassigns his tests
2016-12-05 19:29:34 -05:00
p0lyn0mial 5f8e774517 extended RESTMappings method by a version parameter.
RESTMapping method can now rely on RESTMappings by passing versions parameter and taking the first match found by RESTMappings method. In addition
a UT that test the new method has been added.

The only change in logic to what was before is when calling RESTMapping
we search all defaultGroupVersion as opposed to just one when no mapping was found for provided versions.
2016-12-05 20:09:36 +01:00
Wojciech Tyczynski c1699253ff Regenerate autogenerated files 2016-12-05 09:18:57 +01:00
Wojciech Tyczynski 69bb0fce86 Update comments for ListOptions 2016-12-05 08:19:46 +01:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman 6536dcfdc2
refactor: move pkg/api/unversioned to pkg/apis/meta/v1 2016-12-03 18:57:31 -05:00
Kubernetes Submit Queue 723a200c09 Merge pull request #37823 from danwinship/better-fuzzing
Automatic merge from submit-queue (batch tested with PRs 38049, 37823, 38000, 36646)

Test 0-length-arrays in fuzzing tests

While hacking on #37289 I noticed that our fuzzing tests test nil slices and slices of length 1, but not slices of length 0, meaning we aren't testing that 0-length slices get treated the same as nil in all the places we expect them to (and in particular, we aren't ensuring that comparisons always use api.Semantic.DeepEqual rather than reflect.DeepEqual). (Though in fact, changing the fuzzer didn't turn up any bugs, so maybe this effectively gets tested somewhere else...)

`fuzz.New().NilChance(.5).NumElements(0, 1)` means we end up generating `nil` 50% of the time, a length 0 array 25% of the time, and a length 1 array 25% of the time... maybe it should be `fuzz.New().NilChance(.33).NumElements(0, 1)` instead?

The gofuzz rebase is to pull in https://github.com/google/gofuzz/pull/20, and the other fix is just a drive-by.
2016-12-03 14:20:50 -08:00
Kubernetes Submit Queue f3d463f114 Merge pull request #37643 from ncdc/informer-gen
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

Add generated informers

Add informer-gen and the informers it generates. We'll do follow-up PRs to convert everything currently using the hand-written informers to the generated ones.

TODO:

- [x] switch to `GroupVersionResource`
- [x] finish godoc

@deads2k @caesarxuchao @sttts @liggitt
2016-12-03 08:55:57 -08:00
Kubernetes Submit Queue 67740f5a7d Merge pull request #37320 from ivan4th/remove-stray-quote
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

Remove stray quote from API docs

There was a PR that removed backquote from the line recently, but there's also extra quote.
2016-12-02 23:32:47 -08:00
Kubernetes Submit Queue efa42b95a6 Merge pull request #37532 from smarterclayton/remove_export
Automatic merge from submit-queue

Remove ExportOptions from api/internal and use unversioned

Should only have one internal object in use

Part of #37530
2016-12-02 21:11:56 -08:00
Kubernetes Submit Queue 1b2a4b55bb Merge pull request #36251 from screeley44/k8-immutable-scannotation
Automatic merge from submit-queue

Make pvc storage class annotation immutable after create

Fixes #34516

Added immutable check in validation.go

```
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
# persistentvolumeclaims "gce-claim-storageclass" was not valid:
# * metadata.annotations.volume.beta.kubernetes.io/storage-class: Invalid value: "slow2": field is immutable
#

```
2016-12-02 18:42:32 -08:00
Kubernetes Submit Queue 05af3abfdd Merge pull request #37721 from derekwaynecarr/fix-graceful-delete
Automatic merge from submit-queue

Fix logic error in graceful deletion

If a resource has the following criteria:

1. deletion timestamp is not nil
2. deletion graceperiod seconds as persisted in storage is 0

the resource could never be deleted as we always returned pending graceful.
2016-12-02 05:44:59 -08:00
Derek Carr b396c684d5 Add documentation for FinalizerName 2016-12-01 17:20:41 -05:00
Derek Carr 14730841f3 Fix logic in graceful deletion if existing grace period was 0 2016-12-01 14:24:50 -05:00
Dan Winship b684f73e5c Fix a broken custom fuzzer
Trying to create IntStrs from int64s rather than int32s resulted in
lots of glog.Error messages that showed up when running tests with
"-v".
2016-12-01 09:24:44 -05:00
Dan Winship b8b8b22a9e Test both nil and empty slices in fuzzer tests 2016-12-01 09:23:55 -05:00
Minhan Xia 1c2c0c1f63 support service loadBalancerSourceRange update 2016-11-30 15:27:34 -08:00
Andy Goldstein 3bc87f9338 Add generated informers 2016-11-30 09:17:12 -05:00
Ivan Shvedunov 6210fecb12 Update generated files after stray quote removal 2016-11-30 13:28:23 +03:00
Ivan Shvedunov b6f924d009 Remove stray quote from API docs 2016-11-30 13:27:49 +03:00
Scott Creeley a76854ca97 Make pvc storage class annotation immutable after create 2016-11-29 16:45:00 -05:00
Kubernetes Submit Queue 48ae0807cb Merge pull request #36449 from luksa/env.valueFrom
Automatic merge from submit-queue

Improved validation error message when env.valueFrom contains no (or …

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
A misleading error message is shown if the user mistypes (or forgets to specify) a field under env.valueFrom. This is the error message: "may not have more than one field specified at a time". But there is only one (misspelled) field specified.


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

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```
Improved error message for missing/misspelled field under env.valueFrom
```
2016-11-29 07:32:27 -08:00
Kubernetes Submit Queue 9b2d17608e Merge pull request #36525 from apelisse/owners-pkg-api
Automatic merge from submit-queue

Curating Owners: pkg/api

cc @lavalamp @smarterclayton @erictune @thockin @bgrant0607

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2016-11-28 11:44:04 -08:00
Clayton Coleman 0b1a806181
generated: remove ExportOptions 2016-11-27 23:21:10 -05:00
Clayton Coleman 3dde81f8d0
Remove references to v1/internal ExportOptions 2016-11-27 23:21:06 -05:00
Clayton Coleman c43bdfbf0d
Remove duplicate ExportOptions objects
There should only be a single type unversioned.ExportOptions that is
referenced from multiple group versions.
2016-11-27 22:36:46 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Clayton Coleman a43960da3b Move GroupVersion* to pkg/runtime/schema 2016-11-23 21:03:36 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu b50367cbdc remove v1.Semantics 2016-11-23 15:53:09 -08:00
Chao Xu 8ef3256434 pkg/api/v1 2016-11-23 15:53:09 -08:00
Chao Xu bff3cb4df6 pkg/api, pkg/apis: Copied constants to versioned types.go, copied several util funcs to versioned 2016-11-23 15:53:09 -08:00
Brendan Burns e68fe4d62e Remove 'minion' from the code in two places in favor of 'node' 2016-11-21 22:48:06 -08:00
Kubernetes Submit Queue 53caa61c20 Merge pull request #35767 from xiangpengzhao/fix-api-doc
Automatic merge from submit-queue

Fix a link in api doc

Remove an extra symbol `, it breaks a link in api doc.
cc @caesarxuchao , thanks!
2016-11-21 15:57:07 -08:00
Tim Hockin c1d7bf2688 Update OWNERS 2016-11-18 15:15:46 -08:00
xiangpengzhao 1203613612 Fix a link in api doc 2016-11-17 02:12:00 -05:00
Marko Luksa 389478f312 Improved validation error message when env.valueFrom contains no (or misspelled) ref 2016-11-15 10:36:34 +01:00
Marko Luksa d8ec7181b4 Improved validation error message when env.valueFrom contains no (or misspelled) ref 2016-11-15 10:08:47 +01:00
Zihong Zheng 924432f2dc Allows user to change service type when sourceRanges is declared 2016-11-14 18:24:02 -08:00
Antoine Pelisse 5e26788aba Update OWNERS approvers and reviewers: pkg/api 2016-11-09 10:18:08 -08:00
Kubernetes Submit Queue 73e497fb44 Merge pull request #35437 from markturansky/loosen_pvc_limit_range_validation
Automatic merge from submit-queue

Loosened validation on PVC LimitRanger

This PR loosens validation on PVC LimitRanger so that either Min or Max are required, but not both.

Per @derekwaynecarr  https://github.com/openshift/origin/pull/11396#discussion_r84533061
2016-11-09 02:01:52 -08:00
Kubernetes Submit Queue 87584919e5 Merge pull request #35912 from liggitt/test-deep-copy
Automatic merge from submit-queue

Add tests for deepcopy of structs

Until https://github.com/kubernetes/kubernetes/pull/35728 merges, we want to at least fuzz/test that deepcopy isn't shallow-copying problematic fields
2016-11-09 00:48:29 -08:00
Miao Luo 96f88f6e32 Autogenerated files update due to new API changes for photon volume 2016-11-08 09:37:20 -08:00
Miao Luo b22ccc6780 Support persistent volume on Photon Controller platform
1. Enable Photon Controller as cloud provider
2. Support Photon persistent disk as volume source/persistent volume
source
2016-11-08 09:36:16 -08:00
Kubernetes Submit Queue 13cc43af82 Merge pull request #35483 from ymqytw/use_evict_for_drain
Automatic merge from submit-queue

Fix kubectl drain for statefulset

Support deleting pets for `kubectl drain`. 
Use evict to delete pods.

Fixes: #33727

```release-note
Adds support for StatefulSets in kubectl drain.
Switches to use the eviction sub-resource instead of deletion in kubectl drain, if server supports.
```

@foxish @caesarxuchao
2016-11-07 17:42:08 -08:00
ymqytw b73fae6c55 Fix kubectl drain for statefulset and use eviciton for drain if possible 2016-11-07 16:13:06 -08:00
Kubernetes Submit Queue 3624bf2ff4 Merge pull request #36284 from caesarxuchao/podinitialized
Automatic merge from submit-queue

copy PodInitialized condition to v1

Copied from pkg/api/types.go

I might batch this change with other similar changes, but want to gets this reviewed first.

cc @dchen1107 @yujuhong
2016-11-07 16:03:33 -08:00
Kubernetes Submit Queue 15fa0df93e Merge pull request #35975 from justinsb/role_labels_2
Automatic merge from submit-queue

Add constants for node role labels
2016-11-07 15:02:58 -08:00
Maciej Szulik 0b5ef16008 Support ScheduledJob name 2016-11-07 10:14:12 +01:00
Maciej Szulik 41d88d30dd Rename ScheduledJob to CronJob 2016-11-07 10:14:12 +01:00
Kubernetes Submit Queue 0068c3094a Merge pull request #36095 from caesarxuchao/deprecate-LegacyHostIP
Automatic merge from submit-queue

[RFC] Prepare for deprecating NodeLegacyHostIP

Ref https://github.com/kubernetes/kubernetes/issues/9267#issuecomment-257994766

*What this PR does*
- Add comments saying "LegacyHostIP" will be deprecated in 1.7;
- Add v1.NodeLegacyHostIP to be consistent with the internal API (useful for client-go migration #35159)
- Let cloudproviders who used to only set LegacyHostIP set the IP as both InternalIP and ExternalIP
- Master used to ssh tunnel to node's ExternalIP or LegacyHostIP to do [healthz check](https://github.com/kubernetes/kubernetes/blame/master/pkg/master/master.go#L328-L332). OTOH, if on-prem, kubelet only [sets](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_node_status.go#L430-L431) LegacyHostIP or InternalIP. In order to deprecate LegacyHostIP in 1.7, I let healthz check to use InternalIP if ExternalIP is not available. (The healthz check is the only consumer of LegacyHostIP in k8s.)

@liggitt @justinsb @bgrant0607 

```release-note
LegacyHostIP will be deprecated in 1.7.
```
2016-11-06 21:21:15 -08:00
Kubernetes Submit Queue ebc8dc85aa Merge pull request #36207 from smarterclayton/optimize_self_link
Automatic merge from submit-queue

SetSelfLink is inefficient

Generating self links, especially for lists, is inefficient.  Replace
use of net.URL.String() call with direct encoding that reduces number of
allocations. Switch from calling meta.ExtractList|SetList to a function
that iterates over each object in the list.

In steady state for nodes performing frequently small get/list
operations, and for larger LISTs significantly reduces CPU and
allocations.

@wojtek-t this is the next big chunk of CPU use during the large N nodes simulation test (11% of master CPU). Takes a few allocations out of the critical path
2016-11-06 06:42:49 -08:00
Kubernetes Submit Queue 4b1e36f970 Merge pull request #36190 from dashpole/revert_node_inode_pressure_split
Automatic merge from submit-queue

We only report diskpressure to users, and no longer report inodepressure

See #36180 for more information on why #33218 was reverted.
2016-11-06 03:00:34 -08:00
Kubernetes Submit Queue 486a1ad3e4 Merge pull request #31707 from apprenda/windows_infra_container
Automatic merge from submit-queue

Initial work on running windows containers on Kubernetes

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

This is the first stab at getting the Kubelet running on Windows (fixes #30279), and getting it to deploy network-accessible pods that consist of Windows containers. Thanks @csrwng, @jbhurat for helping out.

The main challenge with Windows containers at this point is that container networking is not supported. In other words, each container in the pod will get it's own IP address. For this reason, we had to make a couple of changes to the kubelet when it comes to setting the pod's IP in the Pod Status. Instead of using the infra-container's IP, we use the IP address of the first container.

Other approaches we investigated involved "disabling" the infra container, either conditionally on `runtime.GOOS` or having a separate windows-docker container runtime that re-implemented some of the methods (would require some refactoring to avoid maintainability nightmare). 

Other changes:
- The default docker endpoint was removed. This results in the docker client using the default for the specific underlying OS.

More detailed documentation on how to setup the Windows kubelet can be found at https://docs.google.com/document/d/1IjwqpwuRdwcuWXuPSxP-uIz0eoJNfAJ9MWwfY20uH3Q. 

cc: @ikester @brendandburns @jstarks
2016-11-06 01:30:11 -07:00
Chao Xu 094de4ef49 copy PodInitialized conditon to v1 2016-11-04 20:42:22 -07:00
Clayton Coleman 0be25e481b
generated: docs 2016-11-04 23:38:37 -04:00
Justin Santa Barbara cef8315ae8 Add constants for node role labels
Rather than sharing well-known strings, we should be declaring these in
the API.
2016-11-04 18:00:35 -04:00
Chao Xu 783af943db Add v1.NodeLegacyHostIP to be consistent with the internal API;
Mark NodeLegacyHostIP will be deprecated in 1.7;
Let cloudprovider that used to only set NodeLegacyHostIP set the IP as both InternalIP and ExternalIP, to allow dprecation in 1.7
2016-11-04 14:29:49 -07:00
Clayton Coleman cbe0787ca4
Describe graceful deletion in more detail 2016-11-04 17:08:32 -04:00
David Ashpole 9aca40dee6 revert #33218. dont need #36180. We only use diskpressure 2016-11-04 08:29:27 -07:00
deads2k 61673c4b39 make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
Clayton Coleman 4f363f5447
SetSelfLink is inefficient
Generating self links, especially for lists, is inefficient.  Replace
use of net.URL.String() with direct encoding that reduces number of
allocations. Switch from calling meta.ExtractList|SetList to a function
that iterates over each object in the list.

In steady state for nodes performing frequently small get/list
operations, and for larger LISTs significantly reduces CPU and
allocations.
2016-11-03 23:37:36 -04:00
Marcin 3872a47074 Autogenerated code and docs 2016-11-03 18:36:32 +01:00
Marcin 26acced6d8 Add policy api version v1beta1 and disable v1alpha1 2016-11-03 13:26:27 +01:00
Janet Kuo c15b9470f5 Replace apps/v1alpha1 with apps/v1beta1 and manually remove generated apps/v1alpha1 files
Manually remove generated apps/v1alpha1 types, protobuf, and api-reference doc files
Manually remove apps/v1alpha1 folder from 1.5 generated client
2016-11-02 15:16:23 -07:00
Kubernetes Submit Queue 7d14b568c3 Merge pull request #36001 from smarterclayton/change_double_decode
Automatic merge from submit-queue

Avoid double decoding all client responses

Fixes #35982 

The linked issue uncovered that we were always double decoding the response in restclient for get, list, update, create, and patch.  That's fairly expensive, most especially for list.  This PR refines the behavior of the rest client to avoid double decoding, and does so while minimizing the changes to rest client consumers.

restclient must be able to deal with multiple types of servers. Alter the behavior of restclient.Result#Raw() to not process the body on error, but instead to return the generic error (which still matches the error checking cases in api/error like IsBadRequest). If the caller uses
.Error(), .Into(), or .Get(), try decoding the body as a Status.

For older servers, continue to default apiVersion "v1" when calling restclient.Result#Error(). This was only for 1.1 servers and the extensions group, which we have since fixed.

This removes a double decode of very large objects (like LIST) - we were trying to DecodeInto status, but that ends up decoding the entire result and then throwing it away.  This makes the decode behavior specific to the type of action the user wants.

```release-note
The error handling behavior of `pkg/client/restclient.Result` has changed.  Calls to `Result.Raw()` will no longer parse the body, although they will still return errors that react to `pkg/api/errors.Is*()` as in previous releases.  Callers of `Get()` and `Into()` will continue to receive errors that are parsed from the body if the kind and apiVersion of the body match the `Status` object.

This more closely aligns rest client as a generic RESTful client, while preserving the special Kube API extended error handling for the `Get` and `Into` methods (which most Kube clients use).
```
2016-11-02 11:36:41 -07:00
Jordan Liggitt dffd5c6689
Add tests for deepcopy of structs 2016-11-02 13:47:17 -04:00
Clayton Coleman 95116c776e
Authorization should be registered in testapi 2016-11-01 22:55:58 -04:00
Clayton Coleman 8987019931
Improve the common kinds API test to catch more errors 2016-11-01 22:55:58 -04:00
Mike Danese 030cb6927b kubeadm: fix central api tests 2016-11-01 16:48:45 -07:00
Paulo Pires 6daab26280
Volume mount with colon in path is now allowed because it's how it works on Windows. 2016-11-01 17:45:08 -04:00
Jitendra Bhurat 66a1ef25e0
Fixing Volumes on Windows 2016-11-01 15:48:37 -04:00
Clayton Coleman ab673bbc9a
generated: alternative unsafe conversions 2016-10-31 11:00:29 -04:00
Kubernetes Submit Queue 9a219eb803 Merge pull request #34651 from smarterclayton/negotiate
Automatic merge from submit-queue

Simplify negotiation in server in preparation for multi version support

This is a pre-factor for #33900 to simplify runtime.NegotiatedSerializer, tighten up a few abstractions that may break when clients can request different client versions, and pave the way for better negotiation.

View this as pure simplification.
2016-10-29 03:32:02 -07:00
Connor Doyle c93646e8da Support opaque integer resource accounting.
- Prevents kubelet from overwriting capacity during sync.
- Handles opaque integer resources in the scheduler.
  - Adds scheduler predicate tests for opaque resources.
- Validates opaque int resources:
  - Ensures supplied opaque int quantities in node capacity,
    node allocatable, pod request and pod limit are integers.
  - Adds tests for new validation logic (node update and pod spec).
- Added e2e tests for opaque integer resources.
2016-10-28 10:15:13 -07:00
Clayton Coleman ca2f1b87ad
Replace negotiation with a new method that can extract info
Alter how runtime.SerializeInfo is represented to simplify negotiation
and reduce the need to allocate during negotiation. Simplify the dynamic
client's logic around negotiating type. Add more tests for media type
handling where necessary.
2016-10-28 11:30:11 -04:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Kubernetes Submit Queue dcdbf27d4f Merge pull request #34648 from nikhiljindal/NSCasDel
Automatic merge from submit-queue

Adding cascading deletion support to federated namespaces

Ref https://github.com/kubernetes/kubernetes/issues/33612

With this change, whenever a federated namespace is deleted with `DeleteOptions.OrphanDependents = false`, then federation namespace controller first deletes the corresponding namespaces from all underlying clusters before deleting the federated namespace.

cc @kubernetes/sig-cluster-federation @caesarxuchao


```release-note
Adding support for DeleteOptions.OrphanDependents for federated namespaces. Setting it to false while deleting a federated namespace also deletes the corresponding namespace from all registered clusters.
```
2016-10-26 21:04:03 -07:00
nikhiljindal f955d556f8 Adding cascading deletion support to federated namespaces 2016-10-26 16:54:12 -07:00
Clayton Coleman b5a46d914e
generated: conversions 2016-10-26 12:48:45 -04:00
Clayton Coleman 3ff5cb6ec7
Move resource.Quantity rounding to defaulter
This reverts commit feb56cc486.
2016-10-26 12:21:27 -04:00
Wojciech Tyczynski bbb410c7af generated: Safe conversions 2016-10-26 11:20:37 +02:00
Wojciech Tyczynski feb56cc486 Revert "Move resource.Quantity rounding to defaulter"
This reverts commit 5b18b4e515.
2016-10-26 10:21:54 +02:00
Clayton Coleman d1c39c0a76
generated: Unsafe conversions 2016-10-25 19:30:34 -04:00
Clayton Coleman 5b18b4e515
Move resource.Quantity rounding to defaulter 2016-10-25 19:28:41 -04:00
Clayton Coleman 07bd50be0d
Internal weight field for affinity must be int32 2016-10-25 19:28:40 -04:00
Clayton Coleman 65042efb0f
Add conversion instructions 2016-10-25 19:28:40 -04:00
Kubernetes Submit Queue c0b7b75713 Merge pull request #35057 from rhcarvalho/typos
Automatic merge from submit-queue

Fix some typos

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: fixes a typo an its auto-generated repetitions.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
NONE
```
2016-10-25 11:02:08 -07:00
Kubernetes Submit Queue e3067f326f Merge pull request #34634 from mwielgus/pod-unschedulable
Automatic merge from submit-queue

Make "Unschedulable" reason a constant in api

String "Unschedulable" is used in couple places in K8S:
* scheduler
* federation replicaset and deployment controllers
* cluster autoscaler
* rescheduler
This PR makes the string a part of API so it not changed.

cc: @davidopp @fgrzadkowski @wojtek-t
2016-10-25 09:30:49 -07:00
markturansky a3f4d8a506 loosened validation on pvc limitranger 2016-10-24 11:01:18 -04:00
Mike Danese df713b478c fix tests by declaring testdata 2016-10-21 17:32:32 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue bdaf502ff4 Merge pull request #34094 from nebril/hless-to-nonhless-ip
Automatic merge from submit-queue

Deny service ClusterIP update from `None`

**What this PR does / why we need it**: Headless service should not be transformed into a service with ClusterIP, therefore update of this field if it's set to `None` is disallowed.

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

**Release note**:
```release-note
Changing service ClusterIP from `None` is not allowed anymore.
```
2016-10-21 14:34:56 -07:00
Maciej Kwiek d1c32b8194 Test cases for service ClusterIP updates
Test cases from ClusterIP using types to other ClusterIP using types
(ClusterIP, NodePort, LoadBalancer) added.
2016-10-21 13:11:57 +02:00
Kubernetes Submit Queue c98eb3867f Merge pull request #35199 from kargakis/remove-last-probe-time
Automatic merge from submit-queue

Remove last probe time from replica sets

While experimenting with Deployment conditions I found out that if we are going to use lastProbeTime as we are supposed to be using it then we hotloop between updates (see https://github.com/kubernetes/kubernetes/pull/19343#issuecomment-255096778 for more info)

cc: @smarterclayton @soltysh
2016-10-21 01:47:01 -07:00
Maciej Kwiek 7df1afe71f Deny ClusterIP update for services using it
If the service is of the type using the ClusterIP (ClusterIP, NodePort,
LoadBalancer), the update of ClusterIP is prohibited.
2016-10-21 09:53:39 +02:00
Kubernetes Submit Queue c6df88991d Merge pull request #35194 from wojtek-t/efficient_selector
Automatic merge from submit-queue

Optimize label selector

The number of values for a given label is generally pretty small (in huge majority of cases it is exactly one value).
Currently computing selectors is up to 50% of CPU usage in both apiserver and scheduler.

Changing the structure in which those values are stored from map to slice improves the performance of typical usecase for computing selectors.

Early results:
- scheduler throughput it ~15% higher
- apiserver cpu-usage is also lower (seems to be also ~10-15%)
2016-10-20 20:45:22 -07:00
Kubernetes Submit Queue e6b5b076b8 Merge pull request #33957 from bprashanth/esipp-beta
Automatic merge from submit-queue

Loadbalanced client src ip preservation enters beta

Sounds like we're going to try out the proposal (https://github.com/kubernetes/kubernetes/issues/30819#issuecomment-249877334) for annotations -> fields on just one feature in 1.5 (scheduler). Or do we want to just convert to fields right now?
2016-10-20 06:53:07 -07:00
Wojciech Tyczynski 9c91da7a22 More efficient selector 2016-10-20 15:16:58 +02:00
Michail Kargakis a4694ef1af Generated changes for lastProbeTime removal 2016-10-20 15:16:46 +02:00
Michail Kargakis 628e630424 Remove lastProbeTime from rc/rs conditions 2016-10-20 15:03:06 +02:00
Kubernetes Submit Queue 41c9bbcc02 Merge pull request #34514 from derekwaynecarr/validation-fixes
Automatic merge from submit-queue

requests.storage is a standard resource name

The value `requests.storage` is a valid standard resource name but was omitted from the standard list.
2016-10-19 21:16:35 -07:00
bprashanth 5029bb06e9 Validation 2016-10-19 14:51:57 -07:00
Kubernetes Submit Queue 2de1f5c07e Merge pull request #34407 from brendandburns/kubectl-schema
Automatic merge from submit-queue

Add validation that detects repeated keys in the labels and annotations maps

Fixes #2965  (a nearly 2 year old feature request!)

@kubernetes/kubectl 

@eparis
2016-10-19 14:01:00 -07:00
bprashanth a46a849b9e Promote source ip annotations to beta 2016-10-19 13:39:37 -07:00
derekwaynecarr d5c45e8892 requests.storage is a standard resource name 2016-10-19 15:54:08 -04:00
Kubernetes Submit Queue 91b7e1f9c3 Merge pull request #34638 from screeley44/k8-get-sc
Automatic merge from submit-queue

Adding default StorageClass annotation printout for resource_printer and describer and some refactoring

adding ISDEFAULT for _kubectl get storageclass_ output

```
[root@screeley-sc1 gce]# kubectl get storageclass
NAME            TYPE                   ISDEFAULT
another-class   kubernetes.io/gce-pd   NO        
generic1-slow   kubernetes.io/gce-pd   YES       
generic2-fast   kubernetes.io/gce-pd   YES       
```

```release-note
Add ISDEFAULT to kubectl get storageClass output
```

@kubernetes/sig-storage
2016-10-19 11:36:08 -07:00
Scott Creeley 86f1a94be5 Adding default StorageClass annotation printout for resource_printer 2016-10-19 10:59:07 -04:00
Kubernetes Submit Queue 3fc8cff07d Merge pull request #35071 from thockin/volume-mount-merge-key
Automatic merge from submit-queue

Change merge key for VolumeMount to mountPath

Fixes #34800
2016-10-19 00:21:03 -07:00
Kubernetes Submit Queue 2ea4e1f066 Merge pull request #33352 from smarterclayton/unified_defaulters
Automatic merge from submit-queue

Split conversion and defaulting

Separate conversion and defaulting.   Defaulting occurs mixed with conversion today - change the server so that the `VersioningCodec` performs defaulting on the external type during decoding.  

* Add a new method to `Scheme` - `func (*runtime.Scheme) Default(runtime.Object)` - that takes an object and performs defaulting.  
* Call `Default` during decoding and at static initialization time
* Use the new `defaulter-gen` to generate top level object defaulters (`v1.Pod`) at build time for any type that needs to perform defaulting.  
* Add tests and alter the existing code to adapt as necessary
* Fix a few bugs in conversions that depended on defaulting behavior

---

Step 1 of decoupling conversion and defaulting. The generator will assist in creating top level defaulters that in a single method invoke all nested defaulters, preventing the need to recurse via reflection or conversion. These top level defaulters will be registered in the scheme and invoked instead of the nested recursion path. This will set the stage for a future generator, capable of creating defaulters from embedded struct tags on external types. However, we must gradually switch these over.

The immediate goal here is to split defaulting and conversion so that the unsafe convertor can be used to maximum potential (we would be able to use direct memory conversion for any identical nested struct, even those that must be defaulted).

The generator uses `k8s:defaulter-gen=TypeMeta` on most public packages to flag any top level type that has defaulters to get a `SetObjectDefaults_NAME` function created (types that don't have defaulters won't have functions).  This also creates a `RegisterDefaults` method that applies a default to an interface{} and returns true if the object was handled.  Existing defaults are left as is.

Add a test to verify old and new path generate the same outcomes.  Defaulter will move to gengo before this is merged, and subsequent PRs will remove defaulting during conversion and have the VersioningCodec apply defaults.
2016-10-18 20:34:13 -07:00
Kubernetes Submit Queue 103dc654a9 Merge pull request #35023 from k82cn/remove_empty_line
Automatic merge from submit-queue

Removed empty line.
2016-10-18 18:27:29 -07:00
Clayton Coleman 3ee591d7ab
Invoke init container defaulting in conversion
Because annotations...

Remove old references to DefaultingInterface in manual conversions.
2016-10-18 21:07:35 -04:00
Clayton Coleman 1694cfb72d
Make defaulting part of versioning codec
Most normal codec use should perform defaulting. DirectCodecs should not
perform defaulting. Update the defaulting_test to fuzz the list of known
defaulters. Use the new versioning.NewDefaultingCodec() method.
2016-10-18 21:07:35 -04:00
Clayton Coleman 742fb698d4
generated: Remove defaulting from conversion 2016-10-18 21:07:34 -04:00
Clayton Coleman 4f8d1a86e5
Add a defaulting test that verifies old and new defaults are equivalent 2016-10-18 21:07:34 -04:00
Clayton Coleman 89b3a0d863
Register new defaulting functions 2016-10-18 21:07:34 -04:00
Clayton Coleman 745690a2d4
generated: Defaulters 2016-10-18 21:07:33 -04:00
Clayton Coleman 4324e39393
Flag all packages as needing defaulters 2016-10-18 21:07:33 -04:00
Clayton Coleman 5062406b77
Hand generated conversion should check nil 2016-10-18 21:07:32 -04:00
Tim Hockin 837443d37a Change merge key for VolumeMount to mountPath 2016-10-18 15:27:12 -07:00
Kubernetes Submit Queue c592a46e16 Merge pull request #28300 from pweil-/psp-seccomp
Automatic merge from submit-queue

Add PSP support for seccomp profiles

Seccomp support for PSP.  There are still a couple of TODOs that need to be fixed but this is passing tests.

One thing of note, since seccomp is all being stored in annotations right now it breaks some of the assumptions we've stated for the provider in terms of mutating the passed in pod.  I've put big warning comments around the pieces that do that to make sure it's clear and covered the rollback in admission if the policy fails to validate.

@sttts @pmorie @erictune @smarterclayton @liggitt
2016-10-18 09:26:09 -07:00
Rodolfo Carvalho c75ddfe76d Fix some typos 2016-10-18 18:24:38 +02:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
Klaus Ma 4b6cd9aece Removed empty line. 2016-10-18 17:14:05 +08:00
pweil- 49e14744db support seccomp in psp 2016-10-17 14:49:02 -04:00
mbohlool 0191433d58 Generated protobufs 2016-10-17 09:11:20 -07:00
mbohlool 25afcc5522 Add +optional tag to all fields with omitempty json tag 2016-10-17 08:52:13 -07:00
Kubernetes Submit Queue fd52ae5215 Merge pull request #31903 from screeley44/k8-validation-test
Automatic merge from submit-queue

Add unit test for bad ReclaimPolicy and valid ReclaimPolicy in /pkg/api/validation

unit tests for validation.go regarding PersistentVolumeReclaimPolicy (bad value and good value)

see PR: #30304
2016-10-15 11:36:07 -07:00
Brendan Burns d9d06f6680 Add some checking for the presence of the same key twice. 2016-10-13 21:58:44 -07:00
Jess Frazelle db33b491cc
update generated protobuf
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-13 21:22:59 -07:00
Kubernetes Submit Queue a0d4878ea9 Merge pull request #30145 from markturansky/limit_range_pvc
Automatic merge from submit-queue

Add PVC storage to LimitRange

This PR adds the ability to add a LimitRange to a namespace that enforces min/max on `pvc.Spec.Resources.Requests["storage"]`.

@derekwaynecarr @abhgupta @kubernetes/sig-storage 

Examples forthcoming. 

```release-note
pvc.Spec.Resources.Requests min and max can be enforced with a LimitRange of type "PersistentVolumeClaim" in the namespace
```
2016-10-12 20:26:59 -07:00
Mike Danese 25e4dccefe kubeadm: fix conversion macros and add kubeadm to round trip testing 2016-10-12 13:26:23 -07:00
Mike Danese d9cc8119ef allow apigroups to opt out of proto round trip testing 2016-10-12 10:01:38 -07:00
Marcin Wielgus 859077b701 Make "Unschedulable" reason a constant in api 2016-10-12 17:43:24 +02:00
Kubernetes Submit Queue f9e8ee8fe8 Merge pull request #33905 from kargakis/replica-set-conditions
Automatic merge from submit-queue

Replica set conditions API

Partially addresses https://github.com/kubernetes/kubernetes/issues/32863

@kubernetes/sig-apps
2016-10-12 05:10:45 -07:00
Michail Kargakis 5589469948 Generated code for RS/RC conditions 2016-10-10 18:34:01 +02:00
Michail Kargakis 0701232996 api: add Conditions in replication controllers 2016-10-10 18:34:00 +02:00
Kubernetes Submit Queue 049ad98581 Merge pull request #34010 from soltysh/fix_edit_sj
Automatic merge from submit-queue

Match GroupVersionKind against specific version

Currently when multiple GVK match a specific kind in `KindForGroupVersionKinds` only the first will be matched, which not necessarily will be the correct one. I'm proposing to extend this to pick the best match, instead.

Here's my problematic use-case, of course it involves ScheduledJobs 😉:
I have a `GroupVersions` with `batch/v1` and `batch/v2alpha1` in that order. I'm calling `KindForGroupVersionKinds` with kind `batch/v2alpha1 ScheduledJob` and that currently results this matching first `GroupVersion`, instead of picking more concrete one. There's a [clear description](ee77d4e6ca/pkg/api/unversioned/group_version.go (L183)) why it is on single `GroupVersion`, but `GroupVersions` should pick this more carefully.

@deads2k this is your baby, wdyt?
2016-10-10 06:16:29 -07:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
markturansky 0d40104c1d add pvc storage to LimitRange 2016-10-05 17:31:15 -04:00
Maciej Szulik 69f751a2a4 Match GroupVersionKind against specific version 2016-10-05 20:58:56 +02:00
Chao Xu 75cc05de82 manual changes to let client-gen use versioned options 2016-10-04 20:39:29 -07:00
David Ashpole fed3f37eef Split NodeDiskPressure into NodeInodePressure and NodeDiskPressure 2016-10-03 11:42:56 -07:00
Kubernetes Submit Queue 3933ddbc9a Merge pull request #33821 from sttts/sttts-sysctl-psp-fixes
Automatic merge from submit-queue

Improve sysctl psp tests

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

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

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-10-03 07:54:24 -07:00
Ilya Dmitrichenko abc0a98d25
Replace references to http://releases.k8s.io/HEAD/docs/user-guide/ 2016-10-02 11:44:40 +01:00
Dr. Stefan Schimanski e6acc08d96 Return error for empty sysctl names 2016-09-30 17:56:37 +02:00
Maciej Kwiek 9e1c886a80 Validate None Service ClusterIP against LB type
If the Service is a Load Balancer, it should not have None Cluster IP.
If it does, Service validation fails.
2016-09-29 10:17:29 +02:00
Doug Davis 9d5bac6330 Change minion to node
Contination of #1111

I tried to keep this PR down to just a simple search-n-replace to keep
things simple.  I may have gone too far in some spots but its easy to
roll those back if needed.

I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.

I rolled back some of this from a previous commit because it just got
to big/messy. Will follow up with additional PRs

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-09-28 10:53:30 -07:00
Michail Kargakis d8dc2aac07 extensions: generated code for minReadySeconds/availableReplicas 2016-09-28 11:25:13 +02:00
Michail Kargakis 1df4ee3a9d Custom conversion reactions to minReadySeconds/availableReplicas 2016-09-28 11:06:40 +02:00
Michail Kargakis f7c232b8c6 extensions: add minReadySeconds/availableReplicas to replica sets 2016-09-28 11:06:40 +02:00
Kubernetes Submit Queue df064881d2 Merge pull request #31005 from simonswine/feature-flocker-dyn-provisioning
Automatic merge from submit-queue

Dynamic provisioning for flocker volume plugin

Refactor flocker volume plugin
* [x] Support provisioning beta (#29006)
* [x] Support deletion
* [x] Use bind mounts instead of /flocker in containers

* [x] support ownership management or SELinux relabeling.
* [x] adds volume specification via datasetUUID (this is guranted to be unique)

I based my refactor work to replicate pretty much GCE-PD behaviour 

**Related issues**: #29006 #26908

@jsafrane @mattbates @wallrj @wallnerryan
2016-09-28 01:46:43 -07:00
Kubernetes Submit Queue 2d881ca1e9 Merge pull request #33536 from hongchaodeng/revert-33101-etcd_fix
Automatic merge from submit-queue

Revert "Work around the etcd watch issue"

Reverts kubernetes/kubernetes#33101

Since #33393 is merged, the bug should have been fixed.
2016-09-27 23:36:16 -07:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Christian Simon 1c11047ffb Adds datasetUUID for referencing flocker datasets
* flocker datasets should be attached using an unique identifier. This
  is not the case for the name metadata used by datasetName
* allow only one of datasetUUID / datasetName specified
2016-09-27 13:19:22 +00:00
Hongchao Deng 078f2d6be9 Revert "Work around the etcd watch issue" 2016-09-26 23:54:10 -07:00
Tim Hockin 38d7c4b271 Conversion: log opted-out fields 2016-09-26 20:07:54 -07:00
Kubernetes Submit Queue 071927a59d Merge pull request #32549 from smarterclayton/gc_non_kube_legacy
Automatic merge from submit-queue

Allow garbage collection to work against different API prefixes

The GC needs to build clients based only on Resource or Kind. Hoist the
restmapper out of the controller and the clientpool, support a new
ClientForGroupVersionKind and ClientForGroupVersionResource, and use the
appropriate one in both places.

Allows OpenShift to use the GC
2016-09-23 14:06:35 -07:00
Kubernetes Submit Queue 09e0e025e8 Merge pull request #33346 from freehan/fix-lbsrcrange-update
Automatic merge from submit-queue

disallow user to update loadbalancerSourceRanges

buy myself some time to fix the root cause of #33033
2016-09-23 12:05:04 -07:00
Kubernetes Submit Queue 5f815354e0 Merge pull request #33182 from deads2k/api-13-collapse-script-references
Automatic merge from submit-queue

unify available api group versions in our scripts

There are currently many parallel lists of available group versions with slightly different syntaxes in each one.  This collapses them into a single list for us to maintain.  

Also caught spots where the lists didn't match before.

@sttts @ncdc
2016-09-23 10:06:10 -07:00
Dr. Stefan Schimanski 87356c0623 Cleanup handler chain 2016-09-23 12:03:58 +02:00
Kubernetes Submit Queue 67219f4041 Merge pull request #32867 from kargakis/move-events-sort
Automatic merge from submit-queue

kubectl: move events sorting interface to the api for general use

Split from https://github.com/kubernetes/kubernetes/pull/19343

@kubernetes/kubectl
2016-09-22 20:39:29 -07:00
Minhan Xia ba45a3f74e disallow user to update loadbalancerSourceRanges 2016-09-22 19:04:02 -07:00
Clayton Coleman 97c35fcc67
Allow garbage collection to work against different API prefixes
The GC needs to build clients based only on Resource or Kind. Hoist the
restmapper out of the controller and the clientpool, support a new
ClientForGroupVersionKind and ClientForGroupVersionResource, and use the
appropriate one in both places.
2016-09-22 15:00:58 -04:00
deads2k 7a8fa18116 update generation scripts to share API group version constants 2016-09-22 13:30:41 -04:00