Commit Graph

48599 Commits (286bcc6f5c0e4b1bd9315cb5b898966b48efb4b1)

Author SHA1 Message Date
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
Maru Newby b4381d0c44 fed: Move kubefed server image definition to cmd
This enables consumers like openshift to provide a different default
without editing the kubefed init logic.
2017-05-18 14:25:44 -07:00
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
David Ashpole 0bd0d705e3 log age of stats used for evictions during eviction tests 2017-05-18 13:51:23 -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
David E Watson 204fb62d49 Correct spelling in comment. 2017-05-18 13:31:26 -07: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
Fabiano Franz 3bb04c67cc More cli sanity verifications 2017-05-18 15:44:49 -03:00
Brendan Burns 83e856411d generated stuff 2017-05-18 11:38:56 -07:00
Brendan Burns 4177b28e5a Add new AzureDisk API, but not implementation. 2017-05-18 11:36:42 -07: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
Tim St. Clair 6565f68cfa
Update generated files 2017-05-18 10:39:04 -07:00
Tim St. Clair cdacc1f6df
Add internal audit API types 2017-05-18 10:30:21 -07:00
Kubernetes Submit Queue 151846db80 Merge pull request #45999 from enj/enj/i/custom_resource_name
Automatic merge from submit-queue

Remove ObjectNameFunc from custom resources

@deads2k as far as I can tell these `ObjectNameFunc`s are unnecessary.

Signed-off-by: Monis Khan <mkhan@redhat.com>

**Release note**:

```
NONE
```
2017-05-18 10:29:03 -07:00
Kubernetes Submit Queue d775ff4c3a Merge pull request #45982 from fabianofranz/more_sig_cli_owners
Automatic merge from submit-queue

More owners from SIG-CLI

Adds SIG-CLI as reviewers and approvers of `cmd/clicheck/` and adds me + @pwittrock as approvers in `hack/` (mostly for `test-cmd` and some `hack/verify*.sh` and `hack/update*.sh` scripts).

**Release note**:

```release-note
NONE
```
2017-05-18 10:17:22 -07:00
Kubernetes Submit Queue 2ff902b672 Merge pull request #45937 from smarterclayton/init_api
Automatic merge from submit-queue

Add initializers to ObjectMeta and a new filter on ListOptions

Will support admission extension by allowing controllers to interact with objects before they are visible to the rest of the API.

Part of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/admission_control_extension.md
2017-05-18 10:17:15 -07:00
Andy Goldstein e8e87cb1c2 NS controller: don't stop deleting GVRs on error
If the namespace controller encounters an error trying to delete a
single GroupVersionResource, add the error to an aggregated list of
errors and continue attempting to delete all the GroupVersionResources
instead of stopping at the first error. Return the aggregated error list
(if any) when done. This allows us to delete as much of the content in
the namespace as we can in each pass.
2017-05-18 12:01:40 -04:00
Kubernetes Submit Queue e9b02c2e2b Merge pull request #46030 from sdminonne/apiextensions-server-storage
Automatic merge from submit-queue

Api-extensions server integraton test: etcd storage

@deads2k 
here is the test we talked about yesterday.
Few comments:


SelfLink for CR Instances looks broken (my first test was not enough, sorry) please have a look [here](https://github.com/sdminonne/kubernetes/blob/apiextensions-server-storage/staging/src/k8s.io/kube-apiextensions-server/test/integration/registration_test.go#L435) and [here](https://github.com/sdminonne/kubernetes/blob/apiextensions-server-storage/staging/src/k8s.io/kube-apiextensions-server/test/integration/registration_test.go#L409)



Not fully sure about the way etcd client works.
I had to concatenate two times the prefix to get the value. The first time from the caller ([example](https://github.com/sdminonne/kubernetes/blob/apiextensions-server-storage/staging/src/k8s.io/kube-apiextensions-server/test/integration/registration_test.go#L428)) and the second time in the [get function](https://github.com/sdminonne/kubernetes/blob/apiextensions-server-storage/staging/src/k8s.io/kube-apiextensions-server/test/integration/registration_test.go#L473).

Not sure if it's a problem or not, here is the `etcdctl` output for example: 

```
$ ETCDCTL_API=3 etcdctl get "" --from-key
/7b02b490-8e8e-4649-ab92-aad1173314fb/7b02b490-8e8e-4649-ab92-aad1173314fb/apiextensions.k8s.io/customresourcedefinition
s/noxus.mygroup.example.com
{"kind":"CustomResourceDefinition","apiVersion":"apiextensions.k8s.io/v1alpha1","metadata":{"name":"noxus.mygroup.exampl
e.com","selfLink":"/apis/apiextensions.k8s.io/v1alpha1/customresourcedefinitions/noxus.mygroup.example.com","uid":"9a08f
664-3b17-11e7-94b1-847beb037559","creationTimestamp":"2017-05-17T15:43:41Z"},"spec":{"group":"mygroup.example.com","vers
ion":"v1alpha1","names":{"plural":"noxus","singular":"nonenglishnoxu","shortNames":["foo","bar","abc","def"],"kind":"Wis
hIHadChosenNoxu","listKind":"NoxuItemList"},"scope":"Namespaced"},"status":{"conditions":[{"type":"NameConflict","status
":"False","lastTransitionTime":null,"reason":"NoConflicts","message":"no conflicts found"}],"acceptedNames":{"plural":"n
oxus","singular":"nonenglishnoxu","shortNames":["foo","bar","abc","def"],"kind":"WishIHadChosenNoxu","listKind":"NoxuIte
mList"}}}

/7b02b490-8e8e-4649-ab92-aad1173314fb/7b02b490-8e8e-4649-ab92-aad1173314fb/mygroup.example.com/noxus/not-the-default/foo
{"apiVersion":"mygroup.example.com/v1alpha1","content":{"key":"value"},"kind":"WishIHadChosenNoxu","metadata":{"clusterN
ame":"","creationTimestamp":"2017-05-17T15:43:41Z","deletionGracePeriodSeconds":null,"deletionTimestamp":null,"name":"fo
o","namespace":"not-the-default","selfLink":"","uid":"9a174a53-3b17-11e7-94b1-847beb037559"}}
```
2017-05-18 08:45:36 -07:00
Kubernetes Submit Queue 93579d637e Merge pull request #45968 from marun/fed-remove-redundant-e2e
Automatic merge from submit-queue (batch tested with PRs 45950, 45968)

[Federation] Remove redundant e2e for secret and daemonset

Federation of daemonset and secret types is now implemented by the sync controller, and e2e testing for each type is provided via crud lifecycle e2e tests.  This renders the legacy e2e tests for these types redundant, and this commit removes those tests.

The secret wait and delete functions required by the ingress e2e tests have been retained and moved to ingress.go.

cc: @kubernetes/sig-federation-pr-reviews
2017-05-18 08:39:05 -07:00
Mik Vyatskov a6ccc89541 Add version for fluentd-gcp config 2017-05-18 16:59:05 +02:00
Kubernetes Submit Queue a1c2db2fec Merge pull request #45950 from shyamjvs/revert-proxier
Automatic merge from submit-queue

Make real proxier in hollow-proxy optional (default=true)

Ref https://github.com/kubernetes/kubernetes/pull/45622
This allows using real proxier for hollow proxy, but we use the fake one by default.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-05-18 07:55:09 -07:00
Andy Goldstein 032e2f6652 kube-proxy: add --write-config flag
Add --write-config flag to kube-proxy to write the default configuration
values to the specified file location.
2017-05-18 10:34:22 -04:00
Clayton Coleman bdd4d34c7d
generated: api changes 2017-05-18 10:07:47 -04:00
Clayton Coleman 668442321e
Add initializers and includeUninitialized to the API 2017-05-18 10:07:45 -04:00
Salvatore Dario Minonne 2ab03260c5 for bazel 2017-05-18 15:09:43 +02:00
Salvatore Dario Minonne 0d93e184fa kube-apiextensions-server integraton test: etcd serialization 2017-05-18 14:53:28 +02:00
Shyam Jeedigunta 804a4f558c Make usage of real proxier in hollow-proxy optional (default=true) 2017-05-18 14:30:12 +02:00
Humble Chirammal 11f1152e77 Add missing parameters of iscsi volume source to describe printer.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-18 17:08:13 +05:30
billy2180 4cd92e8f37 Bump e2e netexec pod.xml image version to 1.7 2017-05-18 17:54:13 +08:00
Kubernetes Submit Queue 0765740eb9 Merge pull request #46002 from bowei/ip-alias-to-beta
Automatic merge from submit-queue

Update cluster startup scripts to use gcloud beta for alias IP support

The feature has gone from alpha to beta.

```release-note
NONE
```
2017-05-18 02:05:45 -07:00
xilabao 516a245ac7 add rolebinding/clusterrolebinding to describe.go 2017-05-18 16:56:14 +08:00
Kubernetes Submit Queue 249551461e Merge pull request #45855 from mikedanese/out-of-root
Automatic merge from submit-queue (batch tested with PRs 45582, 45855)

move build related files out of the root directory

Turn the files in root to symlinks into build/root/

alternative to OWNERS changes. what do you guys think of this?
2017-05-18 00:56:47 -07:00
yupengzte b38be58a39 ineffectual assignment to baseCommand, delete it
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-18 15:56:07 +08:00
Kubernetes Submit Queue 212150b66a Merge pull request #45582 from CaoShuFeng/kubectl_set
Automatic merge from submit-queue

avoid concrete examples for missingResourceError

missingResourceError uses pod and services as an example in error message. However some sub-commands doesn't support pod/service, this change use `<resource> <name>` instead of concrete examples.
Before this change:
```console
$ kubectl set subject
error: You must provide one or more resources by argument or filename.
Example resource specifications include:
   '-f rsrc.yaml'
   '--filename=rsrc.json'
   'pods my-pod'
   'services'
```

After this change:
```console
$ kubectl set subject
error: You must provide one or more resources by argument or filename.
Example resource specifications include:
   '-f rsrc.yaml'
   '--filename=rsrc.json'
   '<resource> <name>'
   '<resource>'
```

**Release note**:

```release-note
avoid concrete examples for missingResourceError
```
2017-05-18 00:37:08 -07:00
Kubernetes Submit Queue 7abb2641c5 Merge pull request #46013 from NickrenREN/openstack-reviewer
Automatic merge from submit-queue

Add myself to openstack review pool

**Release note**:
```release-note
NONE
```
2017-05-17 23:48:35 -07:00
Kubernetes Submit Queue f706b81007 Merge pull request #45642 from JiangtianLi/jiangtli-fixdns2
Automatic merge from submit-queue

Fix the issue in Windows kube-proxy when processing unqualified name. This is for DNS client such as ping or iwr that validate name in response and original question.

**What this PR does / why we need it**:
This PR is an additional fix to #41618 and [the corresponding commit](b9dfb69dd7). The DNS client such as nslookup does not validate name matching in response and original question. That works fine when we append DNS suffix to unqualified name in DNS query in Windows kube-proxy. However, for DNS client such as ping or Invoke-WebRequest that validates name in response and original question, the issue arises and the DNS query fails although the received DNS response has no error. 

This PR fixes the additional issue by restoring the original question name in DNS response. Further, this PR refactors DNS message routines by using miekg's DNS library.

This PR affects the Windows kube-proxy only.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix DNS suffix search list support in Windows kube-proxy.
```
2017-05-17 23:48:27 -07:00
Kubernetes Submit Queue e7b1814863 Merge pull request #43578 from vsiddharth/pause-container
Automatic merge from submit-queue

Improve pause-container warning message

Signed-off-by: Vinothkumar Siddharth <sidvin@amazon.com>



**What this PR does / why we need it**:
This just improves the warning message currently emitted by pause

**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
```
2017-05-17 22:56:20 -07:00
Kubernetes Submit Queue 7f27cebe49 Merge pull request #45869 from MrHohn/esipp-default-move
Automatic merge from submit-queue

Move defaulting logic for ExternalTrafficPolicy into defaults.go

Link #45812.

Per [#45812/comment](https://github.com/kubernetes/kubernetes/issues/45812#issuecomment-301632807), move defaulting logic to defaults.go so that federation will get the same code.

This PR does not have any functional change :)

/assign @freehan @thockin 
/cc @madhusudancs @nikhiljindal @shashidharatd
Also /cc @caesarxuchao per the client-go changes.

**Release note**:

```release-note
NONE
```
2017-05-17 22:56:13 -07:00