Commit Graph

18450 Commits (4beba154b4b9e1b2915996fdc3f540f7767fe647)

Author SHA1 Message Date
Dr. Stefan Schimanski 4beba154b4 genericapiserver: move authz webhook plugins into k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 4077e0bba7 genericapiserver: move authn plugins into k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski f36a3d8e0c genericapiserver: cut off pkg/api.Resource dependency 2017-01-24 20:56:03 +01:00
Kubernetes Submit Queue 92c5457854 Merge pull request #40327 from yujuhong/rm_code
Automatic merge from submit-queue (batch tested with PRs 39275, 40327, 37264)

dockertools: remove some dead code

Remove `dockerRoot` that's not used anywhere.
2017-01-24 10:52:10 -08:00
Kubernetes Submit Queue 284dfb270e Merge pull request #39275 from ivan4th/fix-bad-fake-runtime-time-values
Automatic merge from submit-queue

Fix bad time values in kubelet FakeRuntimeService

These values don't affect tests but they can be confusing
for developers looking at the code for reference.
2017-01-24 10:50:14 -08:00
Kubernetes Submit Queue f18a921a03 Merge pull request #40311 from deads2k/client-13-move-util
Automatic merge from submit-queue (batch tested with PRs 40299, 40311)

move authoritative client-go util out of pkg

Move `client-go/pkg/util` which are authoritative to `client-go/util` to make it easier to reason about what comes from where.
2017-01-24 08:59:59 -08:00
Kubernetes Submit Queue 68f123dfa0 Merge pull request #37275 from xiangfeiz/cinder-rescan-scsi
Automatic merge from submit-queue

Adding rescan scsi controller for cinder

For lsilogic scsi controller, attached cinder volume does not
appear under /dev/ automatically unless do a rescan.
This approach was used in vSphere volume provider before PR #27496
dropped support for lsilogic scsi controller.
2017-01-24 06:24:59 -08:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -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
Kubernetes Submit Queue f545d6ad47 Merge pull request #40057 from MrHohn/kubectl-create-seletor
Automatic merge from submit-queue (batch tested with PRs 40328, 40057)

Allows kubectl create -f to filter by selector.

From #32544.

The underlying `seletor` infrastructrue was implemented by #32599. The test is basically copy-paste of the corresponding test for `kubectl apply -f -l`.

```release-note
kubectl create now accepts the label selector flag for filtering objects to create
```
2017-01-23 22:19:11 -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
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 245b592fac
Convert core code to metav1.ListOptions 2017-01-23 17:52:45 -05:00
Clayton Coleman a35be4e02e
Update registries to use metainternalversion list options 2017-01-23 17:52:45 -05:00
Clayton Coleman 3ba366fcf1
Switch genericapiserver to use metainternalversion.ListOptions
Decouple ListOption parsing from the scheme - instead, it is a property
of the server (and clients should use metav1.ListOptions for now).
2017-01-23 17:52:42 -05:00
Yu-Ju Hong c1d043af18 dockertools: remove some dead code 2017-01-23 14:34:56 -08:00
Clayton Coleman c12344b3b8
Tests that check metav1 2017-01-23 16:53:19 -05:00
Clayton Coleman f623a8c908
Make all groups use metav1.AddToGroupVersion for ListOptions 2017-01-23 16:53:18 -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 df831db360
Break dependency on testapi from core packages 2017-01-23 16:53:13 -05:00
Kubernetes Submit Queue 13424d874b Merge pull request #40208 from wojtek-t/smart_volume_manager
Automatic merge from submit-queue (batch tested with PRs 40205, 40208)

Make secret volume plugin use secret manager

Ref #19188

@gmarek
2017-01-23 13:40:03 -08:00
Kubernetes Submit Queue aee38b13a6 Merge pull request #40010 from sttts/sttts-timeout-error-group-resource
Automatic merge from submit-queue (batch tested with PRs 39341, 40010)

genericapiserver/api/filters: cut off pkg/api dependency and fix timeout status

The timeout status did not have a proper group version and verb. With the `RequestInfo` available we can easily create a proper status object.

As a side-product we cut off the dependency to `pkg/api` from `genericapiserver/api/filters`.

Follow-up with version negotiation is here: https://github.com/kubernetes/kubernetes/pull/40211
2017-01-23 12:23:04 -08:00
Kubernetes Submit Queue fce60637ae Merge pull request #39341 from smarterclayton/termination_log
Automatic merge from submit-queue

