Commit Graph

871 Commits (7700d38e471ab3345f1ee89fd429869005887388)

Author SHA1 Message Date
Jordan Liggitt 4536388909
Update bazel 2016-12-09 16:26:06 -05:00
Jordan Liggitt cc7a44f545
Fix tests using internal types for serialization 2016-12-09 16:26:05 -05:00
Jordan Liggitt fcf5bbccd6
Fix references from serializable types to use v1.ObjectMeta 2016-12-09 16:26:04 -05:00
Kubernetes Submit Queue d6b9a7aa60 Merge pull request #37693 from wojtek-t/pipe_get_options_to_storage
Automatic merge from submit-queue (batch tested with PRs 37693, 38085)

Pipe get options to storage

Ref #37473
2016-12-07 00:52:26 -08:00
Kubernetes Submit Queue 470222e0bb Merge pull request #38219 from mbohlool/openapi_fix
Automatic merge from submit-queue

Fix pods/log OpenAPI/Swagger spec to return string instead of v1.Pod

log operation is part of pod and had the assumption of returning a v1.Pod. First I added the support for an operation to be able to customize its return object then add the support to pods/log operation to return an string as an object sample.

Fixes #37881
Cc @kubernetes/sig-api-machinery
2016-12-06 19:50:47 -08:00
mbohlool a9cee59f69 Fix pods/log OpenAPI/Swagger spec to return string instead of v1.Pod 2016-12-06 13:59:20 -08:00
deads2k fbb35b72ed update delegating auth to include front-proxy 2016-12-06 09:40:07 -05:00
Wojciech Tyczynski 3432fea8b2 Pipe GetOptions to storage 2016-12-06 11:48:37 +01:00
Dr. Stefan Schimanski 0301487de0 Add verbs to APIResource for discovery 2016-12-05 12:36:04 +01:00
Kubernetes Submit Queue 81d788dd6e Merge pull request #37534 from smarterclayton/move_unversion
Automatic merge from submit-queue (batch tested with PRs 36816, 37534)

Move pkg/api/unversioned to pkg/apis/meta/v1

This moves code from using pkg/api/unversioned to pkg/apis/meta/v1 with the `metav1` local package name.

Built on top of #37532 (the first three commits related to ExportOptions)

Part of #37530
2016-12-03 18:30:48 -08:00
Kubernetes Submit Queue 71182d826d Merge pull request #36816 from deads2k/api-43-front-proxy
Automatic merge from submit-queue

plumb in front proxy group header

Builds on https://github.com/kubernetes/kubernetes/pull/36662 and https://github.com/kubernetes/kubernetes/pull/36774, so only the last commit is unique.

This completes the plumbing for front proxy header information and makes it possible to add just the front proxy header authenticator.

WIP because I'm going to assess it in use downstream.
2016-12-03 18:01:42 -08:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Kubernetes Submit Queue 332305cba9 Merge pull request #37697 from deads2k/auth-06-simplify-authz
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

simplify the authorization attribute getter

Construct the authorization attributes directly from the context.  This eliminates unnecessary redirection.  

@sttts
2016-12-03 08:56:01 -08:00
Kubernetes Submit Queue efa42b95a6 Merge pull request #37532 from smarterclayton/remove_export
Automatic merge from submit-queue

Remove ExportOptions from api/internal and use unversioned

Should only have one internal object in use

Part of #37530
2016-12-02 21:11:56 -08:00
deads2k fc46c31bc2 simplify the authorization attribute getter 2016-12-02 16:19:12 -05:00
Kubernetes Submit Queue 0a976f5356 Merge pull request #37102 from deads2k/api-45-audit-groups
Automatic merge from submit-queue

add groups to the audit trail

Adds groups to the string that gets put in the audit log.

@soltysh @sttts
2016-12-02 08:45:04 -08:00
deads2k 78f2958c0f add request header options for groups 2016-12-01 09:02:15 -05:00
deads2k c4e2e19e51 allow auth proxy to set groups and extra 2016-12-01 09:00:30 -05:00
Kubernetes Submit Queue d00696a0d8 Merge pull request #36769 from deads2k/auth-03-fix-impersonation
Automatic merge from submit-queue

clear impersonation headers

If you clone a request that came in after impersonation, you were also cloning the impersonation headers that came with it.  These seem roughly analogous to the `Authorization` header, so this clears them.

@kubernetes/sig-auth
2016-12-01 04:52:09 -08:00
deads2k 5cea15ac9f add delegating auth options 2016-11-29 10:59:43 -05:00
deads2k 7c0e48f544 split out authentication options 2016-11-29 10:59:43 -05:00
Kubernetes Submit Queue 3e5de19126 Merge pull request #37200 from lvjiangzhao/branch
Automatic merge from submit-queue

Fix wrong comment in authn.go
2016-11-29 07:33:18 -08:00
Clayton Coleman 3dde81f8d0
Remove references to v1/internal ExportOptions 2016-11-27 23:21:06 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
ymqytw 3cc294b1e0 Revert "support patch list of primitives"
This reverts commit 34891ad9f6.
2016-11-22 21:06:36 -08:00
deads2k 503de32094 add groups to the audit trail 2016-11-22 08:40:02 -05:00
lvjiangzhao 528dcbe02b Fix wrong comment in authn.go 2016-11-21 17:28:01 +08:00
deads2k e69d0d84a4 clear impersonation headers 2016-11-14 15:18:48 -05:00
ymqytw 34891ad9f6 support patch list of primitives 2016-11-09 11:46:59 -08:00
Kubernetes Submit Queue 860cae0933 Merge pull request #35488 from dixudx/keystone-ca-cert
Automatic merge from submit-queue

specify custom ca file to verify the keystone server

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

