Commit Graph

963 Commits (a1ffc8c4879c1ae37515531991c9304d831b9677)

Author SHA1 Message Date
nikhiljindal a1ffc8c487 Autogenerated proto changes 2017-05-14 23:09:47 -07:00
nikhiljindal 44fc88cecd Updating generic registry to return UID while deleting the object 2017-05-14 23:09:47 -07:00
Nikhita Raghunath 738c6f0d3f
Add plural name for CustomResources example 2017-05-14 23:13:40 +05:30
Kubernetes Submit Queue abaffb243e Merge pull request #45692 from caesarxuchao/limit-client-go-package-import-2
Automatic merge from submit-queue (batch tested with PRs 44748, 45692)

Limiting client go packages visibility, round 3

Continue the work in the merged PR https://github.com/kubernetes/kubernetes/pull/45258

These packages in client-go will be gone after #44065 is fixed:
pkg/api/helper, pkg/api/util, internal version of api groups, API install packages. 

This PR removes the dependency on these packages and add bazel visibility rules to prevent relapse.
2017-05-12 16:04:37 -07:00
Kubernetes Submit Queue 35eba22cc7 Merge pull request #41162 from MrHohn/esipp-ga
Automatic merge from submit-queue (batch tested with PRs 45623, 45241, 45460, 41162)

Promotes Source IP preservation for Virtual IPs from Beta to GA

Fixes #33625. Feature issue: kubernetes/features#27.

Bullet points:
- Declare 2 fields (ExternalTraffic and HealthCheckNodePort) that mirror the ESIPP annotations.
- ESIPP alpha annotations will be ignored.
- Existing ESIPP beta annotations will still be fully supported.
- Allow promoting beta annotations to first class fields or reversely.
- Disallow setting invalid ExternalTraffic and HealthCheckNodePort on services. Default ExternalTraffic field for nodePort or loadBalancer type service to "Global" if not set.

**Release note**:

```release-note
Promotes Source IP preservation for Virtual IPs to GA.

Two api fields are defined correspondingly:
- Service.Spec.ExternalTrafficPolicy <- 'service.beta.kubernetes.io/external-traffic' annotation.
- Service.Spec.HealthCheckNodePort <- 'service.beta.kubernetes.io/healthcheck-nodeport' annotation.
```
2017-05-12 15:00:46 -07:00
Kubernetes Submit Queue dbcfa96c60 Merge pull request #45460 from nilebox/nilebox-pod-preset-renaming
Automatic merge from submit-queue (batch tested with PRs 45623, 45241, 45460, 41162)

Replacing “Pod Injection Policy” with “Pod Preset” in the code documentation

**What this PR does / why we need it**:
Replacing the leftovers of the old term "Pod Injection Policy" with "Pod Preset" in the code documentation.
2017-05-12 15:00:43 -07:00
Zihong Zheng 12b6c2b879 Autogenerated files 2017-05-12 10:59:00 -07:00
Kubernetes Submit Queue d437703d27 Merge pull request #44787 from mbohlool/c1
Automatic merge from submit-queue (batch tested with PRs 45684, 45266, 45669, 44787, 44984)

Add GroupVersionKind extension to OpenAPI operations

Fixes: #43249
ref: #34254

```release-note
Added Group/Version/Kind and Action extension to OpenAPI Operations 
```
2017-05-12 03:20:42 -07:00
Kubernetes Submit Queue 0c5a7b434c Merge pull request #45638 from gyliu513/newindexer
Automatic merge from submit-queue (batch tested with PRs 45571, 45657, 45638, 45663, 45622)

Added indexer description for the API of NewIndexerInformer.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-12 02:28:39 -07:00
Kubernetes Submit Queue 86eb18944f Merge pull request #45495 from deads2k/server-24-stop
Automatic merge from submit-queue

plumb stopch to post start hook index since many of them are starting go funcs

Many post-start hooks require a stop channel to properly terminate their go funcs.

@p0lyn0mial I think you need this for https://github.com/kubernetes/kubernetes/pull/45355 ptal.
@ncdc per request
@sttts can you review too since Andy is out?
2017-05-11 16:50:21 -07:00
Chao Xu 14045d253d hack/update-bazel.sh 2017-05-11 15:59:04 -07:00
Chao Xu b91f787d83 run visibility-control.sh to setup visibility for all internal versions of client-go api groups, and their install packages 2017-05-11 15:42:15 -07:00
Chao Xu b1b5ead8b4 update visibility manually 2017-05-11 15:17:25 -07:00
Chao Xu c354076aa4 remove invocation of k8s.io/client-go/pkg/api/install
change import of client-go/api/helper to kubernetes/api/helper

remove unnecessary use of client-go/api.registry

change use of client-go/pkg/util to kubernetes/pkg/util

remove dependency on client-go/pkg/apis/extensions