Improve TerminationMessagePath to be more flexible

* Support `terminationMessagePolicy: fallbackToLogsOnError` which allows pod authors to get useful information from containers as per kubernetes/community#154
* Set an upper bound on the size of the termination message path or log output to prevent callers from DoSing the master
* Add tests for running as root, non-root, and for the new terminationMessagePolicy cases.

I set the limit to 4096 bytes, but this may be too high for large pod containers.  Probably need to set an absolute bound, i.e. max message size allowed is 20k total, and we truncate if we're above that limit.

Fixes #31839, #23569

```release-note
A new field `terminationMessagePolicy` has been added to containers that allows a user to request `FallbackToLogsOnError`, which will read from the container's logs to populate the termination message if the user does not write to the termination message log file.  The termination message file is now properly readable for end users and has a maximum size (4k bytes) to prevent abuse.  Each pod may have up to 12k bytes of termination messages before the contents of each will be truncated.
```
2017-01-23 12:13:33 -08:00
Dr. Stefan Schimanski 128594d17c genericapiserver/api/filters: cut off pkg/api dependency and fix timeout status 2017-01-23 19:06:51 +01:00
Antoine Pelisse 62af7dd33d OWNERS: Update latest OWNERS files
These files have been created lately, so we don't have much information
about them anyway, so let's just:
- Remove assignees and make them approvers
- Copy approves as reviewers
2017-01-23 10:05:48 -08:00
Clayton Coleman 6ea557d4b2
Fix tests after new defaulted value added 2017-01-23 12:37:21 -05:00
Clayton Coleman 2bb2604f0b
Limit the size of the termination log and allow log input
Enforce the following limits:

12kb for total message length in container status
4kb for the termination message path file
2kb or 80 lines (whichever is shorter) from the log on error

Fallback to log output if the user requests it.
2017-01-23 12:26:38 -05:00
Clayton Coleman eff134cd5f
Use chmod to bypass umask on termination log file
os.Create() will obey the umask which results in the file being 0644
when injected in the container.
2017-01-23 12:26:37 -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
Kubernetes Submit Queue 46bfa1ee11 Merge pull request #39933 from pmorie/generic-registry-feedback
Automatic merge from submit-queue

Make generic registry easier to understand

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

This PR makes the generic registry and some areas of the api REST abstractions easier to understand by adding and clarifying comments.  These comments are based on digging that was done to implement a new API server and REST storage for resources in a wholly-new API group.

**Release note**:
```release-note
NONE
```
2017-01-23 09:17:27 -08:00
Kubernetes Submit Queue 5ea80569ae Merge pull request #40227 from deads2k/client-11-easy
Automatic merge from submit-queue

make client-go tools/auth and tools/clientcmd authoritative

These moved easily.  Pure mechanical.  I'll have a couple snip pulls for some of the more complicated packages.  `pkg/util/homedir` was a transitive that moved with. It was only used in `kubectl` and you'd need it to be consistent with `clientcmd` loading order.

@sttts
2017-01-23 09:07:17 -08:00
Kubernetes Submit Queue 1f1f3692bd Merge pull request #38445 from brendandburns/configmap2
Automatic merge from submit-queue (batch tested with PRs 38445, 40292)

Add the ability to edit fields within a config map.

Addresses part of https://github.com/kubernetes/kubernetes/issues/36222

Example command:

```console
$ kubectl edit configmap foo --config-map-data=bar
```

Will open the data element named `bar` in the `ConfigMap` named `foo` in `$EDITOR`, the edited contents are then updated back to the config map.

@kubernetes/sig-cli 

```release-note
Add a special purpose tool for editing individual fields in a ConfigMap with kubectl
```
2017-01-23 08:11:06 -08:00
Wojciech Tyczynski e0784f2e00 Propage secret volumes in secret manager 2017-01-23 16:10:01 +01:00
Wojciech Tyczynski bf7138652f SecretVolume using secret manager 2017-01-23 16:10:01 +01:00
deads2k 335ef747d6 mechanical 2017-01-23 10:03:55 -05:00
Paul Morie 22ecfe5d14 Make generic registry easier to understand 2017-01-23 09:51:09 -05:00
Kubernetes Submit Queue ff0ec5cd7a Merge pull request #40293 from deads2k/generic-27-announce
Automatic merge from submit-queue

