Commit Graph

58064 Commits (6193360eb52b00727df08f67eb8fc364a8df85e9)

Author SHA1 Message Date
Chao Xu 6193360eb5 generated bazel 2017-11-17 21:02:47 -08:00
Chao Xu ea123f82aa Adding the mutating webhook 2017-11-17 21:02:47 -08:00
Kubernetes Submit Queue 2aaab817de
Merge pull request #55420 from cblecker/go1.9.2
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>.

Upgrade to go1.9.2

**What this PR does / why we need it**:
Use go1.9.2, containing a number of bug fixes: https://github.com/golang/go/issues?q=milestone%3AGo1.9.2

**Release note**:
```release-note
Upgrade to go1.9.2
```
2017-11-17 20:24:42 -08:00
Kubernetes Submit Queue 01c74145c7
Merge pull request #55665 from brendandburns/path
Automatic merge from submit-queue (batch tested with PRs 55908, 55829, 55293, 55653, 55665). 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>.

If mountPath is missing, prefix with root dir.

If `mountPath` is not absolute, add the os-specific root directory as a prefix.

Ref: https://github.com/kubernetes/kubernetes/pull/51240
https://groups.google.com/forum/#!topic/kubernetes-sig-storage/k_0Wr2kYkpU

@thockin @saad-ali @andyzhangx 

Note to @thockin I left the validation in place, in seems like it is a net win, since it will give a decent
error message to most people, but the fall-back defaulting is there if it doesn't catch 'c:'

I'm happy to rip out the validation if that is preferable to everyone.  Let me know.

```release-note
If a non-absolute mountPath is passed to the kubelet, prefix it with the appropriate root path.
```
2017-11-17 17:11:16 -08:00
Kubernetes Submit Queue 69098ad7b3
Merge pull request #55653 from hzxuzhonghu/test-flaky
Automatic merge from submit-queue (batch tested with PRs 55908, 55829, 55293, 55653, 55665). 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>.

[bug fix] TestCascadingDeletion during pull-kubernetes-unit-test flaky

**What this PR does / why we need it**:
fix pull-kubernetes-unit-test flaky.

```
go test -v k8s.io/kubernetes/test/integration/garbagecollector -run TestCascadingDeletion$
panic: close of closed channel
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x111
/usr/local/go/src/runtime/panic.go:491 +0x283
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/garbagecollector/graph_builder.go:259 +0xb80
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go:123 +0x39
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go:211 +0x20f
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x5e
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbd
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go:172 +0xd9
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/garbagecollector/garbage_collector_test.go:268 +0xc9
				from junit_3a3d564eebb1750e5c904cc525d117617fc0af51_20171113-090812.xml
```

**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 #55652

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-17 17:11:13 -08:00
Kubernetes Submit Queue 66d1401cb5
Merge pull request #55293 from xiangpengzhao/up-go-19-change
Automatic merge from submit-queue (batch tested with PRs 55908, 55829, 55293, 55653, 55665). 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 go native func after upgrading to go1.9

