Commit Graph

48402 Commits (2f0faedbee55e775e4e116c587b0867e5eb1cacd)

Author SHA1 Message Date
Alexander Campbell 2f0faedbee kubectl: make "Deprecated" a private function
There's no reason to export this function, so I've made it private.
2017-05-19 10:45:49 -07:00
Alexander Campbell bf2fc62144 kubectl: renmae deprecatedCmd -> deprecatedAlias
This will clear up some of the confusion around the deprecatedCmd /
Deprecated function.
2017-05-19 10:40:21 -07:00
Alexander Campbell 699a3e20ff .generated_docs: update to include "new" commands 2017-05-19 08:56:53 -07:00
Alexander Campbell acfdafb1fb Merge branch 'master' into correct-deprecation-errors 2017-05-19 08:55:17 -07:00
Alexander Campbell 2acc5f18b5 test-cmd-util.sh: add test for deprecated commands 2017-05-19 08:55:12 -07:00
Alexander Campbell b3fc6556e4 kubectl: improve docstring on deprecatedCmd 2017-05-19 08:55:12 -07:00
Kubernetes Submit Queue 3c1c926883 Merge pull request #46097 from mwielgus/comparisons
Automatic merge from submit-queue (batch tested with PRs 46075, 46059, 46095, 46097)

Use integer comparisons instead of string comparisons in autoscaler config validation

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

kube-up.sh doesn't work if MAX_INSTANCES_PER_MIG is specified and KUBE_AUTOSCALER_MAX_NODES is lexicographically smaller ("10" < "2").
2017-05-19 08:35:12 -07:00
Kubernetes Submit Queue ff7b3653fd Merge pull request #46095 from wojtek-t/avoid_sleep_in_endpoint_controller
Automatic merge from submit-queue (batch tested with PRs 46075, 46059, 46095, 46097)

Avoid sleep in endpoint controller
2017-05-19 08:35:10 -07:00
Kubernetes Submit Queue ff4607342f Merge pull request #46059 from nikhita/test-int-preserve
Automatic merge from submit-queue (batch tested with PRs 46075, 46059, 46095, 46097)

Integration test for kube-apiextensions-server: integers

**What this PR does / why we need it**: Check if integers are present after decoding.
Originally an issue for TPRs: #30213

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
@sttts
2017-05-19 08:35:08 -07:00
Kubernetes Submit Queue 735742b5d0 Merge pull request #46075 from liggitt/fix-unbound-variable
Automatic merge from submit-queue (batch tested with PRs 46075, 46059, 46095, 46097)

Fix unbound variable

Fixes an unbound variable introduced in 6fd36792f1 (diff-ed3df710e9af7cd30a185896a60897d9)
2017-05-19 08:35:05 -07:00
Kubernetes Submit Queue 03ccb4f084 Merge pull request #46051 from p0lyn0mial/admission_plugins_register_method
Automatic merge from submit-queue (batch tested with PRs 45313, 46051)

Change all the existing admission init blocks to call a Register function

**What this PR does / why we need it**:
this is a two stage refactor when done there will be no init block in admission plugins.
Instead all plugins expose Register function which accept admission.Plugins instance.
The registration to global plugin registry happens inside Register function

**Release note**:

```
NONE
```
2017-05-19 06:39:02 -07:00
Kubernetes Submit Queue 07dac20cc6 Merge pull request #45313 from realfake/cloudprovider-gce-metadata
Automatic merge from submit-queue

GCE for cloud-controller-manager 

**What this PR does / why we need it**:
This implements the `NodeAddressesByProviderID`and `InstanceTypeByProviderID` methods used by the cloud-controller-manager to the GCE provider.


**Release note**:

```release-note
NONE
```
2017-05-19 06:18:38 -07:00
Marcin Wielgus 2f4cb6bfe7 Use integer comparisons instead of string comparisons in autoscaler config validation 2017-05-19 14:50:55 +02:00
Wojciech Tyczynski d2529bb6b6 Avoid sleep in endpoint controller 2017-05-19 13:57:36 +02:00
Kubernetes Submit Queue d651ef786c Merge pull request #46092 from kargakis/redirect-kubeadm-issues
Automatic merge from submit-queue

Redirect kubeadm issues to kubeadm repo

