Commit Graph

22644 Commits (4a08a693b754740148bd75d040a7bfa6be1a3d30)

Author SHA1 Message Date
Clayton Coleman 333536a68b
Move client cert bootstrap to a kubelet package
Makes it more clearly associated with the existing code and simplifies
cmd/kubelet/app.
2017-07-25 17:54:15 -04:00
Clayton Coleman 48236f0321
Move cmd/kubelet/app/bootstrap.go to a kubelet subpackage 2017-07-25 17:53:39 -04:00
Kubernetes Submit Queue 6fbc554c6b Merge pull request #48960 from sjenning/no-event-on-dns-dedup
Automatic merge from submit-queue (batch tested with PRs 45040, 48960)

Do not generate warning event on dns search deduplication

In the case that the node is able to use the cluster DNS, `cluster.local` will already be in the node search domains in `/etc/resolv.conf`.  The kubelet then parses `/etc/resolv.conf` on the node and combines it with  $namespace.svc.$clusterDomain, svc.$clusterDomain, and $clusterDomain to create the pod DNS search domains.  clusterDomain is `cluster.local` by default.  This causes the code to generate a Warning event visible to the user for _every_ pod:

```
Warning   DNSSearchForming     Found and omitted duplicated dns domain in host search line: 'cluster.local' during merging with cluster dns domains
```
This is really overkill.  IMHO, this should be done in the background with no user level notification or logging at all.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1471198

@derekwaynecarr @eparis @vefimova
2017-07-25 14:40:44 -07:00
Anirudh c168a3faeb DS: autogen 2017-07-25 13:33:25 -07:00
Anirudh c7a25a3786 DS: Api Machinery Fixes 2017-07-25 13:33:21 -07:00
Kubernetes Submit Queue bb48546658 Merge pull request #49359 from wanghaoran1988/convert_to_table_printer
Automatic merge from submit-queue

Add some table printer

**What this PR does / why we need it**:
Add table printer for Service resource

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

**Special notes for your reviewer**:

**Release note**:

```
None
```
2017-07-25 13:08:01 -07:00
Kubernetes Submit Queue 427dfd5ce1 Merge pull request #49430 from dims/set-external-hostname-in-local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Set external hostname in local-up-cluster

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

If we set --external-hostname, then the api server does not look
in the CloudProviderOptions.DefaultExternalHost method. While we
are at it, let's log an info message, so if there is a failure
the operator gets a hint that they can use --external-hostname
to bypass the lookup in the cloud provider. This will enable us
to set the CLOUD_PROVIDER to openstack for example and not have to
really run api server inside a openstack vm.

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

```release-note
NONE
```
2017-07-25 12:14:48 -07:00
Kubernetes Submit Queue 2189314895 Merge pull request #40050 from mtaufen/standalone-mode
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Use presence of kubeconfig file to toggle standalone mode

Fixes #40049 

```release-note
The deprecated --api-servers flag has been removed. Use --kubeconfig to provide API server connection information instead. The --require-kubeconfig flag is now deprecated. The default kubeconfig path is also deprecated. Both --require-kubeconfig and the default kubeconfig path will be removed in Kubernetes v1.10.0.
```

/cc @kubernetes/sig-cluster-lifecycle-misc @kubernetes/sig-node-misc
2017-07-25 12:14:43 -07:00
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

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

**Which issue this PR fixes**: fixes #48975

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

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
foxish ca38850ab1 DS: kubectl changes 2017-07-25 11:47:57 -07:00
foxish 14d5793869 DS: changes to server and storage 2017-07-25 11:47:57 -07:00
foxish 55e968de16 DS: Add conversion functions 2017-07-25 11:47:57 -07:00
foxish af32aeebd0 DS: added unversioned type apps.DaemonSet and validation 2017-07-25 11:47:57 -07:00
foxish e3a22d8f9e DS: added v1beta2/defaults 2017-07-25 11:47:57 -07:00
Antoine Pelisse 064f806424 openapi: refactor into more generic structure
Refactor the openapi schema to be a more generic structure that can be
"visited" to get more specific types.
2017-07-25 11:45:29 -07:00
Kubernetes Submit Queue a25a51cc0f Merge pull request #45946 from atlassian/expose-informer-constructors
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

Expose informer constructors

**What this PR does / why we need it**:
See #45939

**Which issue this PR fixes**
Fixes #45939

**Release note**:

```release-note
NONE
```
2017-07-25 11:06:51 -07:00
Kubernetes Submit Queue 393b1228c9 Merge pull request #45431 from DirectXMan12/feature/fake-dynamic-client
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

[client-go] Fake Dynamic Client

This commit converts `"k8s.io/client-go/dynamic".Client` to an interface, and implements fake versions of both `ClientPool` and `Client`.  This allows components which make uses of these clients to be tested in the same way that clientset-based components can be tested, using the standard `testing.Fake` machinery.

**Release note**:
```release-note
NONE
```
2017-07-25 11:06:49 -07:00
Kubernetes Submit Queue 9c3d0e8a96 Merge pull request #48224 from deads2k/controller-11-reflectormetrics
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

add reflector metrics

This adds metrics (optionally prometheus) to reflectors so that you can see when one reflector is behaving poorly and just how poorly its doing.

@eparis 

```release-note
Adds metrics for checking reflector health.
```
2017-07-25 11:06:47 -07:00
Kubernetes Submit Queue 12cc64252d Merge pull request #49566 from deads2k/owners-03-remove-me
Automatic merge from submit-queue

remove deads2k from volume reviewer

I don't know details of volume management well enough to give meaningful reviews.
2017-07-25 08:22:21 -07:00
Kubernetes Submit Queue 9bdf464bd5 Merge pull request #49286 from kargakis/remote-myself-from-some-places
Automatic merge from submit-queue (batch tested with PRs 49286, 49550)

Remove myself from a bunch of places

I am assigned in reviews which I never get to do. I prefer drive-bys whenever I can do them rather than the bot choosing myself in random, ends up being mere spam.

@smarterclayton please approve.
2017-07-25 06:41:08 -07:00
deads2k 151d39682e add reflector metrics 2017-07-25 09:01:37 -04:00
deads2k 94e9993900 remove deads2k from volume reviewer 2017-07-25 08:52:25 -04:00
xiangpengzhao a4e04bb633 Change log level for pod manifest 2017-07-25 19:05:32 +08:00
xiangpengzhao 55e045d9db Change pod config to manifest 2017-07-25 18:58:25 +08:00
Kubernetes Submit Queue cce1c9b41e Merge pull request #49192 from mfojtik/unify-clientgen-tags
Automatic merge from submit-queue (batch tested with PRs 49498, 49192)