**What this PR does / why we need it**:
Since we have already upgraded to go1.9 (#51375), use go native func after upgrading to go1.9.

**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: #52033

**Special notes for your reviewer**:
/cc @aanm @bowei 

**Release note**:

```release-note
NONE
```
2017-11-17 17:11:11 -08:00
Kubernetes Submit Queue cae4208e26
Merge pull request #55829 from cheftako/admissionResponseAlt
Automatic merge from submit-queue (batch tested with PRs 55908, 55829, 55293, 55653, 55665). 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>.

Admission response alt

**What this PR does / why we need it**: This reflects the imperative nature of AdmissionReview. It adds AdmissionRequest and AdmissionResponse in place of status/spec. The AdmissionResponse the allows the mutating webhook  to send back a json path with the mutated version of the requested object.

**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 #https://github.com/kubernetes/features/issues/492

**Special notes for your reviewer**:Port of caesarxuchao's fix with outcome of https://github.com/kubernetes/kubernetes/issues/55729

**Release note**:
```release-note
action-required: please update your admission webhook to use the latest [Admission API](https://github.com/kubernetes/api/tree/master/admission).

`admission/v1alpha1#AdmissionReview` now contains `AdmissionRequest` and `AdmissionResponse`. `AdmissionResponse` includes a `Patch` field to allow mutating webhooks to send json patch to the apiserver.
```
2017-11-17 17:11:08 -08:00
Kubernetes Submit Queue 330bacb7e5
Merge pull request #55908 from mindprince/accelerator-monitoring-api
Automatic merge from submit-queue (batch tested with PRs 55908, 55829, 55293, 55653, 55665). 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 accelerator stats API to follow API conventions.

Introduced in #55188

**Release note**:
```release-note
None
```
2017-11-17 17:11:05 -08:00
Jeff Grafton 68c7ffcb2f
Explicitly download go1.9.2 in Bazel WORKSPACE 2017-11-17 16:27:19 -08:00
Christoph Blecker 82737e730c
Upgrade to go1.9.2 2017-11-17 16:27:17 -08:00
cheftako dac3c2e168 Admission request/response handling
AdmissionResponse allows mutating webhook to send apiserver a json patch
to mutate the object.
This reflects the imperative nature of AdmissionReview. It adds
AdmissionRequest and AdmissionResponse in place of status/spec.
The AdmissionResponse the allows the mutating webhook
to send back a json path with the mutated version of the requested
object.
Fixed the integration test to clean up properly.
Switched test image to 1.8v5 to reflect API changes.
Make sure to cache test framework client for cleaup test code.
Switched to pointer for patch type.
Factored in @liggitt's feedback.
Factored in @lavalamp's feedback.
2017-11-17 14:22:55 -08:00
Kubernetes Submit Queue 3ec7487c0f
Merge pull request #55263 from anfernee/refactor_reduce
Automatic merge from submit-queue (batch tested with PRs 55254, 55525, 50108, 54674, 55263). 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>.

Refactor Priority Reduce functions

- Reducing the duplicated reduce function by introducing a reduce
  function generator that generates common reduce functions.
- Remove logs from reduce function, so it's purely calculating scores.
- Optimize the reduce functions by removing unnecessary conversion to
  float64.

**Release note**:
```release-note
None
```
2017-11-17 13:34:17 -08:00
Kubernetes Submit Queue e4a6d42d96
Merge pull request #54674 from andyzhangx/azurefile-mountoptions
Automatic merge from submit-queue (batch tested with PRs 55254, 55525, 50108, 54674, 55263). 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 mount options in azure file

**What this PR does / why we need it**:
support mount options in azure file

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

**Special notes for your reviewer**:
@rootfs @karataliu @feiskyer 
By default, the dir_mode and file_mode would be 0700, vers would be 3.0, while if user specify `dir_mode`, `file_mode`, `vers` in storage class in `mountOptions` field(see below), then azure file should use user specified mount options.
```
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: azurefile
provisioner: kubernetes.io/azure-file
mountOptions:
  - dir_mode=0377
  - file_mode=0350
  - vers=2.1
parameters:
  skuName: Standard_LRS
  location: westus2
```

**Release note**:

```
support mount options in azure file
```
/sig azure
2017-11-17 13:34:14 -08:00
Kubernetes Submit Queue 80584237ee
Merge pull request #50108 from mixslice/master
Automatic merge from submit-queue (batch tested with PRs 55254, 55525, 50108, 54674, 55263). 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 AWS ECR credentials in China

**What this PR does / why we need it**:
Resolve AWS ECR credentials bug in China region

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

I haven't open any issue yet

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-11-17 13:34:12 -08:00
Kubernetes Submit Queue 0881a2281e
Merge pull request #55525 from miaoyq/fixes-55505
Automatic merge from submit-queue (batch tested with PRs 55254, 55525, 50108, 54674, 55263). 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>.

Correct clean up actions in e2e tests

**What this PR does / why we need it**:
Remove the duplicate "cleanup action" code in `test/e2e/e2e.go`, and use the clean up code in test/e2e/framework instead.

**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 #55505 

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2017-11-17 13:34:08 -08:00
Kubernetes Submit Queue dc315b8e37
Merge pull request #55254 from mtaufen/iterative-manifest-url-header
Automatic merge from submit-queue (batch tested with PRs 55254, 55525, 50108, 54674, 55263). 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>.

ColonSeparatedMultimapStringString: allow multiple Set invocations with default override

The first call to Set will clear the map before adding entries;
subsequent calls will simply append to the map.
This makes it possible to override default values with a command-line
option rather than appending to defaults,
while still allowing the distribution of key-value pairs across
multiple flag invocations.

For example: `--flag "a:hello" --flag "b:again" --flag "b:beautiful"
--flag "c:world"` results in `{"a": ["hello"], "b": ["again",
"beautiful"], "c": ["world"]}`

Related: #53833, https://github.com/kubernetes/kubernetes/pull/54643#discussion_r148651257

```release-note
NONE
```
2017-11-17 13:34:06 -08:00
Michael Taufen 1347c094ce omitempty 2017-11-17 09:07:47 -08:00
Michael Taufen 6e49ac382b ColonSeparatedMultimapStringString: allow multiple Set invocations with default override
The first call to Set will clear the map before adding entries;
subsequent calls will simply append to the map.
This makes it possible to override default values with a command-line
option rather than appending to defaults,
while still allowing the distribution of key-value pairs across
multiple flag invocations.

For example: `--flag "a:hello" --flag "b:again" --flag "b:beautiful"
--flag "c:world"` results in `{"a": ["hello"], "b": ["again",
"beautiful"], "c": ["world"]}`
2017-11-17 09:07:47 -08:00
Kubernetes Submit Queue 56e62b684e
Merge pull request #54053 from WanLinghao/cmd_test_unused_function
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 unused function in cmd_test.go

PR removed unused defaultClientConfigForVersion() functions from cmd_test.go.



**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 #

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-11-17 08:28:26 -08:00
Kubernetes Submit Queue 52492e683f
Merge pull request #55455 from mahdix/kind_visitor_fix
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 support for CronJob to kind_visitor

Fixes https://github.com/kubernetes/kubectl/issues/126
2017-11-17 05:08:07 -08:00
Kubernetes Submit Queue ad750b60b2
Merge pull request #54411 from frodenas/kubectl-pdb-fix
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>.

Fixes kubectl Pod Disruption Budget and adds tests

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

This PR fixes several kubectl Pod Disruption Budget issues:
* The `min-available` parameter in Pod Disruption Budget V1 is not required (otherwise it will never use the default value)
* Removes the deprecated `min-available` default in Pod Disruption Budget V2
* The `selector` parameter in Pod Disruption Budget V2 is required
* Fixes (typo) the `max-unavailable` parameter check in Pod Disruption Budget V2
* Fixes some  assertion error messages where the value printed was always the zero value of the parameter type instead of the parameter provided
* Updated kubectl Pod Disruption Budget to use policy V1Beta1 instead of unversioned API (see https://github.com/kubernetes/kubectl/issues/90)
* Add missing tests

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubectl/issues/101

**Special notes for your reviewer**:

Spllited in several commits to make the review process easier. Please let me know if you prefer to squash some commits or if you prefer to split them in different PRs.

**Release note**:

```release-note
NONE
```

/cc @kubernetes/sig-cli-pr-reviews
2017-11-17 03:40:37 -08:00
Kubernetes Submit Queue 00fe2cfe6c
Merge pull request #54823 from mtaufen/structure-eviction-thresholds
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>.

Lift embedded structure out of eviction-related KubeletConfiguration fields

- Changes the following KubeletConfiguration fields from `string` to
`map[string]string`:
  - `EvictionHard`
  - `EvictionSoft`
  - `EvictionSoftGracePeriod`
  - `EvictionMinimumReclaim`
- Adds flag parsing shims to maintain Kubelet's public flags API, while
enabling structured input in the file API.
- Also removes `kubeletconfig.ConfigurationMap`, which was an ad-hoc flag
parsing shim living in the kubeletconfig API group, and replaces it
with the `MapStringString` shim introduced in this PR. Flag parsing
shims belong in a common place, not in the kubeletconfig API.
I manually audited these to ensure that this wouldn't cause errors
parsing the command line for syntax that would have previously been
error free (`kubeletconfig.ConfigurationMap` was unique in that it
allowed keys to be provided on the CLI without values. I believe this was
done in `flags.ConfigurationMap` to facilitate the `--node-labels` flag,
which rightfully accepts value-free keys, and that this shim was then
just copied to `kubeletconfig`). Fortunately, the affected fields
(`ExperimentalQOSReserved`, `SystemReserved`, and `KubeReserved`) expect
non-empty strings in the values of the map, and as a result passing the
empty string is already an error. Thus requiring keys shouldn't break
anyone's scripts.
- Updates code and tests accordingly.

Regarding eviction operators, directionality is already implicit in the
signal type (for a given signal, the decision to evict will be made when
crossing the threshold from either above or below, never both). There is
no need to expose an operator, such as `<`, in the API. By changing
`EvictionHard` and `EvictionSoft` to `map[string]string`, this PR
simplifies the experience of working with these fields via the
`KubeletConfiguration` type. Again, flags stay the same.

Other things:
- There is another flag parsing shim, `flags.ConfigurationMap`, from the
shared flag utility. The `NodeLabels` field still uses
`flags.ConfigurationMap`. This PR moves the allocation of the
`map[string]string` for the `NodeLabels` field from
`AddKubeletConfigFlags` to the defaulter for the external
`KubeletConfiguration` type. Flags are layered on top of an internal
object that has undergone conversion from a defaulted external object,
which means that previously the mere registration of flags would have
overwritten any previously-defined defaults for `NodeLabels` (fortunately
there were none).

Related: #53833 (lifting embedded structures out of string fields is part of getting this API to beta)

```release-note
The EvictionHard, EvictionSoft, EvictionSoftGracePeriod, EvictionMinimumReclaim, SystemReserved, and KubeReserved fields in the KubeletConfiguration object (kubeletconfig/v1alpha1) are now of type map[string]string, which facilitates writing JSON and YAML files.
```
2017-11-17 02:57:30 -08:00
Kubernetes Submit Queue b223955c06
Merge pull request #54507 from micahhausler/aws-elb-security-policy
Automatic merge from submit-queue (batch tested with PRs 54134, 54507). 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 service annotation for AWS ELB SSL policy

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

This work adds a new supported service annotation for AWS clusters, `service.beta.kubernetes.io/aws-load-balancer-ssl-negotiation-policy`, which lets users specify which [predefined AWS SSL policy](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html) they would like to use.

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

Fixes #43744

**Special notes for your reviewer**:

While this PR doesn't allow users to define their own cipher policy in an annotation, a user could (out of band) create their own policy on an ELB with the naming convention `k8s-SSLNegotiationPolicy-<my-policy-name>` and specify it with the above annotation.

This is my second k8s PR, and I don't have experience with an e2e test, would that be required for this change? I did run this in a kubeadm cluster and it worked like a charm. I was able to choose different predefined policies, and revert to the default policy when I removed the annotation.

**Release note**:

```release-note
Added service annotation for AWS ELB SSL policy
```
2017-11-17 01:17:11 -08:00
Kubernetes Submit Queue a00b766ab0
Merge pull request #54134 from chentao1596/plugin-pkg-scheduler-util-non-zero-unit-test
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>.

Adding unit tests to methods of 'scheduler/algorithm/priorities/util'

What this PR does / why we need it:

 1) Adding unit tests to methods of 'non_zero.go'
 2) Adding unit tests to methods of 'util.go'
 3) Adding/Modifing unit tests to methods of 'topologies.go'

thank you!
2017-11-17 01:13:03 -08:00
Kubernetes Submit Queue d20b156995
Merge pull request #55836 from smarterclayton/status_errors
Automatic merge from submit-queue (batch tested with PRs 55392, 55491, 51914, 55831, 55836). 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>.

Guarantee that status errors have a kind set
2017-11-17 00:18:28 -08:00
Kubernetes Submit Queue ebd3d68039
Merge pull request #55831 from Random-Liu/rename-log-dump-env
Automatic merge from submit-queue (batch tested with PRs 55392, 55491, 51914, 55831, 55836). 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>.

Rename log-dump env to `LOG_DUMP_SYSTEMD_SERVICES`.

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

Rename `SYSTEMD_SERVICES` to `LOG_DUMP_SYSTEMD_SERVICES`. test-infra disables log dump in our e2e framework, and uses a different log dump logic https://github.com/kubernetes/test-infra/blob/master/kubetest/e2e.go#L480-L497. So the flags we added in https://github.com/kubernetes/kubernetes/pull/55288 will not work in test-infra.

Fortrunately, test-infra is using the same script `cluster/log-dump/log-dump.sh`, so we could still configure systemd services by setting the environment variable globally.

The original environment variable name is too general for setting globally, change it to a more specific name.

**Release note**:

```release-note
none
```
2017-11-17 00:18:25 -08:00
Kubernetes Submit Queue 79c2274566
Merge pull request #51914 from sergeylanzman/master
Automatic merge from submit-queue (batch tested with PRs 55392, 55491, 51914, 55831, 55836). 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>.

Move regexp.MustCompile to global variable

Move regexp.MustCompile to global variable.
regexp.MustCompile heavy function and can be run on init app
```release-note
NONE
```
2017-11-17 00:18:22 -08:00
Kubernetes Submit Queue bb82a3acad
Merge pull request #55491 from gnufied/fix-dangling-attach-errors
Automatic merge from submit-queue (batch tested with PRs 55392, 55491, 51914, 55831, 55836). 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 dangling attach errors

Detach volumes from shutdown nodes and ensure that
dangling volumes are handled correctly in AWS

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

```release-note
Implement correction mechanism for dangling volumes attached for deleted pods
```
2017-11-17 00:18:20 -08:00
Kubernetes Submit Queue 8413f36aa3
Merge pull request #55392 from sttts/sttts-remove-policy-v1alpha1
Automatic merge from submit-queue (batch tested with PRs 55392, 55491, 51914, 55831, 55836). 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 unused pkg/apis/policy/v1alpha1
2017-11-17 00:18:17 -08:00
Michael Taufen 617b49858f omitempty 2017-11-16 18:35:13 -08:00
Michael Taufen 1085b6f730 Lift embedded structure out of eviction-related KubeletConfiguration fields
- Changes the following KubeletConfiguration fields from `string` to
`map[string]string`:
  - `EvictionHard`
  - `EvictionSoft`
  - `EvictionSoftGracePeriod`
  - `EvictionMinimumReclaim`
- Adds flag parsing shims to maintain Kubelet's public flags API, while
enabling structured input in the file API.
- Also removes `kubeletconfig.ConfigurationMap`, which was an ad-hoc flag
parsing shim living in the kubeletconfig API group, and replaces it
with the `MapStringString` shim introduced in this PR. Flag parsing
shims belong in a common place, not in the kubeletconfig API.
I manually audited these to ensure that this wouldn't cause errors
parsing the command line for syntax that would have previously been
error free (`kubeletconfig.ConfigurationMap` was unique in that it
allowed keys to be provided on the CLI without values. I believe this was
done in `flags.ConfigurationMap` to facilitate the `--node-labels` flag,
which rightfully accepts value-free keys, and that this shim was then
just copied to `kubeletconfig`). Fortunately, the affected fields
(`ExperimentalQOSReserved`, `SystemReserved`, and `KubeReserved`) expect
non-empty strings in the values of the map, and as a result passing the
empty string is already an error. Thus requiring keys shouldn't break
anyone's scripts.
- Updates code and tests accordingly.

Regarding eviction operators, directionality is already implicit in the
signal type (for a given signal, the decision to evict will be made when
crossing the threshold from either above or below, never both). There is
no need to expose an operator, such as `<`, in the API. By changing
`EvictionHard` and `EvictionSoft` to `map[string]string`, this PR
simplifies the experience of working with these fields via the
`KubeletConfiguration` type. Again, flags stay the same.

Other things:
- There is another flag parsing shim, `flags.ConfigurationMap`, from the
shared flag utility. The `NodeLabels` field still uses
`flags.ConfigurationMap`. This PR moves the allocation of the
`map[string]string` for the `NodeLabels` field from
`AddKubeletConfigFlags` to the defaulter for the external
`KubeletConfiguration` type. Flags are layered on top of an internal
object that has undergone conversion from a defaulted external object,
which means that previously the mere registration of flags would have
overwritten any previously-defined defaults for `NodeLabels` (fortunately
there were none).
2017-11-16 18:35:13 -08:00
hzxuzhonghu fbf81bc7ad fix underlying bug: double close channel when stop 2017-11-17 10:35:03 +08:00
Yanqiang Miao 16aa5820fb Correct clean up actions in e2e tests 2017-11-17 08:46:21 +08:00
Brendan Burns 6fa527869c update API, remove validation. 2017-11-17 00:21:38 +00:00
David Ashpole a82460d772 Kubernetes version v1.10.0-alpha.0 openapi-spec file updates 2017-11-16 16:01:49 -08:00
Rohit Agarwal 274bac23ce Fix accelerator stats API to follow API conventions. 2017-11-16 15:20:55 -08:00
Kubernetes Submit Queue b79e3d14d1
Merge pull request #55772 from liggitt/gc-ignored-resources
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>.

Only attempt to construct GC informers for watchable resources

A resource must support list/watch in addition to delete for an informer to be functional

Exclude resources that are not watchable from informer construction

Also fixes a bug with the graph builder not using the instance-configured list of ignored resources

/assign @ironcladlou

```release-note
NONE
```
2017-11-16 15:16:16 -08:00
Kubernetes Submit Queue e7258eecaa
Merge pull request #55889 from kubernetes/revert-53466-localSSDUUID
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>.

Revert "Add options for mounting SCSI or NVMe local SSD though Block or Filesystem and do all of that with UUID"

Reverts kubernetes/kubernetes#53466

@mindprince @davidz627
2017-11-16 12:56:36 -08:00
Sergey Lanzman 3474747465 Move regexp.MustCompile to global variable 2017-11-16 22:03:12 +02:00
Kubernetes Submit Queue 0eb999c26a
Merge pull request #55562 from mtaufen/eject-non-gated-alpha-fields
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>.

Move 'alpha' KubeletConfiguration fields that aren't feature-gated and self-registration fields to KubeletFlags

Some of these fields are marked "alpha" in help text. They cannot be in the KubeletConfiguration object unless they are feature gated or graduated from alpha. 

Others relate to Kubelet self-registration, and given https://github.com/kubernetes/community/pull/911 I think its prudent to wait and see if these really should be in the KubeletConfiguration type.

For now we just leave them all as flags.

```release-note
NONE
```
2017-11-16 10:36:10 -08:00
Kubernetes Submit Queue 8823a83565
Merge pull request #55846 from mindprince/fix-defaulttolerationseconds-test
Automatic merge from submit-queue (batch tested with PRs 55371, 55846). 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 TestForgivenessAdmission.

This test would never fail because Annotations were empty in all cases!

This was missed when Tolerations were moved from Annotations to be part of Pod.Spec in #38957.

/kind bug
/sig scheduling

**Release note**:
```release-note
NONE
```
2017-11-16 08:13:28 -08:00
Kubernetes Submit Queue 2f2d49442f
Merge pull request #55371 from charrywanganthony/showlabel
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>.

Using --show-labels with incompatible ‘kubectl get’ arguments should …

…error out

**What this PR does / why we need it**:
According to @ahmetb 's [issue](https://github.com/kubernetes/kubernetes/issues/55290)  
Under specific circumstances, current behavior is that the `--show-labels` simply doesn’t make a difference since it’s not applicable.  

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

**Release note**:

```release-note
NONE
```
2017-11-16 08:03:18 -08:00
Mike Danese 0117006a54
Revert "Add options for mounting SCSI or NVMe local SSD though Block or Filesystem and do all of that with UUID" 2017-11-16 07:51:38 -08:00
Kubernetes Submit Queue 6a3d3a42db
Merge pull request #55581 from yuexiao-wang/remove-redundant
Automatic merge from submit-queue (batch tested with PRs 54647, 55581). 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 redundant code in ValidateDiscovery

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>



**What this PR does / why we need it**:
Remove redundant code in ValidateDiscovery.
It deplicated check for DiscoveryToken and DiscoveryFile as follows:


func ValidateDiscovery(c *kubeadm.NodeConfiguration, fldPath *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}

	if len(c.DiscoveryToken) != 0 {
		allErrs = append(allErrs, ValidateToken(c.DiscoveryToken, fldPath)...)
	}
	if len(c.DiscoveryFile) != 0 {
		allErrs = append(allErrs, ValidateDiscoveryFile(c.DiscoveryFile, fldPath)...)
	}
	allErrs = append(allErrs, ValidateArgSelection(c, fldPath)...)
	allErrs = append(allErrs, ValidateToken(c.TLSBootstrapToken, fldPath)...)
	allErrs = append(allErrs, ValidateJoinDiscoveryTokenAPIServer(c, fldPath)...)

	if len(c.DiscoveryToken) != 0 {
		allErrs = append(allErrs, ValidateToken(c.DiscoveryToken, fldPath)...)
	}
	if len(c.DiscoveryFile) != 0 {
		allErrs = append(allErrs, ValidateDiscoveryFile(c.DiscoveryFile, fldPath)...)
	}
	return allErrs
}

**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**:
cc @luxas 

**Release note**:

```release-note
NONE
```
2017-11-16 07:22:16 -08:00
Kubernetes Submit Queue 321b36c484
Merge pull request #54647 from colemickens/crd-validation-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>.

Validation for CRD custom resources: feature gate promotion alpha->beta

**What this PR does / why we need it**: This promotes CRD Validation from **alpha** to **beta**.

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

**Special notes for your reviewer**: Issue #53829 discusses potential blockers to promoting CRD Validation to beta. None of the potential blockers are actual blockers, as they can all be accomplished without backward incompatible changes.

**Release note**:

```release-note
Promote validation for custom resources defined through CRD to beta
```

cc: @sttts @nikhita @mbohlool
2017-11-16 07:19:02 -08:00
Kubernetes Submit Queue 6ac3136bd4
Merge pull request #55849 from cimomo/small-fixes
Automatic merge from submit-queue (batch tested with PRs 55868, 55393, 55152, 55849). 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 a typo in CloudControllerManager

**What this PR does / why we need it**:
Fix a typo in CloudControllerManager
**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
```
2017-11-16 06:32:24 -08:00
Kubernetes Submit Queue c5e543308b
Merge pull request #55152 from fabriziopandini/kubeadm-doc-preflight
Automatic merge from submit-queue (batch tested with PRs 55868, 55393, 55152, 55849). 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 documentation for kubeadm preflight command

**What this PR does / why we need it**:
This PR is part of the effort for improving kubeadm reference doc (CLI, website, manpages), and more specifically improves documentation for `kubeadm alpha phase preflight`

**Which issue(s) this PR fixes**:
part of the effort for [#265](https://github.com/kubernetes/kubeadm/issues/265)

**Special notes for your reviewer**:
The PR has two commits:
- `Clone documentation utility from //pkg/kubectl/cmd/templates`, that re-implements in kubeadm some kubectl utilities for handling description and examples for cobra.commands; more PR will follow re-using those utilities. NB. I was forced to add an exception to golint because `blackfriday.Renderer` requires to implement an interface that is not compliant
- `kubeadm-doc-preflight` that implements improvement to `kubeadm alpha phase preflight`

**Release note**:
```release-note
NONE
```
2017-11-16 06:32:21 -08:00
Kubernetes Submit Queue 403055cbe9
Merge pull request #55393 from jamiehannaford/octavia
Automatic merge from submit-queue (batch tested with PRs 55868, 55393, 55152, 55849). 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>.

Adds Octavia v2 as LoadBalancer provider

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

Adds support for using Octavia as the OpenStack LB provider.  

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

Although some LB providers can be specified using the [lb-provider](https://github.com/kubernetes/kubernetes/pull/54176/files#diff-694c675fe77b09923cc453e7228f8fa8R85) JSON request field, other installations which use Octavia by default rely on it being discovered via the service catalog. When a user specifies the `load-balancer` service type, it will get back the root Octavia endpoint URL, which needs to have `v2.0` appended to it.

To facilitate this change, gophercloud recently added the `NewLoadBalancerV2` helper in https://github.com/gophercloud/gophercloud/pull/591.

**Release note**:

```release-note
Octavia v2 now supported as a LB provider
```

/cc @xgerman
2017-11-16 06:32:19 -08:00
Kubernetes Submit Queue ff5cea4b43
Merge pull request #55868 from shyamjvs/kubemark-resource-gatherer-fix
Automatic merge from submit-queue (batch tested with PRs 55868, 55393, 55152, 55849). 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>.

Set resource-gathering and probe-duration period for kubemark

Ref https://github.com/kubernetes/kubernetes/issues/55818#issuecomment-344888480

/cc @porridge 
fyi - @jiayingz
2017-11-16 06:32:16 -08:00
Hemant Kumar 5297c146c1 Fix dangling attach errors
Detach volumes from shutdown nodes and ensure that
dangling volumes are handled correctly in AWS
2017-11-16 08:43:36 -05:00