Sometimes the keystone server's certificate is self-signed, mainly used for internal development, testing and etc.

For this kind of ca, we need a way to verify the keystone server.

Otherwise, below error will occur.

> x509: certificate signed by unknown authority

This patch provide a way to pass in a ca file to verify the keystone server when starting `kube-apiserver`.

**Which issue this PR fixes** : fixes #22695, #24984

**Special notes for your reviewer**:

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
```
2016-11-08 13:13:00 -08:00
Kubernetes Submit Queue ebc8dc85aa Merge pull request #36207 from smarterclayton/optimize_self_link
Automatic merge from submit-queue

SetSelfLink is inefficient

Generating self links, especially for lists, is inefficient.  Replace
use of net.URL.String() call with direct encoding that reduces number of
allocations. Switch from calling meta.ExtractList|SetList to a function
that iterates over each object in the list.

In steady state for nodes performing frequently small get/list
operations, and for larger LISTs significantly reduces CPU and
allocations.

@wojtek-t this is the next big chunk of CPU use during the large N nodes simulation test (11% of master CPU). Takes a few allocations out of the critical path
2016-11-06 06:42:49 -08:00
Kubernetes Submit Queue 17fda0a135 Merge pull request #35806 from bdbauer/new_deletion
Automatic merge from submit-queue

Made changes to DELETE API to let v1.DeleteOptions be passed in as a queryParameter

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

```release-note
DELETE requests can now pass in their DeleteOptions as a query parameter or a body parameter, rather than just as a body parameter.
```
2016-11-05 08:49:34 -07:00
Kubernetes Submit Queue f6b313b1da Merge pull request #36070 from liggitt/requestinfowatch
Automatic merge from submit-queue

Recognize watch operations via ?watch param

@deads2k @smarterclayton
2016-11-04 11:06:59 -07:00
Benjamin Bauer 2e7195fbcb Updated openapi spec, swagger spec, and swagger doc 2016-11-04 10:58:42 -07:00
Di Xu dd6c980949 specify custom ca file to verify the keystone server 2016-11-04 15:11:41 +08:00
Clayton Coleman 4f363f5447
SetSelfLink is inefficient
Generating self links, especially for lists, is inefficient.  Replace
use of net.URL.String() with direct encoding that reduces number of
allocations. Switch from calling meta.ExtractList|SetList to a function
that iterates over each object in the list.

In steady state for nodes performing frequently small get/list
operations, and for larger LISTs significantly reduces CPU and
allocations.
2016-11-03 23:37:36 -04:00
Benjamin Bauer 76c3804859 Made changes to DELETE API to let v1.DeleteOptions be passed in as a QueryParameter 2016-11-03 15:53:04 -07:00
Jordan Liggitt 3294b1df18
Recognize watch operations via ?watch param 2016-11-02 12:00:42 -04:00
Kubernetes Submit Queue 5774ca188d Merge pull request #35840 from caesarxuchao/hide-new-versions
Automatic merge from submit-queue

Hide groups with new versions from old kubectl

Fix https://github.com/kubernetes/kubernetes/issues/35791

**What caused the bug?**

In 1.5, we are going to graduate Policy and Apps to beta. Old version kubectl doesn't has the new versions built-in, its TRP dynamic discover thinks Policy/v1beta1 is a TPR, and tried to register it in kubectl's scheme. The registration failed because Policy group already exist, because kubectl had registered Policy.v1alpha1.

**How does this PR fix the bug?**

This PR let the API server hides Policy and Apps from old version kubectl, so TPR discovery won't see them.

Old version kubectl doesn't know about Policy/v1beta1 or Apps/v1beta1, and v1alpha1 will be removed, so old version kubectl won't work for Policy or Apps anyway, so this PR does not cause any function loss.

@kubernetes/sig-api-machinery @liggitt @smarterclayton @deads2k @janetkuo @mwielgus
2016-11-02 04:49:56 -07:00
Angus Salkeld 3a08cf0619 Correct the article in generated documents
For example:

  "a Ingress" > "an Ingress"
2016-10-31 09:46:29 +10:00
Chao Xu a545ac7a90 add group filter 2016-10-29 15:05:48 -07:00
Kubernetes Submit Queue 4ec036c8af Merge pull request #35452 from deads2k/auth-02-front-proxy
Automatic merge from submit-queue

allow authentication through a front-proxy

This allows a front proxy to set a request header and have that be a valid `user.Info` in the authentication chain.  To secure this power, a client certificate may be used to confirm the identity of the front proxy

@kubernetes/sig-auth fyi
@erictune per-request
@liggitt you wrote the openshift one, ptal.
2016-10-29 07:52:09 -07:00
Clayton Coleman ca2f1b87ad
Replace negotiation with a new method that can extract info
Alter how runtime.SerializeInfo is represented to simplify negotiation
and reduce the need to allocate during negotiation. Simplify the dynamic
client's logic around negotiating type. Add more tests for media type
handling where necessary.
2016-10-28 11:30:11 -04:00
Clayton Coleman f9f680a937
Simplify RESTHander getter and remove specialized serializers 2016-10-28 11:30:11 -04:00
deads2k 3f9a4d51d5 wire up authenticating front proxy: 2016-10-28 08:36:46 -04:00
Wojciech Tyczynski 5d2062db9f Reduce amount of not-helping logs in apiserver 2016-10-26 13:20:07 +02:00
mbohlool 75451b49f4 - Add GroupVersion as tags to OpenAPI spec
- Remove all end-point specs as they are not useful in light of GroupVersion tags in main spec
2016-10-25 14:27:48 -07:00
mbohlool cd5643b85c Update bazel 2016-10-22 02:50:33 -07:00
mbohlool 3e67cf8b9b Add authentication to openapi Spec 2016-10-22 02:43:42 -07:00