Unify genclient tags and add more fine control on verbs generated

This will change the syntax of the existing `genclient` tags be like this:

```
// +genclient
// +genclient:noStatus
// +genclient:noVerbs
// +genclient:nonNamespaced
// +genclient:readonly
```

The first one indicates the client will be generated from the struct below and the other tags are basically options to the genclient (which justify why they should be prefixed with `genclient:`)

This also changes the `// +genclientstatus=false` to `// +genclient:noStatus` to follow the pattern and also changes the `// +noMethods=true` to `// +genclient:noVerbs` as we call the REST operations verbs so it will make it consistent with terminology.

In addition to existing options this patch also add two more to allow more fine-grained control on which verbs are going to be generated. This is extra useful for third-party projects (like OpenShift) where some resources does not implement full CRUD, but for example just "create" verb or "create" and "delete"...
To support that, you can use this syntax:

```
// +genclient:onlyVerbs=create,delete
// +genclient:skipVerbs=patch
```

The first one will generate only create and delete functions and second one will generate full CRUD without "patch" actions. This somehow overlaps with the existing "readonly" tag, but I want to keep that tag in place as it reads better in some cases ;-)
2017-07-25 02:43:13 -07:00
Kubernetes Submit Queue 8d1b090d6e Merge pull request #49496 from rootfs/iscsi-fc-reviewer
Automatic merge from submit-queue (batch tested with PRs 49479, 49496)

tune iscsi and fc volume owner

**What this PR does / why we need it**:
add @mtanino to iscsi and fc volume reviewer

**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**:
@kubernetes/sig-storage-misc 
**Release note**:

```release-note
NONE
```
2017-07-25 01:41:31 -07:00
zhangxiaoyu-zidif 1292827bb0 add namespace test 2017-07-25 15:54:11 +08:00
Kubernetes Submit Queue 7f1d9382ec Merge pull request #48846 from dashpole/remove_ood
Automatic merge from submit-queue

Remove flags low-diskspace-threshold-mb and outofdisk-transition-frequency

issue: #48843

This removes two flags replaced by the eviction manager.  These have been depreciated for two releases, which I believe correctly follows the kubernetes depreciation guidelines.

```release-note
Remove depreciated flags: --low-diskspace-threshold-mb and --outofdisk-transition-frequency, which are replaced by --eviction-hard
```

cc @mtaufen since I am changing kubelet flags
cc @vishh @derekwaynecarr 
/sig node
2017-07-24 23:05:50 -07:00
Di Xu 2235d8d6cc update related files 2017-07-25 12:56:50 +08:00
Di Xu 6addd4c9dd set default adminid for rbd deleter 2017-07-25 12:51:10 +08:00
Kubernetes Submit Queue 144a4c2b74 Merge pull request #49358 from jianglingxia/jlx72113
Automatic merge from submit-queue

[trival] fix typo

**What this PR does / why we need it**:
some file word spell error that amend correct
**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**:

```release-note
NONE
2017-07-24 21:26:54 -07:00
Haoran Wang 4d5417ad7f Add Node table printer 2017-07-25 12:20:50 +08:00
Haoran Wang dc5a8ec829 Add Endpoint table printer 2017-07-25 12:16:39 +08:00
Haoran Wang 65a6479521 Add statefulset table printer 2017-07-25 12:16:31 +08:00
Kubernetes Submit Queue ee7eb4a241 Merge pull request #49274 from dixudx/add_const_for_rbd
Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274)

set RBD default values as constant vars

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

When working on #49225, I found some [default RBD parameters](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#ceph-rbd) had not been declared as constant values, which will be error-prone.

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

```release-note
set RBD default values as constant vars
```
2017-07-24 20:39:22 -07:00
Kubernetes Submit Queue f08e530257 Merge pull request #49362 from zhangxiaoyu-zidif/fix-pdb-describer
Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274)

Add namespace for describe pdb

**What this PR does / why we need it**:
add namespace for describe pdb

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

**Release note**:

```release-note
NONE
```
2017-07-24 20:39:20 -07:00
Kubernetes Submit Queue 0e94e9439f Merge pull request #49438 from zhangxiaoyu-zidif/delete-err-def-for-drain
Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274)

Delete redundant err definition

**What this PR does / why we need it**:
Delete redundant err definition
line 642 has its definition and initialization, so line 641 is redundant.

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-07-24 20:39:18 -07:00
Kubernetes Submit Queue 159dcbfbe4 Merge pull request #49475 from jsafrane/fix-gluster-make
Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274)

Fixed glusterfs mount options

Capacity of a slice is the third argument, not the second one.
We use append() to fill the slice, so it should be empty at the beginning
and with the right capacity.

```release-note
NONE
```
2017-07-24 20:39:13 -07:00
Kubernetes Submit Queue 0dfc696d1b Merge pull request #49417 from caesarxuchao/rename
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

[nit] Rename pkg/api/v1/builder.go to register.go to be consistent with others
2017-07-24 19:30:40 -07:00
Kubernetes Submit Queue 7e5fd72aa6 Merge pull request #49251 from enisoc/initialized-annotation
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

StatefulSet: Remove `pod.alpha.kubernetes.io/initialized` annotation.

The `pod.alpha.kubernetes.io/initialized` annotation was originally a tool for validating StatefulSet's ordered Pod creation guarantees during the feature's alpha phase.

If set to "false" on a given Pod, it would interrupt StatefulSet's normal behavior. In v1.5.0, the annotation was deprecated and the default became "true" as part of StatefulSet's graduation to beta.

The annotation is now ignored, meaning it cannot be used to interrupt StatefulSet Pod management.

```release-note
StatefulSet: The deprecated `pod.alpha.kubernetes.io/initialized` annotation for interrupting StatefulSet Pod management is now ignored. If you were setting it to `true` or leaving it unset, no action is required. However, if you were setting it to `false`, be aware that previously-dormant StatefulSets may become active after upgrading.
```

ref #41605
2017-07-24 19:30:37 -07:00
Kubernetes Submit Queue 8c58bb6ed3 Merge pull request #49088 from xiangpengzhao/get-crd
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

Add customresourcedefinition and its shortcut in "kubectl get"

**What this PR does / why we need it**:
Add customresourcedefinition and its shortcut in "kubectl get" help info.

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

**Special notes for your reviewer**:
/cc @orangedeng 

**Release note**:

```release-note
NONE
```
2017-07-24 19:30:35 -07:00
Kubernetes Submit Queue e623fed778 Merge pull request #48636 from jingxu97/July/allocatable
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

Fix issues for local storage allocatable feature

This PR fixes the following issues:
1. Use ResourceStorageScratch instead of ResourceStorage API to represent
local storage capacity
2. In eviction manager, use container manager instead of node provider
(kubelet) to retrieve the node capacity and reserved resources. Node
provider (kubelet) has a feature gate so that storagescratch information
may not be exposed if feature gate is not set. On the other hand,
container manager has all the capacity and allocatable resource
information.

This PR fixes issue #47809
2017-07-24 19:30:33 -07:00
Mikhail Mazurskiy 37f909a274
Re-generate informers 2017-07-25 12:19:18 +10:00
Haoran Wang d114045577 Add ingress table printer 2017-07-25 10:05:10 +08:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Haoran Wang 9bd1529a98 Add Service table printer 2017-07-25 07:12:45 +08:00
Chao Xu 5e7d7c00a2 let garbage collector send orphaning patches in parallel 2017-07-24 13:56:39 -07:00
Kubernetes Submit Queue 1feb0fa6aa Merge pull request #49118 from adelton/flex-bind-mount
Automatic merge from submit-queue (batch tested with PRs 49444, 47864, 48584, 49395, 49118)

Allow unmounting bind-mounted directories.

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

For files, we cannot use `path/..`;
we could use `filepath.Dir` but for bind-mounted, `isNotMounted` which calls `IsLikelyNotMountPoint` would not work anyway.
Let's just have the driver do the work.

Addressing
```
Error: UnmountVolume.TearDown failed for volume "..." (volume.spec.Name: "...") pod "..." (UID: "...") with: lstat /path/.../test-flex/..: not a directory
```

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

N/A

**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
It is now posible to use flexVolumes to bind mount directories and files.
```
2017-07-24 13:52:42 -07:00
Kubernetes Submit Queue 86cc83c3eb Merge pull request #48584 from yiqinguo/yiqinguo_eventtype
Automatic merge from submit-queue (batch tested with PRs 49444, 47864, 48584, 49395, 49118)