remove unnecessary invocation of k8s.io/client-go/extension/intsall

change use of k8s.io/client-go/pkg/apis/authentication to v1
2017-05-11 15:03:46 -07:00
Kubernetes Submit Queue 69ad6addcc Merge pull request #45559 from rmmh/no-xss
Automatic merge from submit-queue

HTML escape apiserver errors to avoid triggering vulnerability scanners.

Simple XSS scans might fetch /<script>alert('vulnerable')</script>, and
fail when the response body includes the script tag verbatim, despite
the headers directing the browser to interpret the response as text.

This isn't a real vulnerability, but it's easier to fix this here than
it is to fix the scanners.


**Release note**:
```release-note
NONE
```
2017-05-11 13:17:40 -07:00
deads2k be39283923 plumb stopch to post start hook index since many of them are starting go funcs 2017-05-11 09:16:13 -04:00
Kubernetes Submit Queue 48caf95a6c Merge pull request #45631 from nilebox/nilebox/remove-doc-insecure
Automatic merge from submit-queue

Remove mentioning insecure server (which is not supported anymore) from API server docs

**What this PR does / why we need it**:
Remove mentioning insecure serving from the docs, since only secure serving is supported now.
2017-05-11 05:36:27 -07:00
Kubernetes Submit Queue 6288c4e96c Merge pull request #44861 from sttts/sttts-dynamic-client-listoptions-fallback
Automatic merge from submit-queue

apimachinery: NotRegisteredErr for known kinds not registered in target GV

Fixes the fall back to core v1 for *Options in the parameter encoder of the dynamic client.

The dynamic client uses NotRegisteredErr to fall back to core v1 if ListOptions is not known
in the given GV. This commit fixes the case that ListOptions is known in some group, but not
in the given one.
2017-05-11 03:06:25 -07:00
Dr. Stefan Schimanski 2ece9e4dec NotRegisteredErr for known kinds not registered in target GV
The dynamic client uses NotRegisteredErr to fall back to core v1 if ListOptions is not known
in the given GV. This commit fixes the case that ListOptions is known in some group, but not
in the given one.
2017-05-11 09:59:04 +02:00
Guangya Liu e42f7c7480 Added indexer description for the API of NewIndexerInformer. 2017-05-11 14:28:25 +08:00
Kubernetes Submit Queue 7ac1936cc6 Merge pull request #45561 from deads2k/tpr-11-defaulting
Automatic merge from submit-queue (batch tested with PRs 45556, 45561, 45256)

add defaulting for customresources

This adds the promised defaulting for customresources.  Namespaced by default, listkind=kind+List, singular=toLower(kind).
2017-05-10 22:24:41 -07:00
Kubernetes Submit Queue 3126e73400 Merge pull request #45556 from deads2k/tpr-10-validation
Automatic merge from submit-queue

add validation for customresourcedefintions

Add basic validation for customresource definitions.

@adohe if you had review bandwidth, this is a relatively small one.
2017-05-10 22:21:21 -07:00
Nail Islamov 6c448319ac Remove mentioning insecure server (which is not supported anymore) 2017-05-11 13:18:58 +10:00
Kubernetes Submit Queue aba95a169b Merge pull request #45543 from sttts/sttts-external-roundtrip
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543)

Do roundtrip testing with external kinds in client-go TPR example

This tests that our serialization machinery works for TPR types, i.e. without internal counterpart and without generated code.

/cc @nilebox
2017-05-10 17:47:47 -07:00
Kubernetes Submit Queue a48cfe9fe5 Merge pull request #45384 from caesarxuchao/copy-metrics-interanl
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543)

Copy internal types to metrics

Supersedes #45306. 

#45306 removed the internal types and suggested whoever needs the internal types should define their own copy, and use the code-gen tools to generated the conversion functions. Per offline discussion with @DirectXMan12, we wanted to go that direction but it's not clear where to put the internal types yet. Hence, as a temporary solution, we decided copy the referred client-go/pkg/api types into metrics api to avoid the dependency.

The commit "remove need of registry from custom_metrics/client.go" is similar to what I did to the fake client in an earlier PR. Let me know if you want to put the commit in another PR.
2017-05-10 17:47:41 -07:00
Kubernetes Submit Queue ad9b41dbe2 Merge pull request #45535 from sttts/sttts-client-go-owners
Automatic merge from submit-queue

Add myself to client-go OWNERS

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-10 14:39:01 -07:00
Kubernetes Submit Queue 3ddbed969b Merge pull request #45490 from deads2k/owners-01-extensions
Automatic merge from submit-queue

add owners to new packages