@kubernetes/sig-cluster-lifecycle-misc ptal
2017-05-19 04:11:03 -07:00
Kubernetes Submit Queue 231c4a004f Merge pull request #46088 from Mashimiao/remove-unreachable-code
Automatic merge from submit-queue

remove unreachable code

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>


**What this PR does / why we need it**:
remove unreachable code
2017-05-19 03:36:58 -07:00
Michail Kargakis bad2b97dc7
Redirect kubeadm issues to kubeadm repo
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-19 12:18:55 +02:00
Ma Shimiao c0feba4f9f remove unreachable code
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-05-19 16:47:15 +08:00
Kubernetes Submit Queue 51f3ac1b99 Merge pull request #45004 from feiskyer/hostnetwork
Automatic merge from submit-queue

Add node e2e tests for hostNetwork

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

Add node e2e tests for hostNetwork.

**Which issue this PR fixes**

Part of #44118.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @Random-Liu @yujuhong
2017-05-19 01:18:07 -07:00
Kubernetes Submit Queue d9005df6cb Merge pull request #46061 from shyamjvs/master-metrics-fix
Automatic merge from submit-queue

Copy static variable 'verb' before instrumenting APIserver call to prevent overwriting

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

cc @wojtek-t @gmarek
2017-05-19 00:03:51 -07:00
realfake 250b229912 Implement providerID node functions for gce
*Add splitProviderID helper function
*Add getInstanceFromProjectInZoneByName function
*Implement gce InstanceTypeByProviderID
*Implement gce NodeAddressesByProviderID
2017-05-19 08:41:54 +02:00
Kubernetes Submit Queue d81da03132 Merge pull request #45960 from pmichali/issue45906
Automatic merge from submit-queue

IPv6 support for hexCIDR()

Includes these changes:
- Modified so that IPv6 CIDRs can be converted correctly.
- Added test cases for IPv6 addresses.
- Split UTs for hexCIDR() and asciiCIDR() so that masking can be tested.
- Add UTs for failure cases.

Note: Some code that calls hexCIDR() builds a CIDR from the pod IP string
and the concatenation of "/32". These should, in the future, use "128",
if/when the pod IP is IPv6. Not addressed as part of this commit.



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

**Special notes for your reviewer**:

**Release note**:

```release-noteNONE
```
2017-05-18 22:40:31 -07:00
Kubernetes Submit Queue 57adadd42a Merge pull request #46063 from madhusudancs/fed-kubefed-logv4
Automatic merge from submit-queue

Log kubefed operations at log level 4 in our test environments.

This is useful for debugging test failures that involve federation control plane turn up/down.


**Release note**:
```release-note
NONE
```

/assign @perotinus @csbell 
/sig federation

cc @kubernetes/sig-federation-pr-reviews
2017-05-18 21:48:39 -07:00
Jordan Liggitt 20ccdfbd3b
Fix unbound variable 2017-05-19 00:29:50 -04:00
Kubernetes Submit Queue ead8c98cdb Merge pull request #45987 from nicksardo/cloud-init-kubeclient
Automatic merge from submit-queue

Initialize cloud providers with a K8s clientBuilder

**What this PR does / why we need it**:
This PR provides each cloud provider the ability to generate kubernetes clients. Either the full access or service account client builder is passed from the controller manager. Cloud providers could need to retrieve information from the cluster that isn't provided through defined interfaces, and this seems more preferable to adding parameters.

Please leave your thoughts/comments.

**Release note**:
```release-note
NONE
```
2017-05-18 20:51:24 -07:00
Kubernetes Submit Queue c061994742 Merge pull request #46056 from marun/fed-federated-updater-deletion-error
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

[Federation] Fix bad logic of deletion error handling for federated updater

Reverts a change accidentally added in #45364.

cc: @kubernetes/sig-federation-pr-reviews
2017-05-18 19:58:17 -07:00
Kubernetes Submit Queue 5290eece28 Merge pull request #45948 from CaoShuFeng/underscore
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

remove useless flags from hack/verify-flags/known-flags.txt

Flags in known-flags.txt is used to check misspelling from "-" to "_" in
workspace, so a flag with out "-" should not show up in this file.

**Release note**:

```release-note
NONE
```
2017-05-18 19:58:15 -07:00
Kubernetes Submit Queue a9fbeef694 Merge pull request #45929 from liggitt/node-admission
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