Move event type

Change SandboxChanged to a constant and move to the event package below.
**Release note**:
```release-note
NONE
```
2017-07-24 13:52:36 -07:00
Kubernetes Submit Queue 9891f66672 Merge pull request #49444 from eparis/drain-livelock
Automatic merge from submit-queue (batch tested with PRs 49444, 47864, 48584, 49395, 49118)

Do not spin forever if kubectl drain races with other removal

In https://github.com/kubernetes/kubernetes/pull/47450 we stopped
returning an error if a pod disappeared before we could remove it.
Instead we just continue to spin forever. Return "success" if a pod
disappeared before we actually removed it.

https://bugzilla.redhat.com/1473777
bug 1473777

```release-note
`kubectl drain` no longer spins trying to delete pods that do not exist
```
2017-07-24 13:52:31 -07:00
Michal Fojtik e6be341a64
regenerate clients 2017-07-24 22:35:19 +02:00
Michal Fojtik dad4ee3108
regenerate clients to pickup updated genclient:noStatus comment 2017-07-24 22:05:21 +02:00
Michal Fojtik 976488efec
update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
Michael Taufen 38aee0464d Providing kubeconfig file is now the switch for standalone mode
Replaces use of --api-servers with --kubeconfig in Kubelet args across
the turnup scripts. In many cases this involves generating a kubeconfig
file for the Kubelet and placing it in the correct location on the node.
2017-07-24 11:03:00 -07:00
Jess Frazelle a5e4c6f6ed
allowPrivilegeEscalation: update code generation
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-07-24 13:55:16 -04:00
Anthony Yeh 283211c1cf
StatefulSet: Remove `pod.alpha.kubernetes.io/initialized` annotation. 2017-07-24 10:18:47 -07:00
Jess Frazelle e1493c9c88
allowPrivilegeEscalation: apply to correct docker api versions
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-07-24 12:52:43 -04:00
Jess Frazelle 0f349cc61f
allowPrivilegeEscalation: modify api types & add functionality
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-07-24 12:52:41 -04:00
Kubernetes Submit Queue 5dbef94aaf Merge pull request #49470 from jianglingxia/jlx72414
Automatic merge from submit-queue (batch tested with PRs 45345, 49470, 49407, 49448, 49486)

statefulset_expansion.go delete ps define

reopen #46157 

**Release note**:

```release-note
NONE
2017-07-24 07:40:50 -07:00
Kubernetes Submit Queue d286f56221 Merge pull request #45345 from codablock/storageclass_fstype
Automatic merge from submit-queue (batch tested with PRs 45345, 49470, 49407, 49448, 49486)

Support "fstype" parameter in dynamically provisioned PVs

This PR is a replacement for https://github.com/kubernetes/kubernetes/pull/40805. I was not able to push fixes and rebases to the original branch as I don't have access to the Github organization anymore.

I assume the PR will need a new "ok to test" 

**ORIGINAL PR DESCRIPTION**

**What this PR does / why we need it**: This PR allows specifying the desired FSType when dynamically provisioning volumes with storage classes. The FSType can now be set as a parameter:
```yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: test
provisioner: kubernetes.io/azure-disk
parameters:
  fstype: xfs
