Commit Graph

1885 Commits (13b12e89408869c5b560a81e95bca33267bdb8e1)

Author SHA1 Message Date
Kubernetes Submit Queue 941ad0164d Merge pull request #50407 from ixdy/gazelle-and-kazel
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Manage BUILD files using gazelle + kazel

**What this PR does / why we need it**: uses the upstream `gazelle` tool to manage go rules in BUILD files.
This is needed to support Bazel builds on Mac OS and Bazel cross compilation in general.

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

**Special notes for your reviewer**:
It's probably easiest to review this commit-by-commit:
* bump to latest `rules_go` (for recent `cgo_library` and `gazelle` improvements)
* update `kazel` with recent compatibility fixes (https://github.com/kubernetes/repo-infra/pull/28, https://github.com/kubernetes/repo-infra/pull/27), update `hack` scripts to download/build `gazelle`, and then run both `gazelle` and `kazel`. (Additionally make `gazelle` skip things it shouldn't touch.)
* run `hack/update-bazel.sh` to autogenerate everything
* remove the old `cgo_genrule` rules - these are now part of `go_library`
* remove the `automanaged` tags from all go rules - `gazelle` doesn't use them, and it prevents an old version of `kazel/gazel` from messing with the rules
* remove the `licenses()` rules from everywhere but `third_party/` - we don't need them, and `gazelle` won't add them on new `BUILD` files it generates.

**Release note**:

```release-note
NONE
```
for review:
/assign @mikedanese @spxtr 
for approval:
/assign @thockin
2017-08-11 14:13:57 -07:00
Kubernetes Submit Queue 984f1af5c5 Merge pull request #50308 from m1093782566/validate-apiserver
Automatic merge from submit-queue

validate kube-apiserver options

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

Create Validate() or add more checks in existing Validate() for the following files:

* vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/start.go:80

* vendor/k8s.io/kube-aggregator/pkg/cmd/server/start.go:104

* vendor/k8s.io/sample-apiserver/pkg/cmd/server/start.go:82

* cmd/kube-apiserver/app/options/validation.go:49

**Which issue this PR fixes**: 

fixes #50301

**Special notes for your reviewer**:

This PR follows #50135 

**Release note**:

```release-note
NONE
```
2017-08-11 12:56:00 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
zhouhaibing089 2e5dc7d727 add fuzzer dir for each apigroup 2017-08-11 15:12:57 +08:00
Kubernetes Submit Queue 524a0e04c4 Merge pull request #50224 from xiangpengzhao/remove-beta-annotations
Automatic merge from submit-queue

Remove deprecated ESIPP beta annotations

**What this PR does / why we need it**:
Remove deprecated ESIPP beta annotations.

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

**Special notes for your reviewer**:
/assign @MrHohn
/sig network

**Release note**:

```release-note
Beta annotations `service.beta.kubernetes.io/external-traffic` and `service.beta.kubernetes.io/healthcheck-nodeport` have been removed. Please use fields `service.spec.externalTrafficPolicy` and `service.spec.healthCheckNodePort` instead.
```
2017-08-10 22:55:54 -07:00
Kubernetes Submit Queue 4dc4c3c4a4 Merge pull request #49624 from guangxuli/fix_daemonset_resource_type
Automatic merge from submit-queue (batch tested with PRs 50306, 49624)

Add daemonset to all categories

**What this PR does / why we need it**:
We could get daemonset resource by running command `kubectl get all`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fix https://github.com/kubernetes/kubernetes/issues/49620
2017-08-10 06:27:19 -07:00
Kubernetes Submit Queue 85e2e5dd9a Merge pull request #49642 from liggitt/rbac-v1
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

Add rbac.authorization.k8s.io/v1

xref https://github.com/kubernetes/features/issues/2

Promotes the rbac.authorization.k8s.io/v1beta1 API to v1 with no changes

```release-note
The `rbac.authorization.k8s.io/v1beta1` API has been promoted to `rbac.authorization.k8s.io/v1` with no changes.
The `rbac.authorization.k8s.io/v1alpha1` version is deprecated and will be removed in a future release.
```
2017-08-10 00:53:17 -07:00
Kubernetes Submit Queue f6d90eaa45 Merge pull request #49321 from dgoodwin/export-wiring
Automatic merge from submit-queue (batch tested with PRs 49615, 49321, 49982, 49788, 50355)

Fix unused Secret export logic.

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

The strategy used for the secret store defined custom export logic, and
had accompanying unit tests. However the secret storage did not actually
wire this up by setting an ExportStrategy and thus the code was never
used in the real world.

This change fixes the missing assignment and adds testing at a higher
level to ensure any uses of the generic registry.Store that we expect to
have an ExportStrategy do, and no others.

Several other strategies in the RBAC package also appeared to have
unwired Export logic, however their implementations were all empty
leading me to believe that these are not considered exportable. The
empty methods have now been removed.

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

**Release note**:

```release-note
```
2017-08-09 23:56:00 -07:00
Kubernetes Submit Queue db4c90940b Merge pull request #50370 from wu8685/correct-field-set-size
Automatic merge from submit-queue (batch tested with PRs 50300, 50328, 50368, 50370, 50372)

correct the allocated element number of pod selectable field set

a little fix to correct the allocated element number of pod selectable field set
2017-08-09 22:58:28 -07:00
Kubernetes Submit Queue 212928ad14 Merge pull request #49930 from soltysh/remove_scheduledjobs
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Remove scheduledjobs

This is a prerequisite for promoting CronJobs to beta.

**Release note**:
```release-note
Remove deprecated ScheduledJobs endpoints, use CronJobs instead.
```
2017-08-09 14:14:30 -07:00
Jordan Liggitt dd7be70a4a
Add rbac.authorization.k8s.io/v1 2017-08-09 17:04:54 -04:00
Kubernetes Submit Queue da549596c4 Merge pull request #49534 from smarterclayton/separate_proxy
Automatic merge from submit-queue

Support exec/attach/portforward in `kubectl proxy`

Use the UpgradeAwareProxy shared code in kubectl proxy. Provide a separate transport for those requests that does not have HTTP/2 enabled. Refactor the code to be a bit cleaner in places and to better separate changes.

Fixes #32026

```release-note
`kubectl proxy` will now correctly handle the `exec`, `attach`, and `portforward` commands.  You must pass `--disable-filter` to the command in order to allow these endpoints.
```
2017-08-09 09:53:35 -07:00
Devan Goodwin 855a1c1713 Fix unused Secret export logic.
The strategy used for the secret store defined custom export logic, and
had accompanying unit tests. However the secret storage did not actually
wire this up by setting an ExportStrategy and thus the code was never
used in the real world.

This change fixes the missing assignment and adds testing at a higher
level to ensure any uses of the generic registry.Store that we expect to
have an ExportStrategy do, and no others.

Several other strategies in the RBAC package also appeared to have
unwired Export logic, however their implementations were all empty
leading me to believe that these are not considered exportable. The
empty methods have now been removed.
2017-08-09 11:07:51 -03:00
wu8685 10d3ba15a8 correct the allocated element number of pod selectable field set 2017-08-09 21:02:27 +08:00
xiangpengzhao ea1a577358 Remove some helpers associated with ESIPP. 2017-08-09 14:25:08 +08:00
m1093782566 de406f83cf validate kube-apiserver options 2017-08-09 00:24:37 +08:00
Maciej Szulik 0cb8bae6ac
Generated changes after removing ScheduledJobs 2017-08-08 15:57:03 +02:00
Maciej Szulik e465962bf7
Remove ScheduledJobs support 2017-08-08 15:22:26 +02:00
Janet Kuo e7930520e4 Deprecate Deployment rollbackTo field and remove rollback endpoint
1. Deprecate `.spec.rollbackTo` field in extensions/v1beta1 and
   apps/v1beta1 Deployments
2. Remove the same field from apps/v1beta2 Deployment, and remove
   its rollback subresource and endpoint
2017-08-07 18:35:49 -07:00
Jun Xiang Tee 91f100b501 implement statefulset scale subresource 2017-08-07 12:17:46 -07:00
Kubernetes Submit Queue 47999c5803 Merge pull request #50087 from deads2k/server-39-convert
Automatic merge from submit-queue (batch tested with PRs 50087, 39587, 50042, 50241, 49914)

convert default predicates to use the default

Builds on https://github.com/kubernetes/kubernetes/pull/50019 (lgtm'd already)

This converts the already default field selectors to use the default value.  I'll let CI point out the unit test failures for me to chase.

@kubernetes/sig-api-machinery-misc
2017-08-07 10:58:55 -07:00
Kubernetes Submit Queue 0df3f0ef3e Merge pull request #50091 from dixudx/fieldSelector_podIP
Automatic merge from submit-queue (batch tested with PRs 50091, 50231, 50238, 50236, 50243)

add fieldSelector podIP

**What this PR does / why we need it**:
Currently the `fieldSelector` for `Pod` only support `metadata.name`, `metadata.namespace`, `spec.nodeName`, `spec.restartPolicy` and `status.phase`.

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

**Special notes for your reviewer**:
/cc @wojtek-t @caesarxuchao @justinsb @LiliC

**Release note**:

```release-note
add fieldSelector podIP
```
2017-08-07 07:14:52 -07:00
deads2k ec397c4374 convert default predicates to use the default 2017-08-07 09:05:17 -04:00
Shiyang Wang 2eda19da7b Fix NotFound errors do not line up with API endpoint's group version 2017-08-07 16:30:40 +08:00
Kubernetes Submit Queue 8d6bbaa85f Merge pull request #49678 from smarterclayton/429_metric
Automatic merge from submit-queue

Timeout and Max-in-flight don't report non-resource URLs correctly.

Unify error reporting for 429 and 504 to be correct for timeout and max in flight and eviction. Add better messages to eviction (removing a todo). Return the correct body content for timeouts (reason and code should be correct).

This potentially increases cardinality of 429, but because non-api urls may be under the max-inflight budget we need to report them somewhere (if something breaks and starts fetching API versions endlessly).

```release-note
The 504 timeout error was returning a JSON error body that indicated it was a 500.  The body contents now correctly report a 500 error.
```
2017-08-05 01:28:00 -07:00
xiangpengzhao ebe21ee4c1 Remove deprecated ESIPP beta annotations 2017-08-05 15:00:58 +08:00
Clayton Coleman d2b8cdb3c4
React to changes in UpgradeAwareProxy 2017-08-04 12:48:20 -04:00
Kubernetes Submit Queue 8b30aaec39 Merge pull request #47028 from xilabao/compact-same-resourcenamea-rule
Automatic merge from submit-queue

compact rules which has the same ResourceName

**What this PR does / why we need it**:
make compact rule more elegant.
Before
```
# ./cluster/kubectl.sh describe clusterrole system:kube-scheduler
Name:		system:kube-scheduler
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
PolicyRule:
  Resources			Non-Resource URLs	Resource Names		Verbs
  ---------			-----------------	--------------		-----
  bindings			[]			[]			[create]
  endpoints			[]			[]			[create]
  endpoints			[]			[kube-scheduler]	[delete]
  endpoints			[]			[kube-scheduler]	[get]
  endpoints			[]			[kube-scheduler]	[patch]
  endpoints			[]			[kube-scheduler]	[update]
  events			[]			[]			[create patch update]
  nodes				[]			[]			[get list watch]
  persistentvolumeclaims	[]			[]			[get list watch]
  persistentvolumes		[]			[]			[get list watch]
  pods				[]			[]			[get list watch]
  pods/binding			[]			[]			[create]
  pods/status			[]			[]			[update]
  replicasets.extensions	[]			[]			[get list watch]
  replicationcontrollers	[]			[]			[get list watch]
  services			[]			[]			[get list watch]
  statefulsets.apps		[]			[]			[get list watch]
```
After
```
# ./cluster/kubectl.sh describe clusterrole system:kube-scheduler
Name:		system:kube-scheduler
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
PolicyRule:
  Resources			Non-Resource URLs	Resource Names		Verbs
  ---------			-----------------	--------------		-----
  bindings			[]			[]			[create]
  endpoints			[]			[]			[create]
  endpoints			[]			[kube-scheduler]	[delete get patch update]
  events			[]			[]			[create patch update]
  nodes				[]			[]			[get list watch]
  persistentvolumeclaims	[]			[]			[get list watch]
  persistentvolumes		[]			[]			[get list watch]
  pods				[]			[]			[get list watch]
  pods/binding			[]			[]			[create]
  pods/status			[]			[]			[update]
  replicasets.extensions	[]			[]			[get list watch]
  replicationcontrollers	[]			[]			[get list watch]
  services			[]			[]			[get list watch]
  statefulsets.apps		[]			[]			[get list watch]
```
**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-04 05:51:47 -07:00
Kubernetes Submit Queue 65e6bf8d76 Merge pull request #50019 from deads2k/server-38-storage
Automatic merge from submit-queue (batch tested with PRs 48237, 50084, 50019, 50069, 50090)

create default storage selection functions

The vast majority of our REST storage needs either default selection predicates or minor tweaks the the field selection criteria.  This pull makes that work without any special fields set, but also allows the more complex configuration where it is required.  I only changed one storage an example.  Once this merges, I'll update the others.

@kubernetes/sig-api-machinery-misc @wojtek-t @smarterclayton @sttts @cheftako ptal.
2017-08-03 22:22:00 -07:00
m1093782566 86eb95b0a8 validate token length in tokenReview 2017-08-04 13:01:04 +08:00
Kubernetes Submit Queue 40d66b8e05 Merge pull request #49677 from dims/send-missing-uid-field-during-webhook-authorize
Automatic merge from submit-queue (batch tested with PRs 50103, 49677, 49449, 43586, 48969)

Add missing UID in SubjectAccessReviewSpec

**What this PR does / why we need it**:
WebhookAuthorizer's Authorize should send *all* the information
present in the user.Info data structure. We are not sending the
UID currently.


**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
The SubjectAccessReview API in the authorization.k8s.io API group now allows providing the user uid.
```
2017-08-03 16:43:34 -07:00
Di Xu c6cafa576c add fieldSelector podIP 2017-08-03 21:14:32 +08:00
deads2k 0258d044d3 create default storage selection functions 2017-08-02 11:02:22 -04:00
Davanum Srinivas 9a761b16c1 Add missing UID in SubjectAccessReviewSpec
WebhookAuthorizer's Authorize should send *all* the information
present in the user.Info data structure. We are not sending the
UID currently.
2017-08-02 10:49:02 -04:00
Monis Khan f3d9b940bb
Allow update to GC fields for RBAC resources
This change makes it so that no escalation check is performed when
updating only the garbage collector fields (owner references and
finalizers) of RBAC resources.  This allows the
garbage collector to delete roles that grant permissions such
as "create", which it will never have.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-01 13:40:10 -04:00
Clayton Coleman 1b8f24c9a8
Return a status cause for disruption budget that contains more details
Also uses the standard error constructor for TooManyRequests and
clarifies *why* a disruption is rejected.
2017-07-28 19:16:40 -04:00
Janet Kuo ac3f9b8c34 Autogen 2017-07-26 10:56:55 -07:00
Janet Kuo 6eaf6884fb Bump ReplicaSet to apps/v1beta2 2017-07-26 09:51:41 -07:00
guangxuli 7db36811be add daemonset to all categories 2017-07-26 15:41:47 +08:00
xilabao bc92f800bd compact rules which has the same ResourceName 2017-07-26 09:14:46 +08:00
Anirudh c168a3faeb DS: autogen 2017-07-25 13:33:25 -07:00
foxish 14d5793869 DS: changes to server and storage 2017-07-25 11:47:57 -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
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
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
deads2k 1477b407c7 add cronjobs to all 2017-07-21 10:56:26 -04:00
Janet Kuo 56f16346d2 Autogen
make clean && make generated_files && hack/update-all.sh
2017-07-20 14:16:43 -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
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 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
Kubernetes Submit Queue 45432de47b Merge pull request #49128 from deads2k/server-29-mising-shortname
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

add svc and netpol to discovery

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

one shortname was missing entirely, the other was on a storage not actually used as storage.

@ncdc
2017-07-18 21:54:20 -07:00
Bobby (Babak) Salamat e827e1ba87 autogenerated files 2017-07-18 17:47:57 -07:00
Bobby Salamat 33e6a476ba Add PriorityClass API
Add PriorityClass to pkg/registry

Add PriorityClass to pkg/master/master.go

Add PriorityClass to import_know_versions.go

Update linted packages

minor fix
2017-07-18 17:47:57 -07:00
deads2k 8232778ffe add svc and netpol to discovery 2017-07-18 13:16:41 -04:00
xiangpengzhao d765f91c1d Fix health check node port test flake 2017-07-18 19:05:40 +08:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
Kubernetes Submit Queue 0e461035cb Merge pull request #48734 from tallclair/namechange
Automatic merge from submit-queue (batch tested with PRs 48698, 48712, 48516, 48734, 48735)

Name change: s/timstclair/tallclair/

I changed my name, and I'm migrating my user name to be consistent.
2017-07-12 04:56:32 -07:00
Tim Allclair a2f2e1d491 Name change: s/timstclair/tallclair/ 2017-07-10 14:05:46 -07:00
Clayton Coleman c73622108c
generated: bazel / godeps 2017-07-09 15:23:34 -04:00
Clayton Coleman edc12aafe2
Unify generic proxy code in apimachinery
Make the utility package truly generic, consolidate all generic proxy in
apimachinery.
2017-07-07 16:26:29 -04:00
xiangpengzhao 472e10faf9 Fix ClusterIP leak flake and potential NodePort leak 2017-07-07 13:02:01 +08:00
xiangpengzhao 895da2cd49 Remove shouldAssignNodePorts logic in initNodePort; add test cases. 2017-07-07 09:57:11 +08:00
deads2k 254e71bfc6 bulk delete of tpr packages 2017-07-05 11:02:23 -04:00
Kubernetes Submit Queue c10cc3decd Merge pull request #48353 from deads2k/tpr-17-delete-01
Automatic merge from submit-queue (batch tested with PRs 48480, 48353)

remove tpr api access

xref https://github.com/kubernetes/kubernetes/issues/48152

TPR tentacles go pretty deep. This gets us started by removing API access and we'll move down from there.

@kubernetes/sig-api-machinery-misc 
@ironcladlou this should free up the GC implementation since TPRs will no longer be present and failing.

```release-note
Removing TPR api access per https://github.com/kubernetes/kubernetes/issues/48152
```
2017-07-05 05:49:30 -07:00
Jordan Liggitt d5730f40cd
Ensure namespace exists as part of RBAC reconciliation 2017-07-04 18:24:16 -05:00
deads2k 312fb1e1fa allow a deletestrategy to opt-out of GC 2017-07-03 11:27:45 -04:00
deads2k 3ee458d246 remove tpr API access 2017-07-03 11:25:59 -04:00
xiangpengzhao dc7fb0c9e5
Use helper to init ClusterIP and NodePort in Create of service 2017-07-03 16:35:09 +08:00
xiangpengzhao a58232ab41 Add unit test case for initClusterIP and updateNodePort 2017-06-28 09:35:12 +08:00
xiangpengzhao 4e9abca6d0 Allocate clusterIP when change service type from ExternalName to ClusterIP 2017-06-27 12:30:22 +08:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue 08c705e875 Merge pull request #46800 from deads2k/agg-33-priority
Automatic merge from submit-queue (batch tested with PRs 47492, 47542, 46800, 47545, 45764)

separate group and version priority

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


This just modifies the API and does the minimal plumbing.  I can extend this pull or do another to fix the priority problem.
2017-06-14 21:43:44 -07:00
Anthony Yeh 17cbc5e014
Fix TPR watches. 2017-06-14 16:58:49 -07:00
deads2k 963c85e1c8 sort current API versions and fallback for others 2017-06-14 09:29:44 -04:00
Kenneth Owens 1b55f57391 Implements StatefulSet update
Implements history utilities for ControllerRevision in the controller/history package
StatefulSetStatus now has additional fields for consistency with DaemonSet and Deployment
StatefulSetStatus.Replicas now represents the current number of createdPods and StatefulSetStatus.ReadyReplicas is the current number of ready Pods
2017-06-06 12:00:28 -07:00
Christoph Blecker 1bdc7a29ae
Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
Fabiano Franz 39e5812848 Update generated 2017-06-05 20:32:30 -03:00
Fabiano Franz 058f9b4f32 Add group alias names to discovery in registry 2017-06-05 20:18:12 -03:00
Tim Hockin be987b015c Merge pull request #46716 from thockin/proxy-comments
Kube-proxy cleanups
2017-06-03 15:57:17 -07:00
Clayton Coleman 2568a92119
Grow signature for predicate attributes to include init status 2017-06-02 22:09:04 -04:00
Clayton Coleman 331eea67d8
Allow initialization of resources
Add support for creating resources that are not immediately visible to
naive clients, but must first be initialized by one or more privileged
cluster agents. These controllers can mark the object as initialized,
allowing others to see them.

Permission to override initialization defaults or modify an initializing
object is limited per resource to a virtual subresource "RESOURCE/initialize"
via RBAC.

Initialization is currently alpha.
2017-06-02 22:09:03 -04:00
Kubernetes Submit Queue 97a5d37841 Merge pull request #40848 from smarterclayton/serverside_get
Automatic merge from submit-queue (batch tested with PRs 46432, 46701, 46326, 40848, 46396)

Add a server side Get operation

Implement proposal kubernetes/community#363

```release-note
The Kubernetes API supports retrieving tabular output for API resources via a new mime-type `application/json;as=Table;v=v1alpha1;g=meta.k8s.io`.  The returned object (if the server supports it) will be of type `meta.k8s.io/v1alpha1` with `Table`, and contain column and row information related to the resource.  Each row will contain information about the resource - by default it will be the object metadata, but callers can add the `?includeObject=Object` query parameter and receive the full object.  In the future kubectl will use this to retrieve the results of `kubectl get`.
```
2017-06-02 11:47:11 -07:00
Kubernetes Submit Queue f5bcd98d5e Merge pull request #46326 from xilabao/add-role-to-describe-command
Automatic merge from submit-queue (batch tested with PRs 46432, 46701, 46326, 40848, 46396)

add role/clusterrole to describe.go

**What this PR does / why we need it**:
```
# ./cluster/kubectl.sh describe clusterrole system:kube-scheduler 
Name:		system:kube-scheduler
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
PolicyRule:
  Resources			Non-Resource URLs	Resource Names		Verbs
  ---------			-----------------	--------------		-----
  bindings			[]			[]			[create]
  endpoints			[]			[]			[create]
  endpoints			[]			[kube-scheduler]	[delete]
  endpoints			[]			[kube-scheduler]	[get]
  endpoints			[]			[kube-scheduler]	[patch]
  endpoints			[]			[kube-scheduler]	[update]
  events			[]			[]			[create patch update]
  nodes				[]			[]			[get list watch]
  persistentvolumeclaims	[]			[]			[get list watch]
  persistentvolumes		[]			[]			[get list watch]
  pods				[]			[]			[get list watch]
  pods/binding			[]			[]			[create]
  pods/status			[]			[]			[update]
  replicasets.extensions	[]			[]			[get list watch]
  replicationcontrollers	[]			[]			[get list watch]
  services			[]			[]			[get list watch]
  statefulsets.apps		[]			[]			[get list watch]

```
**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-02 11:47:07 -07:00
Tim Hockin fc34a9d6ba 'Global' -> 'Cluster' for traffic policy 2017-06-01 16:17:38 -07:00
Anthony Yeh ba59e14d44
Add TPR to CRD migration helper. 2017-05-31 19:07:38 -07:00
Kubernetes Submit Queue b6c00aeb10 Merge pull request #46377 from noah8713/master
Automatic merge from submit-queue (batch tested with PRs 45327, 46217, 46377, 46428, 46588)

Fix comment typo in kube-apiserver and cachesize

**What this PR does / why we need it**:
Fix comment typo in files cmd/kube-apiserver/app/server.go and pkg/registry/cachesize/cachesize.go
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Not a major issue, just a minor improvement.
**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-30 01:56:03 -07:00
Clayton Coleman 7ce63eb608
Refactor printers to support rendering as a Table
Return tables from the server.
2017-05-29 18:30:10 -04:00
Kubernetes Submit Queue 66a1d07ef4 Merge pull request #46407 from liggitt/namespace-delete-collection
Automatic merge from submit-queue (batch tested with PRs 46407, 46457)

Remove deletecollection support from namespace object

Namespace storage accidentally picked up deletecollection support from embedding the generic store. If invoked, it skips the custom namespace `Delete()` storage method that enforces finalization, and skips the namespace lifecycle admission plugin that protects immortal namespaces from deletion.

Given the data integrity implications of skipping namespace finalization, I'd backport this as far as we're releasing patch releases.

```release-note
The namespace API object no longer supports the deletecollection operation.
```
2017-05-28 13:16:54 -07:00
Dan Winship 0923f860f1 Regenerate files 2017-05-28 10:11:02 -04:00
Dan Winship 0683e55fc1 Add networking.k8s.io v1 API, with NetworkPolicy 2017-05-28 10:11:01 -04:00
Chao Xu 89e506c46a generated 2017-05-26 00:14:11 -07:00
Chao Xu 262799f91f serve the api in kube-apiserver 2017-05-25 23:55:15 -07:00
xilabao 9fe2ef54ba add policy_compact to rbac validation 2017-05-26 13:22:38 +08:00
Kenneth Owens ba128e6e41 Implements ControllerRevision API Object without codec and code
generation
2017-05-25 11:38:57 -07:00
Jordan Liggitt aa69c80728
Remove deletecollection support from namespace object 2017-05-25 00:17:08 -04:00
Kubernetes Submit Queue c1d6439fe3 Merge pull request #46262 from xilabao/fix-message-in-storage-extensions
Automatic merge from submit-queue

fix err message in storage extensions

**Release note**:

```release-note
`NONE`
```
2017-05-24 14:18:53 -07:00
Ginwala 28a0e2621b Fix comment typo in kube-apiserver and cachesize 2017-05-24 13:41:33 -07:00
Anirudh 2b0de599a7 PDB MaxUnavailable: API changes 2017-05-23 07:18:43 -07:00
Kubernetes Submit Queue 7e75998233 Merge pull request #46060 from MrHohn/fix-serviceregistry-externaltraffic
Automatic merge from submit-queue (batch tested with PRs 46060, 46234)

Randomize test nodePort to prevent collision

Fix #37982.

/assign @bowei 

**Release note**:

```release-note
NONE
```
2017-05-23 01:41:55 -07:00
xilabao d555b1e265 fix err message in storage extensions 2017-05-23 10:22:01 +08:00
Kubernetes Submit Queue c2c5051adf Merge pull request #44899 from smarterclayton/burst
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)

Support parallel scaling on StatefulSets

Fixes #41255

```release-note
StatefulSets now include an alpha scaling feature accessible by setting the `spec.podManagementPolicy` field to `Parallel`.  The controller will not wait for pods to be ready before adding the other pods, and will replace deleted pods as needed.  Since parallel scaling creates pods out of order, you cannot depend on predictable membership changes within your set.
```
2017-05-22 19:07:09 -07:00
Clayton Coleman 2861ae5eb9
Support burst in stateful set scale up and down
The alpha field podManagementPolicy defines how pods are created,
deleted, and replaced. The new `Parallel` policy will replace pods
as fast as possible, not waiting for the pod to be `Ready` or providing
an order. This allows for advanced clustered software to take advantage
of rapid changes in scale.
2017-05-21 01:14:26 -04:00
Klaus Ma 83b7f77ee2 Moved qos to api.helpers. 2017-05-20 07:17:57 -04:00
Zihong Zheng f0739a5638 Randomize test nodePort to prevent collision 2017-05-18 15:29:22 -07:00
Zihong Zheng a28a22df11 Move defaulting logic for ExternalTrafficPolicy into defaults.go 2017-05-17 12:47:01 -07:00
Zihong Zheng c0920f75cf Move API annotations into annotation_key_constants and remove api/annotations package 2017-05-16 21:55:23 -07:00
Kubernetes Submit Queue e9a98cb42b Merge pull request #45826 from deads2k/api-11-ownerreferences
Automatic merge from submit-queue (batch tested with PRs 45826, 45747, 45548, 45606, 41766)

prevent pods/status from touching ownerreferences

pods/status updates touching ownerreferences causes new fields to be dropped.

I think we really want to protect our metatdata by default with something like https://github.com/kubernetes/kubernetes/pull/45552 .  This fixes the immediate problem.

```release-note
prevent pods/status from touching ownerreferences
```

@derekwaynecarr @eparis
2017-05-15 11:39:18 -07:00
Kubernetes Submit Queue 161ba1c9a0 Merge pull request #45789 from zhangxiaoyu-zidif/vars-cronjob-sheduledjob-strategy
Automatic merge from submit-queue (batch tested with PRs 45070, 45821, 45732, 45494, 45789)

Rename vars scheduledJob to cronJob

**What this PR does / why we need it**:
Rename vars scheduledJob to cronJob

**Special notes for your reviewer**:
refer to #45480

**Release note**:

```release-note
NONE
```
2017-05-15 07:50:04 -07:00
deads2k b630e44dee prevent pods/status from touching ownerreferences 2017-05-15 10:05:07 -04:00
Kubernetes Submit Queue 337c5390fe Merge pull request #45741 from DirectXMan12/bug/incorrect-autoscaling-discovery-version
Automatic merge from submit-queue

Fix discovery version for autoscaling to be v1

The order of the storage setup blocks in the setup for the autoscaling
API group was accidentally inverted, meaning that if the v2alpha1 API
group was turned on, it would be set to the preferred API group-version
for discovery.

This was unintentional; the latest stable version should (v1) should be
preferred instead.

**Release note**:
```release-note
Ensure that autoscaling/v1 is the preferred version for API discovery when autoscaling/v2alpha1 is enabled.
```
2017-05-15 05:35:49 -07:00
zhangxiaoyu-zidif fae13eeec3 Rename vars scheduledJob to cronJob 2017-05-14 22:49:09 +08: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
Solly Ross 1aeca00097 Fix discovery version for autoscaling to be v1
The order of the storage setup blocks in the setup for the autoscaling
API group was accidentally inverted, meaning that if the v2alpha1 API
group was turned on, it would be set to the preferred API group-version
for discovery.

This was unintentional; the latest stable version should (v1) should be
preferred instead.
2017-05-12 14:57:13 -04:00
Zihong Zheng 12277a0ad4 Update ESIPP validation and service registry unit tests 2017-05-12 10:59:00 -07:00
Zihong Zheng 79ca71708a Adjust ESIPP validation and service registry codes 2017-05-12 10:58:59 -07:00
Justin Santa Barbara e1fdb8b027 Add sts alias for kubectl statefulset
Saves a lot of typing!
2017-05-10 09:57:36 -04: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 b799e62e1a apiserver: tri-state watch cache capacity: off, default, value 2017-05-08 11:29:01 +02:00
Nail Islamov 66f45195af Replacing “Pod Injection Policy” with “Pod Preset” in the code documentation 2017-05-08 09:13:22 +10:00
xiangpengzhao 709ca2e4cc
Clean up petset 2017-05-06 11:24:34 +08:00
Dr. Stefan Schimanski b0b711119b apimachinery: rename meta.{ -> UnsafeGuess}KindToResource 2017-05-03 09:49:02 +02:00
Jordan Liggitt 3f4ded12be
Add PATCH to supported list of proxy subresource verbs 2017-04-27 10:38:10 -04:00
Kubernetes Submit Queue 3e16a27d5b Merge pull request #44808 from shiywang/SemanticDeepEqual
Automatic merge from submit-queue (batch tested with PRs 44931, 44808)

Update to use Semantic.DeepEqual in regsitry

**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 https://github.com/kubernetes/kubernetes/issues/43402

**Release note**:
```
NONE
```

/assign @janetkuo
2017-04-26 05:48:41 -07:00
Kubernetes Submit Queue c90faa8071 Merge pull request #44779 from enj/enj/r/etcd_default_name_copy
Automatic merge from submit-queue (batch tested with PRs 44837, 44779, 44492)

Default ObjectNameFunc for all REST Stores

All `Store`s in Kubernetes follow the same logic for determining the name of an object.  This change makes it so that `CompleteWithOptions` defaults the `ObjectNameFunc` if it is not specified.  Thus a user does not need to remember to use `ObjectMeta.Name`.  Using the wrong field as the name can lead to an object which has a name that bypasses normal object name validation.

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

cc @liggitt @soltysh for review

**Release note**:

```
NONE
```
2017-04-24 07:55:59 -07:00
Shiyang Wang 34a114f6a9 Update to use Semantic.DeepEqual in regsitry 2017-04-23 14:52:05 +08:00
Kubernetes Submit Queue e0ba40b67c Merge pull request #39716 from zhouhaibing089/etcd-health-check
Automatic merge from submit-queue

etcd component status check should include credentials

- [x] Add TLS credentials into `pkg/genericapiserver.Backend`.
- [x] Add TLS credentials into `pkg/registry/core/componentstatus.Server`.
- [x] `pkg/probe/http.httpProber` should accept the TLS credentials.

Now it is working.

```console
$ kubectl get cs
NAME                 STATUS    MESSAGE              ERROR
scheduler            Healthy   ok
controller-manager   Healthy   ok
etcd-0               Healthy   {"health": "true"}
```

Fixes https://github.com/kubernetes/kubernetes/issues/27343.
2017-04-22 07:30:30 -07:00
Monis Khan ed35deb69d
Default ObjectNameFunc for all REST Stores
All Stores in Kubernetes follow the same logic for determining the name
of an object.  This change makes it so that CompleteWithOptions defaults
the ObjectNameFunc if it is not specified.  Thus a user does not need to
remember to use ObjectMeta.Name.  Using the wrong field as the name can
lead to an object which has a name that bypasses normal object name
validation.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-04-21 15:47:25 -04:00
Kubernetes Submit Queue 910c9d1ec7 Merge pull request #44729 from liggitt/non-resource-url-test
Automatic merge from submit-queue

Add nonResourceURL wildcard coverage tests

Ensure `*` covering all paths is tested
2017-04-21 06:10:26 -07:00
Kubernetes Submit Queue 7b43f922aa Merge pull request #42176 from enisoc/controller-ref-job
Automatic merge from submit-queue (batch tested with PRs 42177, 42176, 44721)

Job: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings Job into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that Job does not fight with other controllers over control of Pods.

Ref: #24433

**Special notes for your reviewer**:

**Release note**:

```release-note
Job controller now respects ControllerRef to avoid fighting over Pods.
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-04-20 12:57:06 -07:00
Kubernetes Submit Queue f25a657574 Merge pull request #42177 from enisoc/controller-ref-cronjob
Automatic merge from submit-queue (batch tested with PRs 42177, 42176, 44721)

CronJob: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings CronJob into compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that other controllers do not fight over control of objects that a CronJob owns.

**Special notes for your reviewer**:

**Release note**:

```release-note
CronJob controller now respects ControllerRef to avoid fighting with other controllers.
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-04-20 12:57:03 -07:00
Jordan Liggitt b2994a297d
Add nonResourceURL wildcard coverage tests 2017-04-20 11:43:46 -04:00
Jordan Liggitt 67360883bc
Switch to pointer to policy rule, visit and short circuit during authorization 2017-04-20 10:52:53 -04:00
Anthony Yeh 631d8bcdbb CronJob: Set DefaultGarbageCollectionPolicy to OrphanDependents.
Now that CronJob adds ControllerRef to Jobs it creates,
we need to set this default so legacy behavior is maintained.
2017-04-18 14:00:18 -07:00
Anthony Yeh bc423ac39d Job: Set DefaultGarbageCollectionPolicy to OrphanDependents.
Now that Job adds ControllerRef to Pods it creates,
we need to set this default so legacy behavior is maintained.
2017-04-18 13:58:15 -07:00
Zihong Zheng ae93b0da15 Refine NeedsHealthCheck logic 2017-04-17 14:26:02 -07:00
zhouhaibing089 b1040171b6 componentstatus: support client cert health check
etcd has support for client-cert-auth, which can be configured via the flag `--ca-file`,
when that is enabled, all the client requests must present with a client certificate,
however, the current component status check uses a single transport for all of the checks,
this is wrong, the checks should be different for each of different component, and make
each of them use different transport(tls configurations).
2017-04-17 13:58:33 +08:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Kubernetes Submit Queue 47ccb092f4 Merge pull request #44302 from caesarxuchao/move-resource_helpers.go
Automatic merge from submit-queue (batch tested with PRs 44440, 44038, 44302, 44316, 43876)

Move pkg/api/ref.go and pkg/api/resource_helpers.go to subpackages

First two commits are #44296 #44299. (unfortunately, removing these commits results in conflicts)

This PR moves resource_helpers.go to a subpackage. It's mostly a mechanic move, except that:
* i kept the methods of ResourceName and ResourceList in pkg/api/method.go

I'll send one more PR to separate api.Scheme etc. to their own package.
2017-04-13 23:18:03 -07:00
Kubernetes Submit Queue 9ef911edec Merge pull request #44026 from nikinath/precision-json
Automatic merge from submit-queue (batch tested with PRs 44424, 44026, 43939, 44386, 42914)

Preserve int data when unmarshalling for TPR

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

The Go json package converts all numbers to float64 while unmarshalling.
This exposes many of the int64 fields to corruption when marshalled back to json.

The json package provided by kubernetes also provides a way to defer conversion of numbers
(https://golang.org/pkg/encoding/json/#Decoder.UseNumber) and does the conversions to int or float.

This is also implemented in the custom json package. See:
(https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/json/json.go)

Now, the number is preserved as an integer till the highest int64 number - `9223372036854775807`.

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

**Special notes for your reviewer**: See also https://github.com/kubernetes/kubernetes/pull/16964

**Release note**:

```
NONE
```
2017-04-13 22:07:05 -07:00
Chao Xu 9837a98564 move resource_helpers.go to a subpackage 2017-04-13 12:03:42 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Kubernetes Submit Queue 67f2a7cc00 Merge pull request #43888 from liggitt/unsecured-port-user
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

Avoid nil user special-casing in unsecured endpoint

The unsecured handler currently adds no `user.Info` to the request context.  That means that anything that tries to authorize actions in the API server currently has to special case nil users to ensure the unsecured localhost endpoint remains capable of performing all actions. 

This PR changes the unsecured localhost endpoint to be treated as a privileged user internally, so that no special casing is required by code inside the authentication layer

I'm not particularly attached to the username. It doesn't bother me for it to have a slightly uncomfortable sounding name.
2017-04-11 12:18:24 -07:00
deads2k 04460c8750 remove objectmetafor 2017-04-10 15:13:35 -04:00
Nikhita Raghunath eb88c4bce4 Preserve int data when unmarshalling for TPR
The Go json package converts all numbers to float64.
This exposes many of the int64 fields to corruption when marshalled back to json.

The json package provided by kubernetes also provides a way to defer conversion of numbers
(https://golang.org/pkg/encoding/json/#Decoder.UseNumber) and does the conversions to int or float.

This is also implemented in the custom json package. See:
(https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/json/json.go)

Fixes #30213

Update bazel build and add one more test case

Fix for gofmt error
2017-04-05 19:48:56 +05:30
Kubernetes Submit Queue 879f8e0c9c Merge pull request #42182 from spxtr/fatalunit
Automatic merge from submit-queue

Change an Errorf to a Fatalf to prevent a panic.

In #37982 we see that if this error is hit then we will panic on the next line. Lets use `Fatalf` where appropriate :)

This does *not* fix the flake, since that's caused by the test assuming that a particular port is free.
2017-04-04 12:14:21 -07:00
Jordan Liggitt 5d839d0d0b
Avoid nil user special-casing in unsecured endpoint 2017-03-31 13:28:59 -04:00
Kubernetes Submit Queue 91c03b0e8f Merge pull request #43813 from liggitt/conditional-post-start-hook
Automatic merge from submit-queue

Make RBAC post-start hook conditional on RBAC authorizer being used

Makes the RBAC post-start hook (and reconciliation) conditional on the RBAC authorizer being used

Ensures we don't set up unnecessary objects.

```release-note
RBAC role and rolebinding auto-reconciliation is now performed only when the RBAC authorization mode is enabled.
```
2017-03-31 05:51:49 -07:00
Kubernetes Submit Queue 223ac9f8b0 Merge pull request #43260 from thockin/nodeport-allocation-rand-seed
Automatic merge from submit-queue (batch tested with PRs 42379, 42668, 42876, 41473, 43260)

Don't use global rand for nodeport and IP allocs

Seed it at construction.
2017-03-30 23:36:30 -07:00
Jordan Liggitt 890894ac4f
Disable RBAC post-start hook if not using the RBAC authorizer 2017-03-30 23:30:04 -04:00
Kubernetes Submit Queue f14618a56b Merge pull request #43622 from deads2k/cli-10-category
Automatic merge from submit-queue (batch tested with PRs 42087, 43383, 43622)

move category expansion out of restmapper

RESTMapping isn't related to CategoryExpansion (the bit that expands "all" into items to be RESTMapped).  This provides that separation and simplifies the RESTMapper interface.

@kubernetes/sig-cli-pr-reviews
2017-03-27 16:08:20 -07:00
deads2k 8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
Kubernetes Submit Queue 599929657f Merge pull request #42482 from CaoShuFeng/trvial_fix
Automatic merge from submit-queue

remove extra function call

We have read user info from context in previous line. No need to call
this function again.

**Special notes for your reviewer**:

**Release note**:

```NONE
```
2017-03-27 07:06:23 -07:00
Kubernetes Submit Queue ba63cb4538 Merge pull request #42903 from krousey/owners
Automatic merge from submit-queue

Remove krousey from some OWNERS files
2017-03-24 10:26:40 -07:00
Janet Kuo f780f32c1e Use Semantic.DeepEqual to compare DaemonSet template on updates 2017-03-20 13:58:49 -07:00
Tim Hockin 348f7a7036 Don't use global rand for nodeport and IP allocs
Seed it at contruction.
2017-03-16 17:25:07 -07:00
Tim Hockin cb95c479cb Fix polarity of a test in NodePort allocation
The result of this was that an update to a Service would release the
NodePort temporarily (the repair loop would fix it in a minute).  During
that window, another Service could get allocated that Port.
2017-03-16 17:19:26 -07:00
Kris ee4227f4bf Remove krousey from some OWNERS files 2017-03-10 11:12:29 -08:00
Hemant Kumar 12d6b87894 Validation PVs for mount options
We are going to move the validation in its own package
and we will be calling validation for individual volume types
as needed.
2017-03-09 18:24:37 -05:00
Kubernetes Submit Queue 55c436fde7 Merge pull request #42652 from liggitt/ctx-namespace
Automatic merge from submit-queue

Use namespace from context

Fixes #42653

Updates rbac_test.go to submit objects without namespaces set, which matches how actual objects are submitted to the API.
2017-03-08 10:52:27 -08:00
Kubernetes Submit Queue d306acca86 Merge pull request #42175 from enisoc/controller-ref-dep
Automatic merge from submit-queue

Deployment: Fully Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings Deployment into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that Deployment does not fight with other controllers over control of Pods and ReplicaSets.

Ref: https://github.com/kubernetes/kubernetes/issues/24433

**Special notes for your reviewer**:

**Release note**:

```release-note
Deployment now fully respects ControllerRef to avoid fighting over Pods and ReplicaSets. At the time of upgrade, **you must not have Deployments with selectors that overlap**, or else [ownership of ReplicaSets may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading).
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-07 20:44:36 -08:00
Anthony Yeh 2217363845 DaemonSet: Set DefaultGarbageCollectionPolicy to OrphanDependents.
Now that DaemonSet adds ControllerRef to Pods it creates,
we need to set this default so legacy behavior is maintained.
2017-03-07 16:42:28 -08:00
Jordan Liggitt 7f4e5c5676
Use namespace from context 2017-03-07 14:02:13 -05:00
Kubernetes Submit Queue ed04316828 Merge pull request #41890 from soltysh/issue37166
Automatic merge from submit-queue (batch tested with PRs 41890, 42593, 42633, 42626, 42609)

Remove everything that is not new from batch/v2alpha1

Fixes #37166.

@lavalamp you've asked for it 
@erictune this is a prereq for moving CronJobs to beta. I initially planned to put all in one PR, but after I did that I figured out it'll be easier to review separately. ptal 

@kubernetes/api-approvers @kubernetes/sig-api-machinery-pr-reviews ptal
2017-03-07 08:10:38 -08:00
Anthony Yeh cec3899b96 Deployment: Remove Overlap and SelectorUpdate annotations.
These are not used anymore since ControllerRef now protects against
fighting between controllers with overlapping selectors.
2017-03-06 15:12:08 -08:00
Anthony Yeh cfd8a389b7 StatefulSet: Set DefaultGarbageCollectionPolicy to OrphanDependents.
Now that StatefulSet adds ControllerRef to Pods it creates,
we need to set this default so legacy behavior is maintained.
2017-03-06 09:46:03 -08:00
Maciej Szulik 7cba9d9c92 Issue 37166: remove everything from batch/v2alpha1 that is not new 2017-03-06 12:12:38 +01:00
Cao Shufeng 63346d979c remove extra function call
We have read user info from context in previous line. No need to call
this function again.
2017-03-03 08:41:03 -05:00
Jan Safranek c535c3e20b Regenerate everything 2017-03-02 08:56:26 +01:00
Jan Safranek 584b57b8b4 Add storage.k8s.io/v1 2017-03-02 08:55:25 +01:00
Kubernetes Submit Queue 47f63acf23 Merge pull request #41931 from jessfraz/pip
Automatic merge from submit-queue (batch tested with PRs 41931, 39821, 41841, 42197, 42195)

Admission Controller: Add Pod Preset

Based off the proposal in https://github.com/kubernetes/community/pull/254

cc @pmorie @pwittrock 

TODO:
- [ ] tests



**What this PR does / why we need it**: Implements the Pod Injection Policy admission controller

**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
Added new Api `PodPreset` to enable defining cross-cutting injection of Volumes and Environment into Pods.
```
2017-03-01 20:07:54 -08:00
Kubernetes Submit Queue 01bfbb5fa0 Merge pull request #42259 from deads2k/rbac-07-reconcile-binding
Automatic merge from submit-queue

Add RBAC roles for bootstrap controllers

Supercedes https://github.com/kubernetes/kubernetes/pull/42221

When locking down controllers to individual RBAC roles we need to make sure that the bootstrap controllers have the right permissions.

This adds the roles and bindings at the correct namespace scopes for the bootstrap-signer and token-cleaner controllers.

@liggitt ptal
@jbeda @luxas you got a good way to test this?  It must not be covered in normal e2e or we'd've seen the issue before.
2017-03-01 16:57:51 -08:00
Jess Frazelle 9b5d1af3ca
run generators and updaters
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:04:29 -08:00
Jess Frazelle fe84363ce2
Add settings API and admission controller
export functions from pkg/api/validation

add settings API

add settings to pkg/registry

add settings api to pkg/master/master.go

add admission control plugin for pod preset

add new admission control plugin to kube-apiserver

add settings to import_known_versions.go

add settings to codegen

add validation tests

add settings to client generation

add protobufs generation for settings api

update linted packages

add settings to testapi

add settings install to clientset

add start of e2e

add pod preset plugin to config-test.sh

Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:04:28 -08:00
Maciej Szulik 6173c4bbab Generated changes for apps/v1beta1.deployments 2017-03-01 15:14:41 +01:00
Maciej Szulik c272630b1b Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
Chao Xu 5bfacf59f6 API 2017-02-28 23:05:40 -08:00
deads2k e24b1c0c25 add namespaced role bindings 2017-02-28 13:04:23 -05:00
deads2k a849df9dff allow reconcilation of namespaced rolebindings 2017-02-28 12:58:29 -05:00
Kubernetes Submit Queue c743897f1f Merge pull request #42186 from liggitt/wait-for-etcd
Automatic merge from submit-queue (batch tested with PRs 41234, 42186, 41615, 42028, 41788)

Restore wait for etcd in rbac initialization

Wait for etcd was accidentally removed in 26b42d350d (diff-efb2aa0040291a41fcf922efc886ea13L136)

Related to https://github.com/kubernetes/kubernetes/issues/37704 and https://github.com/kubernetes/kubernetes/pull/39821
2017-02-28 00:34:03 -08:00
Vishnu kannan 9a65640789 fix go vet issues
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-27 21:24:45 -08:00
Jordan Liggitt 4127322f23
Restore wait for etcd in rbac initialization 2017-02-27 15:09:47 -05:00
spxtr 824f466f17 Change an Errorf to a Fatalf to prevent a panic. 2017-02-27 10:50:03 -08:00
Łukasz Oleś 620310c12f Move TemplateGeneration to the Spec 2017-02-27 09:15:56 +01:00
Łukasz Oleś b27308c317 DaemonSet updates
It implements https://github.com/kubernetes/community/blob/master/contributors/design-proposals/daemonset-update.md
Feature https://github.com/kubernetes/features/issues/124
2017-02-27 09:15:56 +01:00
Kubernetes Submit Queue 945b041fab Merge pull request #41165 from nikhiljindal/del202
Automatic merge from submit-queue (batch tested with PRs 41954, 40528, 41875, 41165, 41877)

Updating apiserver to return 202 when resource is being deleted asynchronously via cascading deletion

As per https://github.com/kubernetes/kubernetes/issues/33196#issuecomment-278440622.

cc @kubernetes/sig-api-machinery-pr-reviews @smarterclayton @caesarxuchao @bgrant0607 @kubernetes/api-reviewers 

```release-note
Updating apiserver to return http status code 202 for a delete request when the resource is not immediately deleted because of user requesting cascading deletion using DeleteOptions.OrphanDependents=false.
```
2017-02-26 14:54:54 -08:00
Kubernetes Submit Queue 452420484c Merge pull request #41982 from deads2k/agg-18-ca-permissions
Automatic merge from submit-queue

Add namespaced role to inspect particular configmap for delegated authentication

Builds on https://github.com/kubernetes/kubernetes/pull/41814 and https://github.com/kubernetes/kubernetes/pull/41922 (those are already lgtm'ed) with the ultimate goal of making an extension API server zero-config for "normal" authentication cases.

This part creates a namespace role in `kube-system` that can *only* look the configmap which gives the delegated authentication check.  When a cluster-admin grants the SA running the extension API server the power to run delegated authentication checks, he should also bind this role in this namespace.

@sttts Should we add a flag to aggregated API servers to indicate they want to look this up so they can crashloop on startup?  The alternative is sometimes having it and sometimes not.  I guess we could try to key on explicit "disable front-proxy" which may make more sense.

@kubernetes/sig-api-machinery-misc 

@ncdc I spoke to @liggitt about this before he left and he was ok in concept.  Can you take a look at the details?
2017-02-26 12:12:49 -08:00
Kubernetes Submit Queue 92c44c9d42 Merge pull request #41922 from deads2k/rbac-05-reconcile
Automatic merge from submit-queue

make reconcilation generic to handle roles and clusterroles

We have a need to reconcile regular roles, so this pull moves the reconciliation code to use interfaces (still tightly coupled) rather than structs.

@liggitt @kubernetes/sig-auth-pr-reviews
2017-02-26 10:17:34 -08:00
Jordan Liggitt 41c88e0455
Revert "Merge pull request #40088 from jsafrane/storage-ga-v1"
This reverts commit 5984607cb9, reversing
changes made to 067f92e789.
2017-02-25 22:35:15 -05:00
Jan Safranek 3e7d6067da Install storage v1 API 2017-02-24 13:52:15 +01:00
deads2k d5cd40a585 reconcile namespace roles during startup 2017-02-23 11:45:49 -05:00
deads2k 06f5de9d84 make reconcilation generic to handle roles and clusterroles 2017-02-23 08:24:59 -05:00
nikhiljindal 4ee81eb037 Updating tests for deleted boolean from Delete() 2017-02-21 11:00:36 -08:00
nikhiljindal 1d32897eed Updating the registry to return whether the resource was immediately deleted 2017-02-21 11:00:35 -08:00
Jordan Liggitt beb291d6d2
Include all user.Info data in CSR object 2017-02-20 16:20:57 -05:00
Kubernetes Submit Queue fbc94c0896 Merge pull request #41343 from p0lyn0mial/kubectl_get_short_names_from_discovery_api
Automatic merge from submit-queue

shortcut expander will take the list of short names from the api ser…

**What this PR does / why we need it**: the shortcut expander will take the list of short names for resources from the API server during the discovery. For backward compatibility a hardcoded list of short names will always be appended while evaluating a short name.
2017-02-15 09:07:51 -08:00
Dr. Stefan Schimanski 0e9c1f75bf Update bazel 2017-02-15 10:25:15 +01:00