NodeRestriction admission plugin

Adds an optional `NodeRestriction` admission plugin that limits identifiable kubelets to mutating their own Node object, and Pod objects bound to their node.

This is the admission portion of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-authorizer.md and kubernetes/features#279

```release-note
The `NodeRestriction` admission plugin limits the `Node` and `Pod` objects a kubelet can modify. In order to be limited by this admission plugin, kubelets must use credentials in the `system:nodes` group, with a username in the form `system:node:<nodeName>`. Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node.
```
2017-05-18 19:58:13 -07:00
Kubernetes Submit Queue 61eace2b1e Merge pull request #45985 from deads2k/tpr-16-finalizer
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

add CRD finalizer to remove CRs

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

This adds a finalizer for customresourcedefinitions to prevent CRD deletion until all CR instances are gone.

@sdminonne I lost track of your issue, but here's the fix

I'm at a loss for how to test this.  It's tested from the outside by ensuring that a CRD delete removes its instances (integration test) and we could add more integration tests, but for unit tests I can't seem to find a mock `dynamic.ClientPool` and its not easily writeable at the moment.  I'm thinking about saying we just add more black box tests given the options.
2017-05-18 19:58:10 -07:00
Kubernetes Submit Queue f57f0388db Merge pull request #41535 from aanm/adding-ipv6-brackets
Automatic merge from submit-queue (batch tested with PRs 41535, 45985, 45929, 45948, 46056)

kubelet/envvars: Adding brackets to IPv6 addresses

Signed-off-by: André Martins <aanm90@gmail.com>

**What this PR does / why we need it**: This adds IPv6 brackets on environments variables pods

**Special notes for your reviewer**:

Since the IP is a string I think the fastest way to detect if it's an IPv6 was to check for the presence of `:` in it. Let me know what you think.
2017-05-18 19:58:07 -07:00
Kubernetes Submit Queue b6211c6e79 Merge pull request #45921 from pwittrock/kubectl-issues
Automatic merge from submit-queue

Redirect users filing kubectl issues to the kubernetes/kubectl repo
2017-05-18 17:45:42 -07:00
Kubernetes Submit Queue 8214f7bb29 Merge pull request #45839 from caesarxuchao/client-gen-vendor
Automatic merge from submit-queue

let client-gen understand vendor

This is extracted from #44784, where we move external api types to k8s.io/api. After the move, the types will locate at vendor/k8s.io/api/xxx. However, gengo index the parsed package using the import path, which is stripped of  the vendor/ prefix, so we'll need to strip the vendor/ prefix as necessary in client-gen.

This PR doesn't produce any change to the generated clientset yet since all types are still in the kubernetes repo.
2017-05-18 17:45:35 -07:00
Madhusudan.C.S 47de152365 Log kubefed operations at log level 4 in our test environments.
This is useful for debugging test failures that involve federation
control plane turn up/down.
2017-05-18 16:57:46 -07:00
Alexander Campbell 9e7f29c3fb cmd: fix deprecation warning bug
Some kubectl commands were deprecated but would fail to print the
correct warning message when a flag was given before the command name.

	# Correctly prints the warning that "resize" is deprecated and
	# "scale" is now preferred.
	kubectl scale [...]

	# Should print the same warning but no warning is printed.
	kubectl --v=1 scale [...]

This was due to a fragile check on os.Args[1].

This commit implements a new function deprecatedCmd() that is used to
construct new "passthrough" commands which are marked as deprecated and
hidden.

Note that there is an existing "filters" system that may be preferable
to the system created in this commit. I'm not sure why the "filters"
array was not used for all deprecated commands in the first place.
2017-05-18 16:48:13 -07:00
Shyam Jeedigunta 4d457f55f4 Copy static variable 'verb' before instrumenting APIserver call to prevent overwriting 2017-05-19 01:11:38 +02:00
Nikhita Raghunath e9a8af9ac8
Add integration test for kube-apiextensions-server.
Check if integers are present after decoding.
Originally an issue for TPRs: #30213
2017-05-19 03:34:12 +05:30
Kubernetes Submit Queue 17b22cb01c Merge pull request #45315 from timstclair/audit-api
Automatic merge from submit-queue

Advanced audit logging API

This is an initial implementation of the API proposed in https://github.com/kubernetes/community/blob/master/contributors/design-proposals/auditing.md