separate announce factories

We caught this part way through Daniel's refactor from 1.5.  Have to separate announce factories to be able to double register types for client-go.

@kubernetes/sig-apimachinery-misc
2017-01-23 06:51:08 -08:00
Kubernetes Submit Queue 23694f9939 Merge pull request #40277 from liggitt/builtin-nil-check
Automatic merge from submit-queue (batch tested with PRs 40196, 40143, 40277)

avoid incorrect short-circuit of client-ca setup

PasswordFile options should only affect computation of the SupportsBasicAuth field, not short-circuit setting up the client ca certpool
2017-01-23 05:39:05 -08:00
Kubernetes Submit Queue 71c918d95c Merge pull request #40143 from peay/event-when-cronjob-cannot-start
Automatic merge from submit-queue (batch tested with PRs 40196, 40143, 40277)

Emit warning event when CronJob cannot determine starting time

**What this PR does / why we need it**:
In #39608, we've modified the error message for when a CronJob has too many unmet starting times to enumerate to figure out the next starting time. This makes it more "actionable", and the user can now set a deadline to avoid running into this. However, the error message is still only controller level AFAIK and thus not exposed to the user. From his perspective, there is no way to tell why the CronJob is not scheduling the next instance.

The PR adds a warning event in addition to the error in the controller manager's log. 

**Which issue this PR fixes**: This is an addition to PR #39608  regarding #36311.

**Special notes for your reviewer**: cc @soltysh 

**Release note**:

```release-note
```
2017-01-23 05:39:03 -08:00
Kubernetes Submit Queue 0c41d538fc Merge pull request #40196 from resouer/remove-todo
Automatic merge from submit-queue

Remove TODOs to refactor kubelet labels

To address #39650 completely.

Remove label refactoring TODOs, we don't need them since CRI rollout is on the way.
2017-01-23 05:07:32 -08:00
deads2k 7cc9702402 separate announce factories 2017-01-23 08:02:14 -05:00
Kubernetes Submit Queue ee70adb9e7 Merge pull request #39243 from k82cn/avoid_keyword
Automatic merge from submit-queue

Avoid keyword as var name.

fixes typo
2017-01-23 04:22:33 -08: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
Kubernetes Submit Queue 5356a16f01 Merge pull request #40066 from vwfs/reduce_azure_polling_time
Automatic merge from submit-queue

Set custom PollingDelay of 5 seconds for Azure VirtualMachinesClient

The default polling delay of 1 minute results in very long delays when
an Azure Disk is attached to a node. It gets worse as go-autorest
doubles the default delay to 2 minutes.

Please see: https://github.com/kubernetes/kubernetes/issues/35180#issuecomment-273085063

Only the PollingDelay for VirtualMachinesClient is modified here to
avoid too much pressure on Azure quotas.

Release Nodes:
```release-note
Reduce time needed to attach Azure disks
```
2017-01-23 01:16:25 -08:00
Kubernetes Submit Queue 2ab65eede6 Merge pull request #40199 from foxyriver/no-use
Automatic merge from submit-queue (batch tested with PRs 39199, 37273, 29183, 39638, 40199)

declare it, but no use it

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

declare it, but no use it

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-23 00:30:17 -08:00
Kubernetes Submit Queue b84fdaece1 Merge pull request #29183 from kargakis/fix-conversion-annotation
Automatic merge from submit-queue (batch tested with PRs 39199, 37273, 29183, 39638, 40199)

Invalidate updates to non-convertible selectors

Follow-up to https://github.com/kubernetes/kubernetes/pull/24733

@deads2k @lavalamp @smarterclayton @bgrant0607 @liggitt @mfojtik 

First commit contains the necessary validation for replication controllers with non-convertible selectors.
Second commit updates the name for the annotation added during conversion since it is invalid currently:

```
+++ [0719 11:19:54] Running tests without code coverage
--- FAIL: TestValidateUpdate (0.00s)
    strategy_test.go:191: unexpected error: [metadata.annotations: Invalid value: "kubernetes.io/non-convertible/spec.selector": must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName', metadata.annotations: Invalid value: "kubernetes.io/non-convertible/spec.selector": must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName']
FAIL
FAIL    k8s.io/kubernetes/pkg/registry/controller   0.015s
```
2017-01-23 00:30:14 -08:00