Commit Graph

2298 Commits (0e78dd2d17b0fe314780005d6e06a21822fb34ff)

Author SHA1 Message Date
Matt Matejczyk 536cee71b4 Merge branch 'master' into annotation 2018-10-19 13:54:06 -04:00
Matt Matejczyk 4cdab7c985 Rename and update the doc. 2018-10-19 13:11:56 -04:00
Matt Matejczyk 7f7a4590b9 Specify in the documentation that the timestamp will be expressed in milliseconds. 2018-10-19 12:19:02 -04:00
Brad Hoekstra 409a48ef91 Set the default for EnableServiceLinks only in Pod 2018-10-18 13:44:21 -04:00
Han Kang 56cd8ecf08 fix lint issues in the apis/abac directory (except latest.go) 2018-10-18 09:05:04 -07:00
Matt Matejczyk 803ee8426d Add EndpointsLastTriggerTime annotation. 2018-10-18 09:25:27 -04:00
k8s-ci-robot 0652e098d0
Merge pull request #67547 from pbarker/audit-api
dynamic audit configuration api
2018-10-17 16:19:39 -07:00
Slava Semushin 14c969b604 Remove myself from OWNERS files. 2018-10-16 22:47:44 +01:00
Patrick Barker b8e1250487 adds dynamic audit api generated 2018-10-16 13:07:27 +00:00
Patrick Barker 381d0a5d14 adds dynamic audit api 2018-10-16 06:46:34 -06:00
k8s-ci-robot d20912c83f
Merge pull request #69728 from SataQiu/fix-2018101201
fix some typos
2018-10-13 21:47:08 -07:00
k8s-ci-robot b462f37639
Merge pull request #68281 from TinySong/update-api-import
update import in doc.go of staging/src/k8s.io/api/storage/v1
2018-10-12 19:13:24 -07:00
k8s-ci-robot 53e85280f4
Merge pull request #69714 from ericchiang/owners
Remove ericchiang from OWNERS files
2018-10-12 16:01:52 -07:00
k8s-ci-robot e23a3af013
Merge pull request #67802 from krmayankk/dockershimtests
Implement RunAsGroup Strategy in PSP
2018-10-12 11:19:39 -07:00
SataQiu e1d5b97f3f fix some typos 2018-10-12 22:29:18 +08:00
k8s-ci-robot b3033a7278
Merge pull request #67934 from tanshanshan/typo828
fix spelling mistakes
2018-10-11 18:26:24 -07:00
Eric Chiang 766f5875bf Remove ericchiang from OWNERS files
Kept myself in the OpenID Connect ones for now.
2018-10-11 18:11:15 -07:00
knight ce7ad36b23
cleanup pkg/apis/core/types.go
cleanup pkg/apis/core/types.go
2018-10-11 22:40:09 +08:00
Mayank Kumar bc3e3afc46 api changes for psp runasgroup policy 2018-10-09 17:32:09 -07:00
k8s-ci-robot 8fa5d386a1
Merge pull request #66605 from islinwb/default_RevisionHistoryLimit
Default extensions/v1beta1 Deployment's RevisionHistoryLimit to MaxInt32
2018-10-08 10:41:46 -07:00
Rongxiang Song 5de60655cd Add canonical import paths to storage packages
The comment will ensure that only imports with
this path will compile.This is needed to make sure
that the vanity url k8s.io is used as the import path
instead of github.com.

See https://golang.org/doc/go1.4#canonicalimports
for more details.
2018-10-08 17:52:13 +08:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
k8s-ci-robot 0b3a5cd64f
Merge pull request #65135 from stlaz/psp_group_mayrunas
Add "MayRunAs" value among other GroupStrategies
2018-09-29 19:44:55 -07:00
Stanislav Laznicka a577b50012
Add "MayRunAs" value among other GroupStrategies
Adds "MayRunAs" value among other group strategies. This strategy
allows to define a certain range of GIDs for FSGroupStrategy and
SupplementalGroupStrategy in a PSP.

This new strategy works similarly to the "MustRunAs" one, except that
when no GID is specified in a pod/container security context then no
GID is generated for the respective containers.

Resolves #56173
2018-09-27 12:47:21 +02:00
k8s-ci-robot f289353b1a
Merge pull request #68575 from prameshj/ep-validation
Allow nodeName updates when endPoint is updated.
2018-09-25 14:41:01 -07:00
k8s-ci-robot a67689dfca
Merge pull request #68245 from jingyih/remove_tagName_in_goDoc
*: Remove comment tags in GoDoc
2018-09-25 06:13:23 -07:00
k8s-ci-robot 0805860dba
Merge pull request #67870 from yue9944882/refactor/externalize-resource-quota-admission-controller
Externalize resource quota admission controller & controller reconciliation
2018-09-25 02:41:40 -07:00
Brad Hoekstra a596030cb3 Update bazel 2018-09-22 00:10:08 -04:00
Brad Hoekstra 42da186b62 Address review comments 2018-09-21 20:06:32 -04:00
Brad Hoekstra 2c5cc79eed Add comment to specify default 2018-09-21 16:21:32 -04:00
Brad Hoekstra ac8799a80d kubelet: Make service environment variables optional 2018-09-17 16:27:36 -04:00
Pavithra Ramesh e588ae5e04 Allow nodeName updates when endPoint is updated.
One scenario where nodeName can change for the same ip address is if
the endpoints are in hostNetwork mode and nodes are being added/deleted.
With the current validation check, if endpoints controller misses a pod
delete event, future endpoint updates will never succeed.

removed unused helper functions
2018-09-14 14:00:46 -07:00
Jingyi Hu 61117761cd *: Remove comment tags in GoDoc
Adding blank line between comment tag and package name in doc.go. So
that the comment tags such as '+k8s:deepcopy-gen=package' do not show up
in GoDoc.
2018-09-13 20:27:32 -07:00
Xing Yang 897e3c8d11 Add generated files 2018-09-12 17:34:51 -07:00
Xing Yang 6ec1ebd6ce Make APIGroup optional and modify validation 2018-09-12 17:05:29 -07:00
Kubernetes Submit Queue c3062bae21
Merge pull request #68233 from luxas/ccm_cleanup
Automatic merge from submit-queue (batch tested with PRs 68171, 67945, 68233). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Move the CloudControllerManagerConfiguration to an API group in `cmd/`

**What this PR does / why we need it**:
This PR is the last piece of https://github.com/kubernetes/kubernetes/issues/67233.
It moves the `CloudControllerManagerConfiguration` to its own `cloudcontrollermanager.config.k8s.io` config API group, but unlike the other components this API group is "private" (only available in `k8s.io/kubernetes`, which limits consumer base), as it's located entirely in `cmd/` vs a staging repo.
This decision was made for now as we're not sure what the story for the ccm loading ComponentConfig files is, and probably a "real" file-loading ccm will never exist in core, only helper libraries. Eventually the ccm will only be a library in any case, and implementors will/can use the base types the ccm library API group provides. It's probably good to note that there is no practical implication of this change as the ccm **cannot** read ComponentConfig files. Hencec the code move isn't user-facing.