This deviates from the exact API specified in the proposal in a number of ways. Here's a list of some of the changes I made, and why:

- General API conformance (`metav1.{Type,List}Meta`, +optional, etc.)
- Dropped fields that won't be part of the initial implementation (storage objects & filters), to be added later
- {Request,Response}Body -> {Request,Response}Object - This is actually what the proposal originally had, and will be much better for adding Filters later, and provides a less protocol-dependent API. Note that there is currently no way to include Response body for non-resource requests.
- Drop HttpMethod - redundant with verb
- Response{StatusCode,ErrorMessage} collapsed into `ResponseStatus *metav1.Status` - This is the standard response type for resourec errors, but can hold genereric error responses too. Note that this is part of the `Metadata` Level.

/cc @kubernetes/sig-auth-api-reviews @kubernetes/api-reviewers
2017-05-18 14:23:53 -07:00
Maru Newby 37cb9c4dc2 fed: Fix bad logic of deletion error handling for federated updater 2017-05-18 14:21:55 -07:00
Jordan Liggitt 6fd36792f1
Add NodeRestriction admission plugin 2017-05-18 16:43:42 -04:00
Jordan Liggitt 0c516c3ac2
Add NodeIdentifier interface and default implementation 2017-05-18 16:43:41 -04:00
Kubernetes Submit Queue be71ec717b Merge pull request #45201 from vmware/network_id
Automatic merge from submit-queue

Same internal and external ip for vSphere Cloud Provider

Currently, vSphere Cloud Provider reports internal ip as container ip addresses. This PR modifies vSphere Cloud Provider to report same ip address as both internal and external that is provided by vmware infrastructure. 
cc @pdhamdhere @tusharnt @BaluDontu @divyenpatel @luomiao
2017-05-18 13:31:02 -07:00
p0lyn0mial 3f8d6e9210 Change all the existing admission init blocks to call a Register function
this is a two stage refactor when done there will be no init block in admission plugins.
Instead all plugins expose Register function which accept admission.Plugins instance.
The registration to global plugin registry happens inside Register func.
2017-05-18 22:25:01 +02:00
Jordan Liggitt d609f4ebca
Add pod util for extracting referenced configmaps 2017-05-18 15:38:29 -04:00
Kubernetes Submit Queue 5f3f170919 Merge pull request #39488 from liggitt/flex-metadata
Automatic merge from submit-queue

Pass pod metadata to flex plugin

Normal volume plugins get the pod spec to pull information from when setting up their volume, but flex plugins do not.

If a flex volume wants to set up things unique to the pod, or limited in permission based on the service account, the pod namespace, name, uid, and service account name are needed.

This PR adds pod uid, name, namespace, and service account name to the options passed to the plugin available during mounting

```release-note
The options passed to a flexvolume plugin's mount command now contains the pod name (`kubernetes.io/pod.name`), namespace (`kubernetes.io/pod.namespace`), uid (`kubernetes.io/pod.uid`), and service account name (`kubernetes.io/serviceAccount.name`).
```
2017-05-18 12:29:04 -07:00
Chao Xu 3b26db6d67 Update CHANGELOG.md for v1.7.0-alpha.4. 2017-05-18 21:16:11 +02:00
deads2k 5d1afb4933 add CRD finalizer to remove CRs 2017-05-18 15:05:01 -04:00
Kubernetes Submit Queue f231576f29 Merge pull request #45443 from abrarshivani/owners_cloud_providers
Automatic merge from submit-queue

Add approvers to vsphere cloudprovider

This PR adds approvers for vSphere Cloud provider.
cc @pdhamdhere @tusharnt @BaluDontu @divyenpatel @luomiao
2017-05-18 11:36:25 -07:00
Kubernetes Submit Queue f760d5a592 Merge pull request #46001 from bowei/alpha-to-beta
Automatic merge from submit-queue

Use beta GCP API instead of alpha in CloudCIDR controller

The feature we are using has been promoted to beta.

```release-note
NONE
```
2017-05-18 11:36:19 -07:00
Phillip Wittrock e70d59063f Redirect users filing kubectl issues to the kubernetes/kubectl repo 2017-05-18 10:45:07 -07:00
Tim St. Clair dd9e0ecd06
Misc proto changes 2017-05-18 10:39:06 -07:00