```

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

**Special notes for your reviewer**:
The PR also implicitly adds checks for unsupported parameters.

**Release note**:

```release-note
Support specifying of FSType in StorageClass
```
2017-07-24 07:40:47 -07:00
Huamin Chen 3b91bdc261 tune iscsi and fc volume owner
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-07-24 13:59:06 +00:00
Davanum Srinivas f4011d485a Set external hostname in local-up-cluster
If we set --external-hostname, then the api server does not look
in the CloudProviderOptions.DefaultExternalHost method. While we
are at it, let's log an info message, so if there is a failure
the operator gets a hint that they can use --external-hostname
to bypass the lookup in the cloud provider. This will enable us
to set the CLOUD_PROVIDER to openstack for example and not have to
really run api server inside a openstack vm.
2017-07-24 07:58:46 -04:00
Jan Pazdziora 6b7d4b7922 Allow unmounting bind-mounted directories.
For bind-mounted directories, the isNotMounted which calls
IsLikelyNotMountPoint fails because the filesystem of the mounted
location and the parent directory are the same.

Addressing:
unmounter.go:59] Warning: Path: /path/.../test-dir already unmounted
2017-07-24 13:33:10 +02:00
Jan Safranek f6a8436504 Fixed glusterfs mount options
Capacity of a slice is the third argument, not the second one.
We use append() to fill the slice, so it should be empty at the beginning
and with the right capacity.
2017-07-24 10:20:39 +02:00
jianglingxia c412849722 statefulset_expansion.go delete ps define 2017-07-24 14:24:16 +08:00
Kubernetes Submit Queue 1bcb381169 Merge pull request #49355 from dhilipkumars/UTDeployment
Automatic merge from submit-queue

deployment: SetNewReplicaSetAnnotations() should compare revisions as numbers than strings

**What this PR does / why we need it**: 
1) SetNewReplicaSetAnnotations() when deployment revision annotation is copied over to RS, it performs a string comparison instead of int comparison, due to this any revision beyond 9 might not get copied.
2) Slightly improves the coverage by adding UT for Annotation related functions
3) Upgrade the test suite to use go-langs sub-test, which is very useful while investigating UT related failures.

```
--- FAIL: TestAnnotationUtils (0.00s)
    --- FAIL: TestAnnotationUtils/SetNewReplicaSetAnnotations (0.00s)
        deployment_util_test.go:1283: Revision Expected=10 Obtained=9
        deployment_util_test.go:1283: Revision Expected=11 Obtained=9
        deployment_util_test.go:1283: Revision Expected=12 Obtained=9
        deployment_util_test.go:1283: Revision Expected=13 Obtained=9
        deployment_util_test.go:1283: Revision Expected=14 Obtained=9
        deployment_util_test.go:1283: Revision Expected=15 Obtained=9
        deployment_util_test.go:1283: Revision Expected=16 Obtained=9
        deployment_util_test.go:1283: Revision Expected=17 Obtained=9
        deployment_util_test.go:1283: Revision Expected=18 Obtained=9
        deployment_util_test.go:1283: Revision Expected=19 Obtained=9
        deployment_util_test.go:1283: Revision Expected=20 Obtained=9
    --- PASS: TestAnnotationUtils/SetReplicasAnnotations (0.00s)
    --- PASS: TestAnnotationUtils/IsSaturated (0.00s)