With this change, we're able to remove `pkg/apis/componentconfig`, as this was the last consumer. That is hence done in this PR as well (so the move is easily visible in git, vs first one "big add" then a "big remove"). The only piece of code that was used was the flag helper structs, so I moved them to `pkg/util/flag` that I think makes sense for now.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: kubernetes/community#2354

**Special notes for your reviewer**:

This PR builds on top of (first two commits, marked as `Co-authored by: @stewart-yu`) https://github.com/kubernetes/kubernetes/pull/67689

**Release note**:

```release-note
NONE
```
/assign @liggitt @sttts @thockin @stewart-yu
2018-09-05 21:36:41 -07:00
Lucas Käldström 3ff1e53111
Move the flag registration code from pkg/apis/componentconfig to pkg/util/flag 2018-09-05 14:03:05 +03:00
Lucas Käldström 7e10810ed0
Move CloudControllerManagerConfiguration from pkg/apis/componentconfig to cmd/cloud-controller-manager/app/apis/config 2018-09-05 14:02:25 +03:00
Janet Kuo 47d06c446d Validate Job .spec.ttlSecondsAfterFinished; clear it when feature disabled
1. If TTLAfterFinished feature is enabled, the value should be non-negative.
2. If TTLAfterFinished feature is disabled, the field value should not
be kept.
2018-09-04 14:21:14 -07:00
Janet Kuo 1d6dd86407 Autogen API docs 2018-09-04 11:35:30 -07:00
Janet Kuo 209b32684e Add TTLAfterFinished alpha feature 2018-09-04 11:35:30 -07:00
Kubernetes Submit Queue 9c86087dba
Merge pull request #63011 from NickrenREN/local-plugin-change
Automatic merge from submit-queue (batch tested with PRs 63011, 68089, 67944, 68132). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Support both directory and block device for local volume plugin FileSystem VolumeMode

Support both directory and block device for local volume plugin FileSystem VolumeMode 