Adds owners files to some packages that need it.
2017-05-10 12:51:51 -07:00
deads2k 70a95c3ed9 add defaulting for customresources 2017-05-10 13:43:57 -04:00
Dr. Stefan Schimanski b498019f2f Update generated files 2017-05-10 14:45:01 +02:00
deads2k bcf6c66c4c add validation for customresourcedefintions 2017-05-10 08:12:30 -04:00
Dr. Stefan Schimanski fb2298de18 client-go tpr example: round trip external tpr types 2017-05-10 09:49:40 +02:00
Chao Xu a5fd6b91e7 generated 2017-05-09 21:28:39 -07:00
Kubernetes Submit Queue 61593ba8b8 Merge pull request #45453 from k82cn/k8s_45220
Automatic merge from submit-queue (batch tested with PRs 45453, 45307, 44987)

Init cache with assigned non-terminated pods before scheduling

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

**Release note**:

```release-note
The fix makes scheduling go routine waiting for cache (e.g. Pod) to be synced.
```
2017-05-09 20:23:37 -07:00
Chao Xu dec78eb9ae make client-go/pkg/api invisible to k8s.io/metrics; except for the fake
client, which will be fixed soon
2017-05-09 18:05:23 -07:00
Chao Xu 0b3eb50b39 Remove invocation of registry from custom_metrics/client.go 2017-05-09 18:05:22 -07:00
Chao Xu b5a41e770a remove unnecessary call to metrics install package
remove init and reference to client-go/api from metrcis install package
2017-05-09 18:05:22 -07:00
Chao Xu 074affca6b copy interal ObjectReference to k8s.io/metrics 2017-05-09 18:05:22 -07:00
Ryan Hitchman dd4bb1213d Escape "<>&" in apiserver errors to avoid triggering vulnerability scanners.
Simple XSS scans might fetch /<script>alert('vulnerable')</script>, and
fail when the response body includes the script tag verbatim, despite
the headers directing the browser to interpret the response as text.

This isn't a real vulnerability, but it's easier to fix this here than
it is to fix the scanners.
2017-05-09 14:46:44 -07:00
Kubernetes Submit Queue 52e8d6b95c Merge pull request #45529 from wanghaoran1988/fix_issue_44476
Automatic merge from submit-queue

oidc auth plugin not to override the Auth header if it's already exits

**What this PR does / why we need it**:
oidc auth client plugin should not override the `Authorization` header if it's already exits.
**Which issue this PR fixes** : 
fix oidc auth plugin override the` Authorization` header
**Special notes for your reviewer**:

**Release note**:
2017-05-09 12:52:53 -07:00
Klaus Ma 3278de723a generated client-go. 2017-05-10 01:50:38 +08:00
Klaus Ma 7bf698a2c8 generated codes. 2017-05-10 01:50:38 +08:00
Kubernetes Submit Queue 97889d4ff9 Merge pull request #45432 from deads2k/agg-30-status
Automatic merge from submit-queue (batch tested with PRs 44798, 45537, 45448, 45432)

use apiservice.status to break apart controller and handling concerns

Still needs tests.

This starts breaking the handler and controller aspects of the aggregator by making use of status and conditions instead of actually running a specific check on demand.

@kubernetes/sig-api-machinery-pr-reviews 
@luxas since you've been asking
2017-05-09 08:29:40 -07:00
Kubernetes Submit Queue 49e5435529 Merge pull request #45403 from sttts/sttts-tri-state-watch-capacity
Automatic merge from submit-queue

apiserver: injectable default watch cache size

This makes it possible to override the default watch capacity in the REST options getter. Before this PR the default is written into the storage struct explicitly, and if it is the default, the REST options getter didn't know. With this the PR the default is applied late and can be injected from the outside.
2017-05-09 07:27:35 -07:00
Dr. Stefan Schimanski 7a06299f4a apitesting: external serialization roundtrip test 2017-05-09 16:10:08 +02:00
deads2k 272aa2434d start using apiservice status in controllers and serving 2017-05-09 09:52:51 -04:00
Kubernetes Submit Queue 110f410e55 Merge pull request #45463 from nilebox/nilebox-tpr-watcher-example
Automatic merge from submit-queue (batch tested with PRs 45481, 45463)

ThirdPartyResource example: added watcher example, code cleanup

**NOTE**: This is a cleaned and updated version of PR https://github.com/kubernetes/kubernetes/pull/43027

**What this PR does / why we need it**:
An example of using go-client for watching on ThirdPartyResource events (create/update/delete).
2017-05-09 06:52:34 -07:00
deads2k b976881752 add apiservices/status REST handling 2017-05-09 09:44:27 -04:00
Dr. Stefan Schimanski b7146bca19 Add myself to client-go OWNERS 2017-05-09 13:45:02 +02:00
Nail Islamov a6c97715ed ThirdPartyResource client-go example: added TPR controller example, code cleanup and integration test 2017-05-09 21:31:39 +10:00
Haoran Wang f54a08093d oidc auth plugin not to override the Auth header if it's already exits 2017-05-09 14:04:42 +08:00