```

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

```release-note
```
cc: @kargakis
2017-07-22 10:56:55 -07:00
Eric Paris 7c531ecc13 Do not spin forever if kubectl drain races with other removal
In https://github.com/kubernetes/kubernetes/pull/47450 we stopped
returning an error if a pod disappeared before we could remove it.
Instead we just continue to spin forever. Return "success" if a pod
disappeared before we actually removed it.

https://bugzilla.redhat.com/1473777
bug 1473777
2017-07-22 13:39:01 -04:00
Kubernetes Submit Queue f26b2956fb Merge pull request #48418 from xiangpengzhao/refactor-create-svc
Automatic merge from submit-queue (batch tested with PRs 49409, 49352, 49266, 48418)

Use helper to init ClusterIP and NodePort in Create of service

**What this PR does / why we need it**:
Make service `Create` more readable and testable.

- use `initClusterIP` introduced in #46197 to init ClusterIP allocation in service `Create`
- add a new helper `initNodePort` to init NodePort allocation in service `Create`
- TBD: add test case for `initNodePort`. This will cover the NodePort allocation process in `Create`. If this PR makes sense, I will write a test case later.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #35354 (not directly. #35354 was fixed by #46197. The idea of this PR is from https://github.com/kubernetes/kubernetes/pull/46197#discussion_r120910077)

**Special notes for your reviewer**:
/cc @thockin @freehan 

**Release note**:

```release-note
NONE
```
2017-07-22 02:05:21 -07:00
zhangxiaoyu-zidif 1b785d09d4 Delete redundant err definition 2017-07-22 16:19:32 +08:00
Kubernetes Submit Queue a79e6b183d Merge pull request #49346 from caesarxuchao/generate-to-client-go
Automatic merge from submit-queue (batch tested with PRs 49326, 49394, 49346, 49379, 49399)

Make client-go authoritative

client-go now is authoritative except for `client-go/pkg/version`, which I think we can leave as is for a while.
2017-07-21 23:23:35 -07:00
Kubernetes Submit Queue 1dbe09b1f6 Merge pull request #49326 from deads2k/cli-16-all
Automatic merge from submit-queue

add cronjobs to all

Categories were added to the discovery API, but the `kubectl` plumbing didn't make it.  We *did* make `kubectl all` gate on discovery information, so it can least be a superset.  

`cronjobs` are user resources, so I've added them to the list.

@kubernetes/sig-cli-misc 

```release-note
added cronjobs.batch to all, so kubectl get all returns them.
```
2017-07-21 23:18:58 -07:00
Kubernetes Submit Queue c1c7193b4d Merge pull request #46514 from ravisantoshgudimetla/scheduler_taints_refactor
Automatic merge from submit-queue (batch tested with PRs 49420, 49296, 49299, 49371, 46514)

Refactoring taint functions to reduce sprawl

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

**Special notes for your reviewer**:
@gmarek @timothysc @k82cn @jayunit100 - I moved some fn's to helpers and some to utils. LMK, if you are ok with this change.

**Release note**:

```release-note
NONE
```
2017-07-21 22:23:24 -07:00
Kubernetes Submit Queue 4560beb28f Merge pull request #49299 from dims/delay-looking-for-instance-id
Automatic merge from submit-queue (batch tested with PRs 49420, 49296, 49299, 49371, 46514)

Avoid looking up instance id until we need it

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

currently kube-controller-manager cannot run outside of a vm started
by openstack (with --cloud-provider=openstack params). We try to read
the instance id from the metadata provider or the config drive or the
file location only when we really need it. In the normal scenario, the
controller-manager uses the node name to get the instance id.
41541910e1/pkg/volume/cinder/attacher.go (L149)

The localInstanceID is currently used only in the test case, so let
us not read it until it is really needed.

So let's try to find the instance-id only when 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**:

```release-note
NONE
```
2017-07-21 22:23:19 -07:00
Kubernetes Submit Queue ab35df57eb Merge pull request #49420 from gnufied/fix-adc-controller-nil-spec
Automatic merge from submit-queue (batch tested with PRs 49420, 49296, 49299, 49371, 46514)

Fix controller crash because of nil volume spec

For volumes that don't support bulk volume verification, a nil
volume spec can cause crash of controller.

Fixes #49418

**Release note**:
```release-note
Fixes #49418 where kube-controller-manager can panic on volume.CanSupport methods and enter a crash loop.
```
2017-07-21 22:23:14 -07:00
Kubernetes Submit Queue 5d5d6ca3f8 Merge pull request #49240 from caesarxuchao/remove-admission-types
Automatic merge from submit-queue (batch tested with PRs 46210, 48607, 46874, 46598, 49240)

Remove types.generated.go generated for internal API types

We don't need generated codecs for internal types.
2017-07-21 17:00:23 -07:00
Kubernetes Submit Queue 22cc294364 Merge pull request #46598 from xiangpengzhao/fix-kubectl-version
Automatic merge from submit-queue (batch tested with PRs 46210, 48607, 46874, 46598, 49240)

Make "kubectl version" json format output more readable.

**What this PR does / why we need it**:
##39858 adds a flag --output to `kubectl version`, but the json format output is displayed in one line. It's not so readable. This PR fixes it.

and

- adds a shorthand for `output`
- ~~refactors that: if `--short` is specified, `--output` will be ignored~~

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

**Special notes for your reviewer**:
/cc @php-coder @alejandroEsc 

**Release note**:

```release-note
NONE
```
2017-07-21 17:00:21 -07:00
Kubernetes Submit Queue b940d14261 Merge pull request #46210 from xiangpengzhao/print-volume-info
Automatic merge from submit-queue

Add AzureFile,FC,Flex,Flocker volume source to describe printer.

**What this PR does / why we need it**:
Display other volume sources in describe printer.

**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**:
Also need CephFS. It will be added in #46124 

/cc @rootfs 

_ADD: all the volume source printers are sorted out of order. I'd like to sort them alphabetically in order to be more readable in another PR after this PR merged. WDYT?_ 

**Release note**:

```release-note
NONE
```
2017-07-21 16:45:37 -07:00
Hemant Kumar 0b1d61db00 Fix controller crash because of nil volume spec
For volumes that don't support bulk volume verifiction, a nil
volume spec can cause crash of controller.
2017-07-21 18:42:11 -04:00
Chao Xu 44f0188fe7 generated innocuous change 2017-07-21 14:29:59 -07:00
Chao Xu 9011cfa573 rename pkg/api/v1/builder.go to register.go to be consistent with others 2017-07-21 14:03:32 -07:00
Chao Xu 09ee053ceb remove external clientset, listers, informers from kubernetes 2017-07-21 13:35:23 -07:00
Kubernetes Submit Queue ae1ff1a2d4 Merge pull request #48746 from janetkuo/apps-v1beta2
Automatic merge from submit-queue

Add a new API version apps/v1beta2

xref: #49135
This PR adds a new API version `apps/v1beta2` which contains a copy (of types, conversions, and defaults) of `apps/v1beta1` StatefulSet, Deployment, and their subresources. Note that `apps/v1beta2` is still WIP and we will make breaking changes to it before releasing 1.8.

Moving core controllers (StatefulSet, Deployment, ReplicaSet, DaemonSet) to `apps/v1beta2` is the first step of moving them to `apps/v1` (GA). 

This PR is a starting point for DaemonSet and ReplicaSet to move from `/extensions` to `/apps` and for Deployment and StatefulSet to make some breaking changes (e.g. new defaults and/or remove deprecated fields).

```release-note
Add a new API version apps/v1beta2
```
2017-07-21 11:47:21 -07:00
Solly Ross f78d61e7c2 [client-go] Add dynamic.Interface
This adds an interface form of dynamic.Client and
dynamic.ResourceClient, making those two follow the general client
conventions: `Interface` is an interface, and `Client` is the concrete
implementation.  `ClientPool` retains it's interface status.

This allows us to create a fake implemenation of dyanmic.Interface,
dynamic.ResourceInterface, and dynamic.ClientPool for testing.
2017-07-21 14:24:06 -04:00
deads2k 1477b407c7 add cronjobs to all 2017-07-21 10:56:26 -04:00
Kubernetes Submit Queue 010858262f Merge pull request #49127 from humblec/backupvol-count
Automatic merge from submit-queue (batch tested with PRs 49328, 49285, 49307, 49127, 49163)

Make definite mount timeout for glusterfs volume mount.

The `backup-volfile-servers` mount option allows to specify more than 
one server to be contacted in single mount command. With this option in place,
it is not required to iterate over all the servers in the addrlist.
A mount attempt with this option  will fetch all the servers mentioned in
the list, Reference # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-21 03:00:21 -07:00
Kubernetes Submit Queue 29cc1aab05 Merge pull request #49285 from mfojtik/fix-statefull-mutation
Automatic merge from submit-queue (batch tested with PRs 49328, 49285, 49307, 49127, 49163)

fix mutation in statefulset sync

Original issue: https://github.com/openshift/origin/issues/15324

Seems like something inside `UpdateStatefulSet` mutates the StatefulSet. We might need to dig deeper to find the exact location where the non-copy mutation happens.
2017-07-21 03:00:16 -07:00
zhangxiaoyu-zidif 74d2aa4dee add namespace for describe pdb 2017-07-21 16:47:37 +08:00
jianglingxia 88828cc777 [trival] fix typo 2017-07-21 16:38:08 +08:00
Kubernetes Submit Queue 396207b188 Merge pull request #48565 from jmillikin-stripe/support-external-deps
Automatic merge from submit-queue (batch tested with PRs 48565, 49172)

Use $(location) to find generated output paths.

Along with the build-infra PR https://github.com/kubernetes/repo-infra/pull/19, this allows Kubernetes binaries (e.g. hyperkube) to be built as external dependencies in other Bazel projects.

```release-note
NONE
```
2017-07-21 01:13:17 -07:00
dhilipkumars 4967bb7342 Review Comments 2017-07-21 13:42:13 +05:30
Di Xu 09761a5651 fix invalid issue link on api conversion 2017-07-21 14:45:14 +08:00
Kubernetes Submit Queue e6a4b5311c Merge pull request #49333 from nicksardo/gce-fix-subnetlogic
Automatic merge from submit-queue (batch tested with PRs 49222, 49333, 48708, 49337)

GCE: Fix network/subnet url logic

Split if conditions: fixes #48521

/assign @bowei 

```release-note
NONE
```
2017-07-20 23:01:18 -07:00
dhilipkumars 10af4fa9db Add UT and upgrade this test suite with go sub-test 2017-07-21 10:43:48 +05:30
dhilipkumars f17a572ece SetNewReplicaSetAnnotations() should compare revisions as numbers than strings 2017-07-21 10:43:48 +05:30
Kubernetes Submit Queue 384b96574d Merge pull request #49330 from MrHohn/bump-gce-minNodesHealthCheckVersion
Automatic merge from submit-queue

Bump up gce minNodesHealthCheckVersion due to known issues

**What this PR does / why we need it**: There are some known issues in previous 1.7 versions causing kube-proxy not correctly responding healthz traffic.

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

**Special notes for your reviewer**:
/assign @nicksardo @freehan 
cc @bowei @thockin 

**Release note**:

```release-note
GCE Cloud Provider: New created LoadBalancer type Service will have health checks for nodes by default if all nodes have version >= v1.7.2.
```
2017-07-20 21:03:36 -07:00
yiqinguo 5417a1d5b4 Move event type 2017-07-21 09:25:33 +08:00
Casey Davenport 78709456ab Fix TODO: rename podInfraContainerID to podSandboxID 2017-07-20 17:45:55 -07:00
Kubernetes Submit Queue 29f8ff32c2 Merge pull request #48073 from wanghaoran1988/e2e_bootstrap
Automatic merge from submit-queue (batch tested with PRs 49316, 46117, 49064, 48073, 49323)

add e2e tests for the bootstrapsigner and tokencleaner controllers, integration testing for bootstrap token auth

**What this PR does / why we need it**:
Add e2e test for bootstrap signer

**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-07-20 17:02:52 -07:00
Zihong Zheng 8557f7df6d Bump up minNodesHealthCheckVersion in gce_healthcheck due to known issues 2017-07-20 16:04:40 -07:00
Nick Sardo 3ee822de67 Fix network/subnet url logic 2017-07-20 15:41:34 -07:00
David Ashpole 9bfa28bdff update things 2017-07-20 15:28:23 -07:00
Kubernetes Submit Queue 5644e3d770 Merge pull request #49227 from deads2k/quota-01-tighten
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

tighten quota controller interface

While debugging a quota performance problem, I had to chase some references deeper than necessary because the interfaces were overly broad. This tightens them.

```release-note
NONE
```
2017-07-20 15:08:27 -07:00
Kubernetes Submit Queue feed4aa12a Merge pull request #49234 from mengqiy/master
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

Move util/exec to vendor

Move util/exec to vendor.
Update import paths.
Update godep

Part of #48209

Associate PR against `k8s.io/utils` repo: https://github.com/kubernetes/utils/pull/5

```release-note
NONE
```

/assign @apelisse
2017-07-20 15:08:22 -07:00
Kubernetes Submit Queue 9e56e58647 Merge pull request #47177 from rrati/aws-additional-logging
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

Added logging to AWS api calls. #46969

Additionally logging of when AWS API calls start and end to help diagnose problems with kubelet on cloud provider nodes not reporting node status periodically.  There's some inconsistency in logging around this PR we should discuss.

IMO, the API logging should be at a higher level than most other types of logging as you would probably only want it in limited instances.  For most cases that is easy enough to do, but there are some calls which have some logging around them already, namely in the instance groups.  My preference would be to keep the existing logging as it and just add the new API logs around the API call.
2017-07-20 15:08:20 -07:00
Kubernetes Submit Queue 84f773850e Merge pull request #49107 from edevil/try_remove_old_log
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

Make sure the previous symlink file is deleted before trying to create a new one

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

It deletes possibly existing symlinks to container log files.

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

fixes #49105

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-20 15:08:17 -07:00
Janet Kuo 56f16346d2 Autogen
make clean && make generated_files && hack/update-all.sh
2017-07-20 14:16:43 -07:00
Kubernetes Submit Queue 6329c862ee Merge pull request #49111 from jsafrane/nsenter-path-space
Automatic merge from submit-queue

Fix findmnt parsing in containerized kubelet

NsEnterMounter should not stop parsing findmnt output on the first space but on the last one, just in case the mount point name itself contains a space.

Fixes #49106

```release-note
Fixed unmounting of vSphere volumes when kubelet runs in a container.
```

@kubernetes/sig-storage-pr-reviews
2017-07-20 14:10:31 -07:00
David Ashpole 7a23f8b018 remove deprecated flags LowDiskSpaceThresholdMB and OutOfDiskTransitionFrequency 2017-07-20 13:23:13 -07:00
Davanum Srinivas 6139f9ab89 Avoid looking up instance id until we need it
currently kube-controller-manager cannot run outside of a vm started
by openstack (with --cloud-provider=openstack params). We try to read
the instance id from the metadata provider or the config drive or the
file location only when we really need it. In the normal scenario, the
controller-manager uses the node name to get the instance id.
41541910e1/pkg/volume/cinder/attacher.go (L149)

The localInstanceID is currently used only in the test case, so let
us not read it until it is really needed.
2017-07-20 14:40:10 -04:00
ymqytw 9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Humble Chirammal 413380e557 The `backup-volfile-servers` mount option allows to specify more than
one server to be contacted in single mount command. With this option in place,
it is not required to iterate over all the servers in the addrlist.
A mount attempt with this option  will fetch all the servers mentioned in
the list, Reference # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-20 23:17:32 +05:30
Janet Kuo 7a2d31fd44 Don't enable apps/v1beta2 by default 2017-07-20 10:25:21 -07:00
Janet Kuo 767082e8e9 Add new API version apps/v1beta2
Add a new API version apps/v1beta2 and enable it by default.
apps/v1beta2 has a copy of apps/v1beta1 types, except for
ControllerRevision.
2017-07-20 10:25:21 -07:00
Kubernetes Submit Queue 3660ff466f Merge pull request #49235 from dims/allow-cinder-scenarios-without-load-balancer
Automatic merge from submit-queue (batch tested with PRs 49276, 49235)

Don't fail fast if LoadBalancer section is missing

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

We should allow scenarios where cinder can be used even if the
operator does not want to use the openstack load balancer. So
let's warn in the beginning if subnet-id is missing but fail only
if they try to use the load balancer

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

```release-note
NONE
```
2017-07-20 08:18:09 -07:00
Haoran Wang f02008338f add integration testing for bootstrap token auth 2017-07-20 22:34:21 +08:00
Kubernetes Submit Queue 5529d01a22 Merge pull request #48810 from sttts/sttts-fuzzer-cleanup
Automatic merge from submit-queue (batch tested with PRs 49114, 48810)

Unify fuzzers and roundtrip tests

- reorganize apimachinery/pkg/api/testing package to avoid circular imports
- make fuzzers modular per apigroup
- add roundtrip test for meta types
- add roundtrip test for a couple of staging apigroups

Follow-up:

- split `pkg/api` tests by apigroup
2017-07-20 07:20:40 -07:00
Kubernetes Submit Queue c3a9270ed4 Merge pull request #49114 from sttts/sttts-kube-gen
Automatic merge from submit-queue (batch tested with PRs 49114, 48810)

Move generators to staging/src/k8s.io/kube-gen

Reason number one for people trying the impossible of vendoring kube: reuse of the generators.
2017-07-20 07:20:37 -07:00
Davanum Srinivas 8fd21d67a8 Don't fail fast if LoadBalancer section is missing
We should allow scenarios where cinder can be used even if the
operator does not want to use the openstack load balancer. So
let's warn in the beginning if subnet-id is missing but fail only
if they try to use the load balancer
2017-07-20 07:42:28 -04:00
Michal Fojtik 4fa9b8778a
fix mutation in statefulset sync 2017-07-20 12:33:11 +02:00
Dr. Stefan Schimanski ecc811d263 Unify fuzzers and roundtrip tests 2017-07-20 12:31:00 +02:00
Michail Kargakis e884eac6fe
Remove myself from a bunch of places
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-07-20 12:10:46 +02:00
Kubernetes Submit Queue 67ec254ef3 Merge pull request #49203 from adelton/flexvolume-TestCanSupport-init-fail
Automatic merge from submit-queue (batch tested with PRs 49212, 49203, 49255)

If the init fails for whatever reason, plugin is nil and cannot be used.

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

Addressing
```
=== RUN   TestCanSupport
E0719 13:48:19.829849    2289 driver-call.go:232] init command failed, status: Successx, reason:
--- FAIL: TestCanSupport (0.00s)
	flexvolume_test.go:180: Can't find the plugin by name
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x11fc5b5]
```

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

N/A

**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
NONE
```
2017-07-20 02:35:13 -07:00
Di Xu 50bfe02fea make default values as const vars 2017-07-20 16:13:17 +08:00
Kubernetes Submit Queue acc19cafa4 Merge pull request #49231 from dims/tolerate-flavor-info-keys
Automatic merge from submit-queue