xref: [local storage dynamic provisioning design #1914](https://github.com/kubernetes/community/pull/1914)

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

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Support both directory and block device for local volume plugin FileSystem VolumeMode 
```
2018-09-04 10:24:36 -07:00
stewart-yu cef2ab756c [kube-controller-manager] auto-generated file 2018-09-04 19:40:10 +08:00
stewart-yu a226928dc9 [kube-controller-manager] fix some reference from pkg/apis/componentconfig about kube-controller-manager api 2018-09-04 19:39:41 +08:00
stewart-yu be4a437e71 [kube-controller-manager] just only remove struct and default about KubeControllerManagerConfiguration from pkg/apis/componentconfig 2018-09-04 19:38:48 +08:00
Kubernetes Submit Queue 5b355f5d40
Merge pull request #68122 from krzysztof-jastrzebski/scale_down
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Replace scale down window

**What this PR does / why we need it**:
Replace scale down forbidden window with scale down stabilization window.

This allows scale down based on more than one sample, to avoid rapidly changing size up and down for controllers with fluctuating load.

A bit more in https://docs.google.com/document/d/1IdG3sqgCEaRV3urPLA29IDudCufD89RYCohfBPNeWIM

This PR is copy of #67771 with resolved comments.

**Release note**:
```release-note
Replace scale down forbidden window with scale down stabilization window. Rather than waiting a fixed period of time between scale downs HPA now scales down to the highest recommendation it during the scale down stabilization window.
```
2018-09-03 21:39:02 -07:00
Kubernetes Submit Queue ed958b7d79
Merge pull request #68019 from damemi/hpa-v2beta2-conversion-fix
Automatic merge from submit-queue (batch tested with PRs 67397, 68019). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix conversion for autoscaling/v1 ObjectMetricSource and add fuzzer

**What this PR does / why we need it**:
Selectors in ObjectMetricSource's weren't being persisted through roundtrip conversions, and this wasn't caught because we had no fuzzer testing MetricIdentifier selectors

**Which issue(s) this PR fixes**:
none

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-09-03 08:23:31 -07:00
Kubernetes Submit Queue 5e9a3adafc
Merge pull request #68021 from krzysztof-jastrzebski/hpa5
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Increase Horizontal Pod Autoscaler update frequency to every 15s

**What this PR does / why we need it**:
PR increases Horizontal Pod Autoscaler default update interval (30s -> 15s). It will improve HPA reaction time for metric changes.

**Release note**:
```release-note
Increase Horizontal Pod Autoscaler default update interval (30s -> 15s). It will improve HPA reaction time for metric changes.
```
2018-09-03 06:23:40 -07:00
NickrenREN 159a4358e8 auto generated files 2018-09-03 13:34:26 +08:00
NickrenREN 25caf91b1c add fstype for local volume source 2018-09-03 09:49:39 +08:00
Lucas Käldström b17d7bf9b3
autogenerated 2018-09-02 14:11:11 +03:00
Lucas Käldström 3187f2221a
Refactor the kube-controller-manager ComponentConfig structs to they can be moved out 2018-09-02 14:10:21 +03:00
Kubernetes Submit Queue 39004e852b
Merge pull request #64283 from jessfraz/ProcMountType
Automatic merge from submit-queue (batch tested with PRs 64283, 67910, 67803, 68100). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add a ProcMount option to the SecurityContext & AllowedProcMountTypes to PodSecurityPolicy

So there is a bit of a chicken and egg problem here in that the CRI runtimes will need to implement this for there to be any sort of e2e testing.

**What this PR does / why we need it**: This PR implements design proposal https://github.com/kubernetes/community/pull/1934. This adds a ProcMount option to the SecurityContext and AllowedProcMountTypes to PodSecurityPolicy

Relies on https://github.com/google/cadvisor/pull/1967

**Release note**:

```release-note
ProcMount added to SecurityContext and AllowedProcMounts added to PodSecurityPolicy to allow paths in the container's /proc to not be masked.
```

cc @Random-Liu @mrunalp
2018-08-31 16:46:33 -07:00
Krzysztof Jastrzebski b54524075d Update auto generated files. 2018-08-31 20:26:04 +02:00
Krzysztof Jastrzebski 958cba1c82 Replace scale down forbidden window
Replacement is scale down stabilization window. HPA will scale down only
    to max of recommendations it made during that window. More details in

    https://docs.google.com/document/d/1IdG3sqgCEaRV3urPLA29IDudCufD89RYCohfBPNeWIM
2018-08-31 20:24:38 +02:00
Kubernetes Submit Queue 2548fb08cd
Merge pull request #68068 from krzysztof-jastrzebski/hpas2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Change CPU sample sanitization in HPA.

**What this PR does / why we need it**:
Change CPU sample sanitization in HPA.
    Ignore samples if:
    - Pod is beeing initalized - 5 minutes from start defined by flag
        - pod is unready
        - pod is ready but full window of metric hasn't been colected since
        transition
    - Pod is initialized - 5 minutes from start defined by flag:
        - Pod has never been ready after initial readiness period.

**Release notes:**
```release-note
Improve CPU sample sanitization in HPA by taking metric's freshness into account.
```
2018-08-31 10:17:44 -07:00
Jess Frazelle 1a4cf7a36e
make update
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 18:24:23 -04:00
Jess Frazelle 40d238b91a
address comments
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 17:53:34 -04:00
Krzysztof Jastrzebski 62f771fbd4 Update auto generated files. 2018-08-30 23:13:33 +02:00
Krzysztof Jastrzebski 5357bf9eac Change CPU sample sanitization in HPA.
Ignore samples if:
- Pod is beeing initalized - 5 minutes from start defined by flag
    - pod is unready
    - pod is ready but full window of metric hasn't been colected since
    transition
- Pod is initialized - 5 minutes from start defined by flag:
    - Pod has never been ready after initial readiness period.
2018-08-30 23:13:14 +02:00
Jess Frazelle 30dcca6233
ProcMount: add api options and feature gate
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:40:02 -04:00
Kubernetes Submit Queue 37b29297aa
Merge pull request #67432 from lichuqiang/topo_provision_beta
Automatic merge from submit-queue (batch tested with PRs 67745, 67432, 67569, 67825, 67943). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Move volume dynamic provisioning scheduling to beta

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

*  Combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one
* Add allowedTopologies description in kubectl

**Special notes for your reviewer**:
Wait until related e2e and downside plugins are ready.

/hold

**Release note**:

```release-note
Move volume dynamic provisioning scheduling to beta (ACTION REQUIRED: The DynamicProvisioningScheduling alpha feature gate has been removed. The VolumeScheduling beta feature gate is still required for this feature)
```
2018-08-29 15:19:34 -07:00
Mike Dame 3bb36411da Fix conversion for autoscaling/v1 ObjectMetricSource and add MetricIdentifier fuzzer
Selectors in ObjectMetricSource's weren't being persisted through roundtrip conversions, and this wasn't caught because we had no fuzzer testing MetricIdentifier selectors
2018-08-29 15:29:19 -04:00
Krzysztof Jastrzebski a12193aff6 Increase Horizontal Pod Autoscaler update frequency (every 30s -> every
15s).
2018-08-29 20:02:01 +02:00
lichuqiang 4c43d626f2 related test update 2018-08-29 10:30:16 +08:00
lichuqiang b4a57f6855 combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one 2018-08-29 10:30:08 +08:00
Xing Yang de00a66370 Modify DataSource comments 2018-08-28 13:26:53 -07:00
Xing Yang 9c1b29ece1 Modify comments for DataSource 2018-08-28 13:26:52 -07:00
Xing Yang 2e4f6eca0e Clarify comments for DataSource 2018-08-28 13:26:52 -07:00
Xing Yang 46fdfeb4eb Modify comments for DataSource 2018-08-28 13:26:52 -07:00
Xing Yang 5a6c5b07a2 Address Tim's comments 2018-08-28 13:26:51 -07:00
Xing Yang 2a9cff2b03 Add generated files 2018-08-28 13:26:51 -07:00
Xing Yang e4034e2bab Add validation for feature gate 2018-08-28 13:23:52 -07:00
Xing Yang 34f62ae45e Add APIGroup to TypedLocalObjectReference 2018-08-28 13:23:52 -07:00
xing-yang e4c82b3d7b Add TypedLocalObjectReference and DataSource
This PR adds TypedLocalObjectReference in the core API and adds
DataSource in PersistentVolumeClaimSpec.
2018-08-28 13:23:52 -07:00
Kubernetes Submit Queue 2eb14e3007
Merge pull request #64973 from nokia/k8s-sctp
Automatic merge from submit-queue (batch tested with PRs 67694, 64973, 67902). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

SCTP support implementation for Kubernetes

**What this PR does / why we need it**: This PR adds SCTP support to Kubernetes, including Service, Endpoint, and NetworkPolicy.

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

**Special notes for your reviewer**:

**Release note**:

```release-note

SCTP is now supported as additional protocol (alpha) alongside TCP and UDP in Pod, Service, Endpoint, and NetworkPolicy.  

```
2018-08-28 07:21:18 -07:00
tanshanshan a83c4dbd19 fix spelling mistakes 2018-08-28 17:12:36 +08:00
Kubernetes Submit Queue 583dd0ff6b
Merge pull request #64597 from wteiken/add_review_annotations2
Automatic merge from submit-queue (batch tested with PRs 64597, 67854, 67734, 67917, 67688). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow ImageReview backend to add audit annotations.

**What this PR does / why we need it**: 
This can be used to create annotations that will allow auditing of the created 
pods.

The change also introduces "fail open" audit annotations in addition to the
previously existing pod annotation for fail open.  The pod annotations for 
fail open will be deprecated soon.


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

**Special notes for your reviewer**:

**Release note**:
```release-note
Allow ImageReview backend to return annotations to be added to the created pod.
```
2018-08-27 22:18:06 -07:00
Kubernetes Submit Queue 344b915484
Merge pull request #66843 from verult/validate-allowedtopologies
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added set and map structural validation for AllowedTopologies

**What this PR does / why we need it**: Adding structural validation to AllowedTopologies field in StorageClass.

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

**Release note**:

```release-note
AllowedTopologies field inside StorageClass is now validated against set and map semantics. Specifically, there cannot be duplicate TopologySelectorTerms, MatchLabelExpressions keys, and TopologySelectorLabelRequirement Values.
```
2018-08-27 15:09:52 -07:00
Mike Dame 77d7f9cfa2 Generate files and modifications for autoscaling/v2beta2 and custom_metrics/v1beta2 2018-08-27 11:07:53 -04:00
Mike Dame a79916fa84 Update autoscaling conversion and validation for v2beta2 inclusion 2018-08-27 11:07:52 -04:00
Mike Dame 5d1ee1640b Autoscaling v2beta2 and custom metrics v1beta2 APIs 2018-08-27 11:07:52 -04:00
yue9944882 b8f4aa3516 move util funcs 2018-08-27 21:49:01 +08:00
Laszlo Janosi ebc16c31af bazel definition updated for pkg/apis/networking/validation/ 2018-08-27 05:59:50 +00:00
Laszlo Janosi cbe94df8c6 gofmt update 2018-08-27 05:59:50 +00:00
Laszlo Janosi e466bdc67e Changes according to the approved KEP. SCTP is supported for HostPort and LoadBalancer. Alpha feature flag SCTPSupport controls the support of SCTP. Kube-proxy config parameter is removed. 2018-08-27 05:58:36 +00:00
Laszlo Janosi a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
Michael Taufen 1b7d06e025 Kubelet creates and manages node leases
This extends the Kubelet to create and periodically update leases in a
new kube-node-lease namespace. Based on [KEP-0009](https://github.com/kubernetes/community/blob/master/keps/sig-node/0009-node-heartbeat.md),
these leases can be used as a node health signal, and will allow us to
reduce the load caused by over-frequent node status reporting.

- add NodeLease feature gate
- add kube-node-lease system namespace for node leases
- add Kubelet option for lease duration
- add Kubelet-internal lease controller to create and update lease
- add e2e test for NodeLease feature
- modify node authorizer and node restriction admission controller
to allow Kubelets access to corresponding leases
2018-08-26 16:03:36 -07:00
Kubernetes Submit Queue 663551bebd
Merge pull request #67252 from jbartosik/metric-sanitization
Automatic merge from submit-queue (batch tested with PRs 66916, 67252, 67794, 67619, 67328). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix HPA sample sanitization

**What this PR does / why we need it**: @mwielgus pointed out a case when HPA fails as a result of my changes to HPA algorithm:
- Have pods that use a lot of CPU during initilization, become ready right after they initialize,
- Trigger a scale up,
- When new pods become ready will will count their usage (even though it's not related to any work that needs doing),
- This triggers another scale up, even though existing pods can handle work, no problem.

The fix is:
- Use all samples for non-cpu metrics.
- Only use CPU samples if:
  - Pod is ready and was started more than 2 minutes ago, or
  - Pod is unready and last readiness change happened more than 10s after it was started.

Reasoning behind this in: https://docs.google.com/document/d/1UdtYedhmCxjaJIQi6hwJMY0eHQQKxlVD8lSHZC1BPOA/edit

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Replace scale up forbidden window with disregarding CPU samples collected when pod was initializing.
```
2018-08-24 15:25:07 -07:00
Joachim Bartosik 4fd6a1684d Make HPA more configurable
Duration of initialization taint on CPU and window of initial readiness
setting controlled by flags.

Adding API violation exceptions following example of e50340ee23
2018-08-24 13:13:02 +02:00
Di Xu 7f8a59162b auto-generated 2018-08-24 10:58:09 +08:00
Di Xu 7c68c585f4 use external KubeSchedulerConfiguration 2018-08-24 10:58:09 +08:00
Wilfried Teiken 73c522f79c Allow ImageReview backend to add audit annotations.
This can be used to create annotations that will allow auditing of the created
pods.

The change also introduces "fail open" audit annotations in addition to the
previously existing pod annotation for fail open.  The pod annotations for
fail open will be deprecated soon.
2018-08-23 22:53:06 -04:00
Kubernetes Submit Queue 40063e8810
Merge pull request #67737 from tallclair/runtimeclass-podapi
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Runtimeclass podapi

Adds (but doesn't implement) the RuntimeClass Pod API proposed in https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md

Based on the result (lazy consensus) of the alpha fields discussion on sig-architecture: https://groups.google.com/forum/#!topic/kubernetes-sig-architecture/y9FulL9Uq6A

For https://github.com/kubernetes/features/issues/585

**Special notes for your reviewer**:

**Release note**:
```release-note
RuntimeClass is a new API resource for defining different classes of runtimes that may be used to run containers in the cluster. Pods can select a RunitmeClass to use via the RuntimeClassName field. This feature is in alpha, and the RuntimeClass feature gate must be enabled in order to use it.
```

/sig node
/kind api-change
/priority important-soon
/milestone v1.12
2018-08-23 16:53:29 -07:00
Tim Allclair f5cc053901 regenerate files 2018-08-23 13:32:10 -07:00
Tim Allclair 4b8050e3fc Address @thockin feedback 2018-08-23 13:14:49 -07:00
Tim Allclair 87164e0b32 Generated code 2018-08-22 17:00:53 -07:00
jennybuckley c61eac7daa Update generated 2018-08-22 16:54:41 -07:00
jennybuckley 2d0ec48f9b Support dry run in admission webhooks 2018-08-22 16:26:47 -07:00
Kubernetes Submit Queue 4e76bb487e
Merge pull request #58679 from CaoShuFeng/admission_webhook
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

support annotations for admission webhook

Depends on: https://github.com/kubernetes/kubernetes/pull/58143
**Release note**:
```release-note
Support annotations for remote admission webhooks.
```
2018-08-22 15:31:34 -07:00
Tim Allclair 7f64bb649b WIP: RC pods 2018-08-22 14:26:51 -07:00
Kenjiro Nakayama c0eedf775e Make DisruptedPods in PodDisruptionBudgetStatus optional field 2018-08-22 21:59:37 +09:00
Davanum Srinivas 9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04:00
Cao Shufeng edc3e40dce run make update 2018-08-20 09:15:55 +08:00
Cao Shufeng b4a71bbd8a add annotations to admission webhook 2018-08-18 17:40:57 +08:00
Bobby (Babak) Salamat 2860743c86 Autogenerated files 2018-08-17 11:18:52 -07:00
Bobby (Babak) Salamat abb70aee98 Add a scheduler config argument to set the percentage of nodes to score 2018-08-17 11:18:51 -07:00
Cheng Xing e5cf6f5c71 Added set and map structural validation for AllowedTopologies 2018-08-16 16:27:24 -07:00
Kubernetes Submit Queue 21c2af131e
Merge pull request #67301 from dixudx/use_apimachinery_NameIsDNSSubdomain
Automatic merge from submit-queue (batch tested with PRs 67399, 67471, 66815, 67301, 55840). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

use NameIsDNSSubdomain validation from staging

**What this PR does / why we need it**:
> // TODO update all references to these functions to point to the apimachineryvalidation ones

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

**Special notes for your reviewer**:
/cc seans3
@kubernetes/sig-apps-pr-reviews 
@kubernetes/sig-api-machinery-pr-reviews 

**Release note**:

```release-note
None
```
2018-08-16 09:03:16 -07:00
Kubernetes Submit Queue c5d15cb0b8
Merge pull request #66115 from jasonrichardsmith/add-serviceAccount-fieldselector
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

added serviceAccountName to field selectors

What this PR does / why we need it:

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

Special notes for your reviewer:

```release-note
NONE
```
2018-08-15 08:24:57 -07:00
Kubernetes Submit Queue 698eb760d9
Merge pull request #66722 from luxas/reference_new_generic_structs
Automatic merge from submit-queue (batch tested with PRs 67071, 66906, 66722, 67276, 67039). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove references to the structs that have moved to their own packages

**What this PR does / why we need it**:
Follows-up https://github.com/kubernetes/kubernetes/pull/66058 and  https://github.com/kubernetes/kubernetes/pull/66059 to remove the structs that now aren't needed in `pkg/apis/componentconfig`

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
xref https://github.com/kubernetes/community/pull/2354

**Special notes for your reviewer**:

This PR depends on:
 - [x] https://github.com/kubernetes/kubernetes/pull/67090
 - [x] https://github.com/kubernetes/kubernetes/pull/67149
 - [x] https://github.com/kubernetes/kubernetes/pull/67159
 - [x] https://github.com/kubernetes/kubernetes/pull/67207

**Only review commit 'Remove references to the structs that have moved to their own packages' please**

**Release note**:

```release-note
NONE
```
/kind cleanup
/assign @sttts @thockin @jbeda @liggitt
2018-08-14 22:43:22 -07:00
Kubernetes Submit Queue 1f86c1cf26
Merge pull request #61212 from charrywanganthony/duplicated_import
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove duplicated import

**Release note**:

```release-note
NONE
```
2018-08-14 20:18:00 -07:00
Lucas Käldström db855a2b2d
autogenerated 2018-08-14 19:02:18 +03:00
Lucas Käldström 4bef926218
Remove references to the config structs that have moved to their own shared packages 2018-08-14 19:02:06 +03:00
Di Xu 3157ff0230 use NameIsDNSSubdomain validation from staging 2018-08-14 10:38:23 +08:00
Weibin Lin 935fc2c715 Update API doc of extensions/v1beta1 Deployment's RevisionHistoryLimit 2018-08-14 09:20:45 +08:00
Weibin Lin 1f921760d6 Default extensions/v1beta1 Deployment's RevisionHistoryLimit to MaxInt32 2018-08-14 09:20:45 +08:00
Aaron Crickenberger d0b259597a Use OWNERS-based labeling for kind/api-change
This replaces the following path-label munger config, except
we're using kind/api-change for everything instead of two
different kind/ labels

```
^pkg/api/([^/]+/)?types.go$    kind/api-change
^pkg/api/([^/]+/)?register.go$ kind/new-api
^pkg/apis/[^/]+/([^/]+/)?types.go$    kind/api-change
^pkg/apis/[^/]+/([^/]+/)?register.go$ kind/new-api
```
2018-08-10 13:48:56 -07:00
Lucas Käldström 0db3021112
autogenerated 2018-08-09 19:35:03 +03:00
Lucas Käldström e50340ee23
Remove references to 'pkg/apis/componentconfig/install' and fix inconsistencies 2018-08-09 18:45:27 +03:00
Kubernetes Submit Queue 8ebc84e71d
Merge pull request #66507 from verb/pid-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Promote ShareProcessNamespace to beta

**What this PR does / why we need it**: The ability to configure PID namespace sharing per-pod was added as an alpha feature in 1.10. This promotes the feature to beta and makes the feature available by default.

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

**Special notes for your reviewer**:
/assign @yujuhong 

**Release note**:

```release-note
The PodShareProcessNamespace feature to configure PID namespace sharing within a pod has been promoted to beta.
```
2018-08-09 05:01:01 -07:00
Lucas Käldström 2ff9bd6699
Rename the KubeConfigFile field to Kubeconfig in ClientConnectionConfiguration 2018-08-08 22:25:55 +03:00
Kubernetes Submit Queue e38efdcce6
Merge pull request #66698 from WanLinghao/token_projected_improve
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

refuse serviceaccount projection volume request when pod has no servceaccount bounded

**What this PR does / why we need it**:
Currently, if user starts a cluster with ServiceAccount admission plugin disabled, then creates a Pod 
like this:
```
kind: Pod 
apiVersion: v1
metadata:
  labels:
    run: nginx
  name: busybox2
spec:
      containers:
      - image: gcr.io/google-containers/nginx
        name: nginx
        volumeMounts:
        - mountPath: /var/run/secrets/tokens
          name: token
      - image: ubuntu
        name: ttt 
        volumeMounts:
        - mountPath: /var/run/secrets/tokens
          name: token
        command: [ "/bin/bash", "-c", "--" ]
        args: [ "while true; do sleep 30; done;" ]
      volumes:
      - name: token
        projected:
          sources:
          - serviceAccountToken:
              path: tokenPath
              expirationSeconds: 6000
              audience: gakki-audiences
```
The pod creation will fail with error info like:
Events:
```
  Type     Reason       Age               From                Message
  ----     ------       ----              ----                -------
  Normal   Scheduled    23s               default-scheduler   Successfully assigned office/busybox2 to 127.0.0.1
  Warning  FailedMount  8s (x6 over 23s)  kubelet, 127.0.0.1  MountVolume.SetUp failed for volume "token" : failed to fetch token: resource name may not be empty
```
We should refuse the projection request earlier. This patch fix this.


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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-08 07:46:17 -07:00
WanLinghao 5a27ee9282 refuse serviceaccount projection volume request when pod has no serviceaccount bounded 2018-08-08 10:29:07 +08:00
Kubernetes Submit Queue 04ca0d5411
Merge pull request #66894 from WanLinghao/token_projected_validation_improve
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

improve serviceaccount projected volume validation error info

**What this PR does / why we need it**:
Fix a small bug here;
We should use srcPath instead fldPath here like other projection volume do which could give info 
about which source triggered the error.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-07 15:42:04 -07:00
Kubernetes Submit Queue 00bf292cdc
Merge pull request #66480 from Huang-Wei/stateless-MatchNodeSelectorTerms
Automatic merge from submit-queue (batch tested with PRs 67042, 66480, 67053). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

ensure MatchNodeSelectorTerms() runs statelessly

**What this PR does**:

Fix sorting behavior in selector.go:

- move sorting from NewRequirement() out to String()
- add related unit tests
- add unit tests in one of outer callers (pkg/apis/core/v1/helper)

**Why we need it**:
- Without this fix, scheduling and daemonset controller doesn't work well in some (corner) cases

**Which issue(s) this PR fixes**:
Fixes #66298

**Special notes for your reviewer**:
Parameter `nodeSelectorTerms` in method MatchNodeSelectorTerms() is a slice, which is fundamentally a {*elements, len, cap} tuple - i.e. it's passing in a pointer. In that method, NodeSelectorRequirementsAsSelector() -> NewRequirement() is invoked, and the `matchExpressions[*].values` is passed into and **modified** via `sort.Strings(vals)`.

This will cause following daemonset pod fall into an infinite create/delete loop:

```yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: problem
spec:
  selector:
    matchLabels:
      app: sleeper
  template:
    metadata:
      labels:
        app: sleeper
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/hostname
                operator: In
                values:
                - 127.0.0.2
                - 127.0.0.1
      containers:
      - name: busybox
        image: busybox
        command: ["/bin/sleep", "7200"]
```

(the problem can be stably reproduced on a local cluster started by `hack/local-up-cluster.sh`)

The first time daemonset yaml is handled by apiserver and persisted in etcd with original format (original order of values was kept - 127.0.0.2, 127.0.0.1). After that, daemonset controller tries to schedule pod, and it reuses the predicates logic in scheduler component - where the values are **sorted** deeply. This not only causes the pod to be created in sorted order (127.0.0.1, 127.0.0.2), but also introduced a bug when updating daemonset - internally ds controller use a "rawMessage" (bytes of an object) to calculate hash acting as a "controller-revision-hash" to control revision rollingUpdate/rollBack, so it keeps killing "old" pod and spawning "new" pod back and forth, and fall into an infinite loop.

The issue exists in `master`, `release-1.11` and `release-1.10`.

**Release note**:
```release-note
NONE
```
2018-08-07 14:27:59 -07:00
Wei Huang e5e0de1b9d fix sorting behavior in selector.go
- move sorting from NewRequirement() out to String()
- add related unit tests
- add unit tests in one of outer callers (pkg/apis/core/v1/helper)

Closes #66298
2018-08-07 10:36:16 -07:00
Kubernetes Submit Queue 397b84205e
Merge pull request #66883 from tallclair/validation
Automatic merge from submit-queue (batch tested with PRs 66351, 66883, 66156). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix coordination.Lease validation

Fix a couple issues I noticed in the coordination.Lease validation logic which copying it for a new API:

- Field path should use the json path names (`objectMeta` -> `matadata`)
- ObjectMeta should be validated on update

**Release note**:
```release-note
NONE
```
2018-08-06 07:13:18 -07:00
WanLinghao c72491aee7 improve serviceaccount projected volume validation error info by providing source index info 2018-08-02 15:51:13 +08:00
Tim Allclair 9bb8dd9ca5
Fix coordination.Lease validation 2018-08-01 19:22:52 -07:00
David Eads d3bd0eb1d5 make package name match all the import aliases 2018-08-01 15:31:12 -04:00
Chao Wang 39a4730db6 remove duplicated import 2018-08-01 13:27:42 +08:00
Kubernetes Submit Queue 259e0743f1
Merge pull request #66581 from janetkuo/deploy-progress
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Default extensions/v1beta1 Deployment's ProgressDeadlineSeconds to MaxInt32

**What this PR does / why we need it**: Default values should be set in all API versions, because defaulting happens whenever a serialized version is read. When we switched to `apps/v1` as the storage version in `1.10` (#58854), `extensions/v1beta1` `DeploymentSpec.ProgressDeadlineSeconds` gets `apps/v1` default value (`600`) instead of being unset. 

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

**Special notes for your reviewer**: We need to cherrypick this fix to 1.10 and 1.11. Note that this fix will only help people who haven't upgraded to 1.10 or 1.11 when the storage version is changed. 

@kubernetes/sig-apps-bugs 

**Release note**:

```release-note
NONE
```
2018-07-31 09:30:59 -07:00
stewart-yu f1343af5d7 auto-generated file 2018-07-28 07:54:17 +08:00
Janet Kuo 849c08d1ed Update API doc of ProgressDeadlineSeconds 2018-07-27 10:10:30 -07:00
Janet Kuo a4f85c8dd0 Default extensions/v1beta1 Deployment's ProgressDeadlineSeconds to MaxInt32.
1. MaxInt32 has the same meaning as unset, for compatibility
2. Deployment controller treats MaxInt32 the same as unset (nil)
2018-07-27 10:10:30 -07:00
stewart-yu 55251c716a update the import file for move util/pointer to k8s.io/utils 2018-07-27 19:47:02 +08:00
Lee Verberne 85a2f92f5b Promote ShareProcessNamespace to beta 2018-07-23 17:13:59 +02:00
Kubernetes Submit Queue d2cc34fb07
Merge pull request #65771 from smarterclayton/untyped
Automatic merge from submit-queue (batch tested with PRs 65771, 65849). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add a new conversion path to replace GenericConversionFunc

reflect.Call is very expensive. We currently use a switch block as part of AddGenericConversionFunc to avoid the bulk of top level a->b conversion for our primary types which is hand-written. Instead of having these be handwritten, we should generate them.

The pattern for generating them looks like:

```
scheme.AddConversionFunc(&v1.Type{}, &internal.Type{}, func(a, b interface{}, scope conversion.Scope) error {
  return Convert_v1_Type_to_internal_Type(a.(*v1.Type), b.(*internal.Type), scope)
})
```

which matches AddDefaultObjectFunc (which proved out the approach last year). The
conversion machinery should then do a simple map lookup based on the incoming types and invoke the function.  Like defaulting, it's up to the caller to match the types to arguments, which we do by generating this code.  This bypasses reflect.Call and in the future allows Golang mid-stack inlining to optimize this code.

As part of this change I strengthened registration of custom functions to be generated instead of hand registered, and also strengthened error checking of the generator when it sees a manual conversion to error out.  Since custom functions are automatically used by the generator, we don't really have a case for not registering the functions.

Once this is fully tested out, we can remove the reflection based path and the old registration methods, and all conversion will work from point to point methods (whether generated or custom).

Much of the need for the reflection path has been removed by changes to generation (to omit fields) and changes to Go (to make assigning equivalent structs easy).

```release-note
NONE
```
2018-07-19 09:29:00 -07:00
foxyriver 345e53b783 change not valid to invalid 2018-07-18 14:11:22 +08:00
Clayton Coleman ef561ba8b5
generated: Avoid use of reflect.Call in conversion code paths 2018-07-17 23:02:16 -04:00
Clayton Coleman b5a266141c
Remove generic conversion function 2018-07-17 23:02:16 -04:00
Clayton Coleman ba95744bc5
Make conversion function names match expected values 2018-07-17 23:02:16 -04:00
Kubernetes Submit Queue 8246dfa00d
Merge pull request #66165 from liggitt/statefulset-semantic-equality
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Compare stateful set updates semantically

Fixes #66137

```release-note
fixes a validation error that could prevent updates to StatefulSet objects containing non-normalized resource requests
```
2018-07-17 00:15:59 -07:00
tanshanshan d300706683 fixdup 2018-07-14 14:13:28 +08:00
Jordan Liggitt 749484449a
Compare stateful set updates semantically 2018-07-13 13:32:31 -04:00
Jason Smith 4ba7fd5f3c added serviceAccountName to field selectors 2018-07-12 11:13:36 +02:00
Kubernetes Submit Queue 3a3d6564b6
Merge pull request #66047 from krunaljain/bugfix/csi_default_fs_type
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixing comments in types.go to describe the changes for CSI driver default FS type override fix

This PR fixes the comment in types.go which was made in the commit 5dfe7b5758 
In the above commit,  the change that fixed the override of default FSType for CSI driver was made. However the comments in types.go were made for   GCEPersistentDiskVolumeSource and RBDVolumeSource respectively. This commit fixes that comment to reflect the changes for CSI driver

```release-note
none
```
2018-07-10 18:45:32 -07:00
Krunal Jain 14c7ce92b3 Fixing comments in types.go 2018-07-10 15:39:16 -07:00
Kubernetes Submit Queue 567a38c8c6
Merge pull request #66030 from liggitt/batch-alpha-conversion
Automatic merge from submit-queue (batch tested with PRs 66030, 65997). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

declare conversion dependencies

fixes #65988

verified all packages regenerate cleanly individually with:
```
for x in $(find . -name *zz*conversion* | xargs -n 1 dirname); do touch $x; make generated_files; git status; done
```

```release-note
NONE
```
2018-07-10 12:46:05 -07:00
Kubernetes Submit Queue 3b269e182d
Merge pull request #65499 from krunaljain/bugfix/csi_default_fs_type
Automatic merge from submit-queue (batch tested with PRs 55023, 65499). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bugfix/csi default fs type

This PR address the issue mentioned in the following ticket https://github.com/kubernetes/kubernetes/issues/65122 
The FSType string will now not be defaulted to ext4. Removes defaulting of CSI file system type to ext4. CSI plugins that depended on this default need to be updated as the fsType would remain an empty string if not provided and would not default to ext4. CSI spec allows for an empty fstype string. This is intended for non-block plugins like nfs and gluster where filesystems are not separately created on the volume. But currently the default file system is overridden to ext4  which makes the above case redundant. This commit prevents such an overridding. 


```release-note  
ACTION REQUIRED: Removes defaulting of CSI file system type to ext4. All the production drivers listed under https://kubernetes-csi.github.io/docs/Drivers.html were tested and work as expected after this change. If you are using a driver not in that list, please test the drivers on an updated test cluster first. ```
2018-07-10 10:18:08 -07:00
Jordan Liggitt f6a676d9d0
declare conversion dependencies 2018-07-10 11:12:19 -04:00
Kubernetes Submit Queue 349d6a62db
Merge pull request #64226 from ddebroy/ddebroy-affinity1
Automatic merge from submit-queue (batch tested with PRs 64226, 65880). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Populate NodeAffinity on top of labels for cloud based PersistentVolumes

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

This PR populates the NodeAffinity field (on top of the existing labels) for PVs backed by cloud providers like EC2 EBS and GCE PD.

**Special notes for your reviewer**:
Related to https://github.com/kubernetes/kubernetes/pull/63232

Sample `describe pv` output for EBS with node affinity field populated:
```
kubectl describe pv pv0001
Name:              pv0001
Labels:            failure-domain.beta.kubernetes.io/region=us-west-2
                   failure-domain.beta.kubernetes.io/zone=us-west-2a
Annotations:       <none>
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      
Status:            Available
Claim:             
Reclaim Policy:    Retain
Access Modes:      RWO
Capacity:          5Gi
Node Affinity:     
  Required Terms:  
    Term 0:        failure-domain.beta.kubernetes.io/zone in [us-west-2a]
                   failure-domain.beta.kubernetes.io/region in [us-west-2]
Message:           
Source:
    Type:       AWSElasticBlockStore (a Persistent Disk resource in AWS)
    VolumeID:   vol-00cf03a068c62cbe6
    FSType:     ext4
    Partition:  0
    ReadOnly:   false
Events:         <none>
```

/sig storage
/assign @msau42

**Release note**:
```NONE```
2018-07-09 12:16:02 -07:00
Jordan Liggitt f51ba20cdd
change field selector conversion registration to be strongly typed 2018-07-03 15:47:20 -04:00
Dr. Stefan Schimanski f8de7cea40 Update generated files 2018-06-29 20:36:17 +02:00
Krunal Jain 5dfe7b5758 Removes defaulting of CSI fsType to ext4 2018-06-28 16:48:25 -07:00
Hemant Kumar 063eee7a39 Fix comments about default mount propagation
Fix generated docs as well
2018-06-28 17:04:41 -04:00
wojtekt 0950084137 Autogenerated stuff 2018-06-27 13:31:10 +02:00
wojtekt f38e952f4e Add coordination API group with Lease type 2018-06-27 13:30:13 +02:00
Deep Debroy 074dc6487b Populate NodeAffinity on top of labels for cloud based PersistentVolumes
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-06-26 19:48:03 -07:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jeff Grafton a725660640 Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
Kubernetes Submit Queue 3ab6ced72b
Merge pull request #65260 from dixudx/fix_ScaleIOVolumeSource_spec
Automatic merge from submit-queue (batch tested with PRs 65064, 65218, 65260, 65241, 64372). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix scale io volume source spec

**What this PR does / why we need it**:
> FSType 
Implicitly inferred to be "ext4" if unspecified.

Actually the default value to "xfs".

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2018-06-21 21:12:16 -07:00
Kubernetes Submit Queue d1f5cb2348
Merge pull request #65050 from sttts/sttts-deepcopy-update
Automatic merge from submit-queue (batch tested with PRs 64895, 64938, 63700, 65050, 64957). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bump gengo to include uniform pointer deepcopy

This bumps k8s.io/gengo with uniform pointer support in deepcopy-gen.

Fixes https://github.com/kubernetes/code-generator/issues/45.
2018-06-21 04:15:16 -07:00
Kubernetes Submit Queue c7da0a52e1
Merge pull request #58690 from adohe/validate_er_name
Automatic merge from submit-queue (batch tested with PRs 58690, 64773, 64880, 64915, 64831). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add extended resource name validation

@smarterclayton I dont know who is in charge of extended resource, so just assign this to you. This is a quite simple PR, just add extended resource name validation test case, as we validate extended resource quantity and overcommit.

```release-note
NONE
```
2018-06-20 14:21:11 -07:00
Di Xu bb1a9f511f add default value to ScaleIOVolumeSource spec 2018-06-20 11:26:41 +08:00
Jordan Liggitt dd5dccc740
Move service account key file arg to the service-account controller options 2018-06-18 09:51:10 -04:00
Dr. Stefan Schimanski 1208437f84 Update generated files 2018-06-13 12:35:13 +02:00
AdoHe 871848ed0a add extended resource name validation 2018-06-08 14:40:21 +08:00
Jordan Liggitt 364e2d799d
Revert "Add validation code for the Vertical Pod Autoscaler API."
This reverts commit 390cfec617.
2018-06-07 14:46:18 -04:00
Jordan Liggitt 846cbe4e6b
Revert "Auto-generated code for the Vertical Pod Autoscaler API."
This reverts commit da65f30e2a.
2018-06-07 14:46:17 -04:00
Jordan Liggitt 4ac642cd11
Revert "Add Vertical Pod Autoscaling API to the autoscaling group."
This reverts commit 3f92d3fcda.
2018-06-07 14:46:17 -04:00
Kubernetes Submit Queue 63c90bb47e
Merge pull request #63797 from kgrygiel/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add Vertical Pod Autoscaler to autoscaling/v2beta1

**What this PR does / why we need it**:
Adds Vertical Pod Autoscaler (https://github.com/kubernetes/community/blob/master/contributors/design-proposals/autoscaling/vertical-pod-autoscaler.md) to the autoscaling API (which currently has the Horizontal Pod Autoscaler).
This is needed for the Vertical Pod Autoscaler beta.

**Special notes for your reviewer**:

/cc @thockin @mwielgus @DirectXMan12 

FYI. changes that add pkg/registry/autoscaling/verticalpodautoscaler/... will follow.

**Release note**:
```Add Vertical Pod Autoscaler to autoscaling/v2beta1.```
2018-06-06 22:54:08 -07:00
kgrygiel 390cfec617 Add validation code for the Vertical Pod Autoscaler API. 2018-06-06 13:00:55 +02:00
kgrygiel da65f30e2a Auto-generated code for the Vertical Pod Autoscaler API. 2018-06-06 13:00:55 +02:00
kgrygiel 3f92d3fcda Add Vertical Pod Autoscaling API to the autoscaling group. 2018-06-06 13:00:55 +02:00
Kubernetes Submit Queue 0b8394a1f4
Merge pull request #64646 from freehan/pod-ready-plus2-new
Automatic merge from submit-queue (batch tested with PRs 63717, 64646, 64792, 64784, 64800). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add ContainersReady condition into Pod Status

**Last 3 commits are new**

Follow up PR of: https://github.com/kubernetes/kubernetes/pull/64057 and https://github.com/kubernetes/kubernetes/pull/64344

Have a single PR for adding ContainersReady per https://github.com/kubernetes/kubernetes/pull/64344#issuecomment-394038384

```release-note
Introduce ContainersReady condition in Pod Status
```


/assign yujuhong for review
/assign thockin for the tiny API change
2018-06-06 01:24:14 -07:00
Seth Jennings 6729add11c sysctls: create feature gate to track promotion 2018-06-06 00:23:11 +02:00
Jan Chaloupka 3cc15363bc Run make update 2018-06-06 00:12:40 +02:00
Jan Chaloupka ab616a88b9 Promote sysctl annotations to API fields 2018-06-05 23:17:00 +02:00
Minhan Xia 6b08ef575f add ContainersReady condition 2018-06-05 11:10:38 -07:00
Kubernetes Submit Queue f73101066a
Merge pull request #58647 from oracle/for/upstream/master/hostpath-psp-readonly
Automatic merge from submit-queue (batch tested with PRs 64344, 64709, 64717, 63631, 58647). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add support for enforcing read only host paths in PSPs. 

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

This PR adds support for the PSP to enforce that host paths are readonly. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57371
xref https://github.com/kubernetes/features/issues/5

**Special notes for your reviewer**:

**Release note**:

```release-note
PodSecurityPolicy now supports restricting hostPath volume mounts to be readOnly and under specific path prefixes
```

/cc @ericchiang @liggitt
2018-06-05 02:16:21 -07:00
lichuqiang 20654393ee generated files 2018-06-05 09:44:10 +08:00
lichuqiang 9a77899ee5 API changes for Topology aware dynamic provisioning 2018-06-05 09:27:02 +08:00
Josh Horwitz c7fbcf35da Add support for enforcing read only host paths in PSPs. 2018-06-04 19:10:37 -04:00
vikaschoudhary16 3cfe6412c7 Introduce priority class in the resource quota 2018-06-04 16:14:54 -04:00
Davanum Srinivas 877b801531 Updated generated files 2018-06-02 22:20:39 -04:00
Davanum Srinivas 5fa8a2412d API updates for Cinder Volumes to support for user specified Secrets in the future 2018-06-02 22:16:50 -04:00
Kubernetes Submit Queue 0ecfd343b3
Merge pull request #64267 from sttts/sttts-crd-objectmeta-pruning
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiextensions: add ObjectMeta validation and pruning

This is a critical pre-requisite for further multi-version support and especially for GA of CRDs: ObjectMeta must be schema-validated and pruned, like `json.Unmarshal` does this.

This PR adds this in the incoming request serializer and the storage decoder. The former errors when schema validation fails, the later just drops invalid typed fields.

Fixes #59451

```release-note
Meta data of CustomResources is now pruned and schema checked during deserialization of requests and when read from etcd. In the former case, invalid meta data is rejected, in the later it is dropped from the CustomResource objects.
```
2018-06-02 12:55:36 -07:00
Kubernetes Submit Queue e5686a3668
Merge pull request #64154 from gnufied/impelemnt-volume-count
Automatic merge from submit-queue (batch tested with PRs 64613, 64596, 64573, 64154, 64639). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Implement dynamic volume limits

Implement dynamic volume limits depending on node type.

xref https://github.com/kubernetes/community/pull/2051

```release-note
Add Alpha support for dynamic volume limits based on node type
```
2018-06-02 06:30:19 -07:00
Dr. Stefan Schimanski dc5866a781 conversions: don't mutate in.ObjectMeta.Annotations 2018-06-02 09:44:45 +00:00
Minhan Xia 792f03b1d2 validation and feature gate 2018-06-01 16:20:41 -07:00
Minhan Xia bfa9c1091e make update 2018-06-01 16:19:15 -07:00
Minhan Xia 10465ee4a7 add ReadinessGates in pod spec 2018-06-01 16:19:14 -07:00
Hemant Kumar 45fb31ec07 Implement API changes needed for dynamic volume limits
define alpha feature and make api changes
2018-06-01 19:17:25 -04:00
Dr. Stefan Schimanski 1db0024ec9 apiextensions: add ObjectMeta schema validation and pruning 2018-06-01 17:43:07 +00:00
Kubernetes Submit Queue 4993d01be1
Merge pull request #63999 from mikedanese/validatetr
Automatic merge from submit-queue (batch tested with PRs 59938, 63777, 64577, 63999, 64431). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

svcacct: validate min and max expiration seconds on TokenRequest

stop gap https://github.com/kubernetes/kubernetes/pull/63653
```release-note
TokenRequests now are required to have an expiration duration between 10 minutes and 2^32 seconds.
```
2018-05-31 21:29:17 -07:00
Kubernetes Submit Queue 26caa84d09
Merge pull request #63445 from ericchiang/deprecate-git-repo-volume
Automatic merge from submit-queue (batch tested with PRs 63445, 63820). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

core v1: deprecate the gitRepo volume type

gitRepo stopped accepting new features nearly 2 years ago https://github.com/kubernetes/kubernetes/issues/17676#issuecomment-228650586 and today this behavior can easily be achieved through an init container. The kubelet shelling out to git in the host namespace can also be a security issue on un-trusted repos, as was demonstrated by [CVE-2017-1000117](https://groups.google.com/forum/#!topic/kubernetes-announce/CTLXJ74cu8M). Our own documentation even alludes to this volume type being removed in the future:

> In the future, such volumes may be moved to an even more decoupled model, rather than extending the Kubernetes API for every such use case.

https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo

Closes https://github.com/kubernetes/kubernetes/issues/60999

```release-note-action-required
The GitRepo volume type is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
```

/release-note-action-required

Instead of this:

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: server
spec:
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
  volumes:
  - name: git-volume
    gitRepo:
      repository: "git@somewhere:me/my-git-repository.git"
      revision: "22f1d8406d464b0c0874075539c1f2e96c253775"
```

Do this:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: git-clone
data:
  git-clone.sh: |
    #!/bin/sh -e
    git clone $1 $3
    cd $3
    git reset --hard $2
---
apiVersion: v1
kind: Pod
metadata:
  name: server
spec:
  initContainers:
  - name: git-clone
    image: alpine/git # Any image with git will do
    command:
    - /usr/local/git/git-clone.sh
    args:
    - "https://somewhere/me/my-git-repository.git"
    - "22f1d8406d464b0c0874075539c1f2e96c253775"
    - "/mypath"
    volumeMounts:
    - name: git-clone
      mountPath: /usr/local/git
    - name: git-repo
      mountPath: /mypath
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
  volumes:
  - name: git-volume
    emptyDir: {}
  - name: git-clone
    configMap:
      name: git-clone
      defaultMode: 0755
```
2018-05-31 16:20:07 -07:00
Kubernetes Submit Queue 374992a6fb
Merge pull request #63819 from mikedanese/svacctproj-api
Automatic merge from submit-queue (batch tested with PRs 64364, 64369, 63819, 64528). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add APIs for service account volume projection

ref https://github.com/kubernetes/kubernetes/issues/58790

designed in https://github.com/kubernetes/community/pull/1973

Release note will be included in the implementation.
```release-note
NONE
```
2018-05-30 22:54:11 -07:00
Mike Danese dc9e3f1b3e svcacct: validate min and max expiration seconds on TokenRequest 2018-05-30 17:32:49 -07:00