Tolerate Flavor information for computing instance type

**What this PR does / why we need it**:
Current devstack seems to return "id", and an upcoming change using
nova's microversion will be returning "original_name":
https://blueprints.launchpad.net/nova/+spec/instance-flavor-api

So let's just inspect what is present and use that to figure out
the instance type.

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

```release-note
NONE
```
2017-07-20 00:33:46 -07:00
Kubernetes Submit Queue de71cc50d5 Merge pull request #49261 from heidecke/on-premises
Automatic merge from submit-queue

Fix on-premises term in error string and comments for aws provider

**What this PR does / why we need it**: fix for correct terminology of "on-premises" over "on-premise"

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

**Special notes for your reviewer**: Updated error string while doing a scrub for the incorrect term in the docs (kubernetes/kubernetes.github.io#4413).

**Release note**:

```release-note
NONE
```
2017-07-19 23:03:26 -07:00
Dr. Stefan Schimanski edfbb9aa64 Fixup go2idl references 2017-07-20 07:41:37 +02:00
Chao Xu 6b813e437d remove types.generated.go generated for internal API types 2017-07-19 22:06:11 -07:00
Kubernetes Submit Queue ea18935670 Merge pull request #45540 from edevil/azure_extra_logging
Automatic merge from submit-queue (batch tested with PRs 49083, 45540, 46862)

Add extra logging to azure API get calls

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

This PR adds extra logging for external calls to the Azure API, specifically get calls.

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

This will help troubleshoot problems arising from the usage of this cloudprovider. For example, it looks like #43516 is caused by a call to the cloudprovider taking too much time.
2017-07-19 21:18:25 -07:00
Luke Heidecke c8b6924424 Fix on-premises term in error string and comments 2017-07-20 13:04:33 +09:00
Kubernetes Submit Queue e48ad7782e Merge pull request #49230 from deads2k/quota-02-informer
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

use informers for quota evaluation of core resources where possible

Not all quota evaluators are using shared informers.  This updates them all to have the option of doing it.

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

```
resource quota uses shared informers for core types
```
2017-07-19 20:05:39 -07:00
Kubernetes Submit Queue db1956b876 Merge pull request #48460 from cosmincojocar/azure_file_cloud_environment
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

Fix the Azure file to work within different cloud environments

**What this PR does / why we need it**:
Fix the Azure file plugin to work within different cloud environments.

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

cc @rootfs @brendandburns
2017-07-19 20:05:37 -07:00
Kubernetes Submit Queue ecadada7ef Merge pull request #48967 from jackfrancis/azure-lb-backoff
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

additional backoff in azure cloudprovider

Fixes #48971

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

We want to be able to opt in to backoff retry logic for kubelet-originating request behavior: node IP address resolution and node load balancer pool membership enforcement.

**Special notes for your reviewer**:

The use-case for this is azure cloudprovider clusters with large node counts, especially during cluster installation, or other scenarios when lots of nodes come online at once and attempt to register all resources with the backend API. To allow clusters at scale more control over the API request rate in-cluster, backoff config has the ability to meaningful slow down this rate, when appropriate.

**Release note**:

```additional backoff in azure cloudprovider
```
2017-07-19 20:05:34 -07:00
Kubernetes Submit Queue 6d534b38e8 Merge pull request #48253 from CaoShuFeng/serviceaccount
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

allow impersonate serviceaccount in cli

We can impersonate four kinds of resources according to the code:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go#L83

**Release note**:

```
allow impersonate serviceaccount in cli
```
Fixes: https://github.com/kubernetes/kubernetes/issues/48260
2017-07-19 20:05:32 -07:00
Kubernetes Submit Queue 19e4fac129 Merge pull request #49218 from caesarxuchao/limit-clientset-visibility
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

Restrict the visibility of two generated packages in pkg/client/

These two packages are deprecated. Please use the client-go copy of these two packages.

Currently staging/copy.sh copied these two packages to client-go. I'll send follow-up PRs to let code-gen output to client-go directly and remove these two packages. The purpose of this PR is to prevent more imports of these packages while I refactor the codegen.
2017-07-19 20:05:29 -07:00
Kubernetes Submit Queue 25d3523359 Merge pull request #48940 from rootfs/fc-fencing
Automatic merge from submit-queue (batch tested with PRs 48377, 48940, 49144, 49062, 49148)

support fc volume attach and detach

**What this PR does / why we need it**:
Support FC volume attach and detach to enforce RWO access

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-19 19:10:12 -07:00
Kubernetes Submit Queue 8d26afa8a6 Merge pull request #48377 from bsalamat/priority_class
Automatic merge from submit-queue

Add PriorityClass API object under new "scheduling" API group

**What this PR does / why we need it**: This PR is a part of a series of PRs to add pod priority to Kubernetes. This PR adds a new API group called "scheduling" with a new API object called "PriorityClass". PriorityClass maps the string value of priority to its integer value.

**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**: Given the size of this PR, I will add the admission controller for the PriorityClass in a separate PR.

**Release note**:

```release-note
Add PriorityClass API object under new "scheduling" API group
```

ref/ #47604
ref/ #48646
2017-07-19 19:04:29 -07:00
ravisantoshgudimetla b01a1c3881 Build files generated 2017-07-19 18:36:12 -04:00
ravisantoshgudimetla 9dbf1a5644 Refactoring taints to reduce sprawl 2017-07-19 18:36:07 -04:00
Davanum Srinivas c197e6238d Tolerate Flavor information for computing instance type
Current devstack seems to return "id", and an upcoming change using
nova's microversion will be returning "original_name":
https://blueprints.launchpad.net/nova/+spec/instance-flavor-api

So let's just inspect what is present and use that to figure out
the instance type.
2017-07-19 16:06:53 -04:00
Brendan Burns 38b1b74f82 Fix up imds, also refactor for better testing. 2017-07-19 12:53:08 -07:00
deads2k bbd291faa7 use informers for quota evaluation of core resources where possible 2017-07-19 15:52:39 -04:00
deads2k 62157572cf tighten quota controller interface 2017-07-19 15:36:45 -04:00
Chao Xu c6f09f0c9c Restrict the visibility of two packages in pkg/client/
These two packages are deprecated. Please use the client-go copy of these two
packages.
2017-07-19 11:23:04 -07:00
Kubernetes Submit Queue 8a98983adc Merge pull request #49180 from feiskyer/seccomp
Automatic merge from submit-queue (batch tested with PRs 48981, 47316, 49180)

Add seccomp profile in sandbox security context

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

PR  #46332 adds seccomp profile to container security context, but not sandbox. This PR adds seccomp profile in sandbox security context. Without this, we couldn't honour "seccomp.security.alpha.kubernetes.io/pod" for sandbox.

**Which issue this PR fixes**

fixes #49179.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @yujuhong
2017-07-19 11:21:28 -07:00
Kubernetes Submit Queue c0287ce420 Merge pull request #47316 from k82cn/k8s_47315
Automatic merge from submit-queue (batch tested with PRs 48981, 47316, 49180)

Added golint check for pkg/kubelet.

**What this PR does / why we need it**:
Added golint check for pkg/kubelet, and make golint happy.

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

**Release note**:
```release-note-none
```
2017-07-19 11:21:25 -07:00
Kubernetes Submit Queue 9378daba9c Merge pull request #48981 from colemickens/acr
Automatic merge from submit-queue (batch tested with PRs 48981, 47316, 49180)

azure: acr: support MSI with preview ACR with AAD auth

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

The recently added support for Managed Identity in Azure (#48854) was incompatible with automatic ACR docker credential integration (#48980).

This PR resolves that, by leveraging a feature available in Preview regions, on new managed clusters with support for AAD `access_token` authentication.

Notes:
* This includes code copied from [Azure/acr-docker-credential-helper](https://github.com/Azure/acr-docker-credential-helper). I copied the MIT license from that project and added a copyright line for Microsoft on it. (but one of the hack/verify-* scripts requires the Kubernetes copyright header. So there are two copyright headers in the file now...)
* Eventually this should vendor  [Azure/acr-docker-credential-helper](https://github.com/Azure/acr-docker-credential-helper) when it exposes the right functionality.
* This includes a small, non-function-impacting workaround for a temporary service-side bug.


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

**Special notes for your reviewer**:
Please don't LGTM it without reviewing the `azure_acr_helper.go` file's license header...

**Release note**:
```release-note
azure: acr: support MSI with preview ACR with AAD auth
```
2017-07-19 11:21:23 -07:00
Kubernetes Submit Queue b78fc209a4 Merge pull request #49045 from ericchiang/remove-anytoken-authenticator-option
Automatic merge from submit-queue (batch tested with PRs 49058, 49072, 49137, 49182, 49045)

*: remove --insecure-allow-any-token option

~Since the authenticator is still used in e2e tests, don't remove
the actual package. Maybe a follow up?~

edit: e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```

closes #49031

cc @kubernetes/sig-auth-pr-reviews
2017-07-19 10:27:29 -07:00
André Cruz 89012ccb23 Fix test 2017-07-19 17:14:35 +01:00
Kubernetes Submit Queue 772c352992 Merge pull request #49197 from malc0lm/master
Automatic merge from submit-queue

fix leader-elect-resource-lock's description

**What this PR does / why we need it**:
    The leader-elect-resource-lock description miss a space in pkg/client/leaderelectionconfig/config.go. It will effect other component's help document which use leader election.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
    I think it's is needless to open a issue.
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-19 08:44:08 -07:00