Commit Graph

1309 Commits (27d096d27d60d32c1978e08db82f28da17333405)

Author SHA1 Message Date
Kubernetes Submit Queue 9705bb728e Merge pull request #38747 from yarntime/fix_typo_registers
Automatic merge from submit-queue (batch tested with PRs 38648, 38747)

fix typo

**What this PR does / why we need it**:
    fix typo.

**Release note**:

```NONE
```
2016-12-14 03:49:47 -08:00
Kubernetes Submit Queue f8c5d2c47a Merge pull request #37090 from humblec/iscsi-nodiskconf
Automatic merge from submit-queue (batch tested with PRs 35436, 37090, 38700)

Make iscsi pv/pvc aware of nodiskconflict feature

Being iscsi a `RWO, ROX` volume we should conflict if more than one pod is using same iscsi LUN.  

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-13 12:36:34 -08:00
Humble Chirammal 28088159c3 Make iscsi pv claim aware of nodiskconflict feature.
Being ISCSI a RWO/ROX volumes it should inherit nodiskconflict feature.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-13 10:07:09 +05:30
Kubernetes Submit Queue 65238bc390 Merge pull request #38572 from hongchaodeng/sr
Automatic merge from submit-queue (batch tested with PRs 38315, 38624, 38572, 38544)

scheduler: refactor main entry Run()

The kube-scheduler/app.Run() is the main entry of scheduler program.
It's enormous.
This PR tries to clean it up. Should be more modular and readable.
2016-12-12 19:42:35 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Hongchao Deng bcd3aac291 bazel update 2016-12-12 13:23:17 -08:00
Hongchao Deng a565648761 scheduler: refactor main entry Run() 2016-12-12 13:23:17 -08:00
Kubernetes Submit Queue b5cf713bc7 Merge pull request #38108 from hodovska/1396877-pvc-limitrange-max
Automatic merge from submit-queue (batch tested with PRs 37846, 38619, 38108)

LimitRange: modified approach for PVC max storage request enforcing

Behavior was correct but with not correct error messages. This pull request creates separate approach for enforcing the max request for persistent volume claim.

Additional info:
https://github.com/kubernetes/kubernetes/blob/master/docs/design/admission_control_limit_range.md#enforcement-of-constraints

bugzilla : https://bugzilla.redhat.com/show_bug.cgi?id=1396877
2016-12-12 10:30:07 -08:00
deads2k 4aeb3f3ffe update pod RBAC roles to work against head 2016-12-12 08:55:47 -05:00
yarntime@163.com 80e37cc04a fix typo 2016-12-12 13:49:09 +08:00
Hongchao Deng 479f507532 scheduler test: fix test due to nil pod assumption 2016-12-11 20:46:38 -08:00
Hongchao Deng a2426bd48a generic_scheduler: Schedule() pod param should never be nil 2016-12-11 19:30:48 -08:00
Clayton Coleman c52d510a24
refactor: generated 2016-12-10 18:05:53 -05:00
Clayton Coleman 3c72ee2189
Change references to OwnerReference 2016-12-10 18:05:36 -05:00
Kubernetes Submit Queue e732ee70f4 Merge pull request #38406 from liggitt/remove-internal-json-annotations
Automatic merge from submit-queue

Remove json serialization annotations from internal types

fixes #3933

Internal types should never be serialized, and including json serialization tags on them makes it possible to accidentally do that without realizing it.

fixes in this PR:

* types
  * [x] remove json tags from internal types
  * [x] fix references from serialized types to internal ObjectMeta
* generation
  * [x] remove generated json codecs for internal types (they should never be used)
* kubectl
  * [x] fix `apply` to operate on versioned object
  * [x] fix sorting by field to operate on versioned object
  * [x] fix `--record` to build annotation patch using versioned object
* hpa
  * [x] fix unmarshaling to internal CustomMetricTargetList in validation
* thirdpartyresources
  * [x] fix encoding API responses using internal ObjectMeta
* tests
  * [x] fix tests to use versioned objects when checking encoded content
  * [x] fix tests passing internal objects to generic printers

follow ups (will open tracking issues or additional PRs):
- [ ] remove json tags from internal kubeconfig types (`kubectl config set` pathfinding needs to work against external type)
- [ ] HPA should version CustomMetricTargetList serialization in annotations
- [ ] revisit how TPR resthandlers encoding objects
- [ ] audit and add tests for printer use (human-readable printer requires internal versions, generic printers require external versions)
- [ ] add static analysis tests preventing new internal types from adding tags
- [ ] add static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- [ ] add more tests for `kubectl get` exercising known and unknown types with all output options
2016-12-10 14:00:17 -08:00
Jordan Liggitt d5afb71cf4
Remove json serialization annotations from internal types 2016-12-09 16:26:03 -05:00
Derek Carr 459a7a05f1 Ability to quota storage by storage class 2016-12-09 13:26:59 -05:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Jordan Liggitt 6819706adf
Pass addressable values to DeepCopy 2016-12-08 14:16:01 -05:00
Kubernetes Submit Queue f2f107124b Merge pull request #37691 from dshulyak/term_selector
Automatic merge from submit-queue (batch tested with PRs 38377, 36365, 36648, 37691, 38339)

Do not create selector and namespaces in a loop where possible

With 1000 nodes and 5000 pods (5 pods per node) with anti-affinity a lot of CPU wasted on creating LabelSelector and sets.String (map). 

With this change we are able to deploy that number of pods in ~25 minutes. Without - it takes 30 minutes to deploy 500 pods with anti-affinity configured.
2016-12-08 10:52:01 -08:00
Kubernetes Submit Queue ae1a7784af Merge pull request #38261 from tanshanshan/more-readable
Automatic merge from submit-queue (batch tested with PRs 37701, 36702, 37145, 37424, 38261)

replace err with nil when err is nil

<!--  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**:

When err is nil ,replace err with nil, that can make code more readable

Thanks.
**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-12-08 04:39:26 -08:00
Kubernetes Submit Queue 6484efbc2f Merge pull request #37369 from yarntime/fix_typo_in_predicates
Automatic merge from submit-queue (batch tested with PRs 35884, 37305, 37369, 37429, 35679)

fix typo in predicates
2016-12-08 03:55:15 -08:00
Dmitry Shulyak 55b413f504 Do not create selector and namespaces in a loop where possible
Change-Id: Ib8e62df92a3ea6b8ee6b90cb0b73af71332481d7
2016-12-08 13:04:38 +02:00
Kubernetes Submit Queue 473e830873 Merge pull request #35101 from xilabao/auth-duplicate-detect
Automatic merge from submit-queue (batch tested with PRs 35101, 38215, 38092)

auth duplicate detect

I think we should not allow people set duplicate tokens in token file or set duplicate usernames in password file. because the default action overwriting the old data may let people misunderstand.
2016-12-07 07:27:13 -08:00
Kubernetes Submit Queue 28df1d948f Merge pull request #36568 from xilabao/add-label-to-rbac-bootstrap-policy
Automatic merge from submit-queue

add default label to rbac bootstrap policy

allow people to retrieve information of bootstrap policy by label :

`kubectl get clusterroles -l key=value` 
`kubectl get clusterrolebindings -l key=value`
2016-12-07 06:13:47 -08:00
Kubernetes Submit Queue 1b5666fc35 Merge pull request #35275 from wojtek-t/cache_conditions
Automatic merge from submit-queue

Cache additional information in schedulercache.NodeInfo to speedup scheduler

Ref #35117
2016-12-07 02:23:19 -08:00
tanshanshan c24dbf062e more readable 2016-12-07 11:35:50 +08:00
xilabao 1d475edd1c add default label <kubernetes.io/bootstrapping=rbac-defaults> to rbac bootstrap policy 2016-12-07 09:08:34 +08:00
xilabao 79b525e5a4 auth duplicate detect, add warning message 2016-12-07 09:06:39 +08:00
Kubernetes Submit Queue f299a0010a Merge pull request #37558 from jayunit100/scheduler_log_spam
Automatic merge from submit-queue (batch tested with PRs 38076, 38137, 36882, 37634, 37558)

[scheduler] Use V(10) for anything which may be O(N*P) logging

Fixes #37014

This PR makes sure that logging statements which are capable of being called on a perNode / perPod basis (i.e. non essential ones that will just clog up logs at large scale) are at V(10) level.

I dreamt of a levenstein filter that built a weak map of word frequencies and alerted once log throughput increased w/o varying information content....  but then I woke up and realized this is probably all we really need for now :)
2016-12-05 19:25:57 -08:00
Kubernetes Submit Queue 2c61d2f80c Merge pull request #38121 from deads2k/auth-09-remove-rbac-super
Automatic merge from submit-queue (batch tested with PRs 38111, 38121)

remove rbac super user

Cleaning up cruft and duplicated capabilities as we transition from RBAC alpha to beta.  In 1.5, we added a secured loopback connection based on the `system:masters` group name.  `system:masters` have full power in the API, so the RBAC super user is superfluous.

The flag will stay in place so that the process can still launch, but it will be disconnected.

@kubernetes/sig-auth
2016-12-05 14:14:41 -08:00
deads2k 2923d09091 remove rbac super user 2016-12-05 13:49:54 -05:00
Jordan Liggitt 8553a8b867
Check in YAML versions of bootstrap roles/rolebindings 2016-12-05 12:03:55 -05:00
Dominika Hodovska 755f58702d LimitRange: modified approach for PVC max storage request validation 2016-12-05 15:02:16 +01:00
AdoHe eef143ba39 scheduler remove init method 2016-12-05 06:22:50 -05: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 b1a3f3794a Merge pull request #35300 from deads2k/rbac-17-subjectlocator
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

add rbac action to subjects type

This adds the ability to go from an authorization action to the list subjects who have the power to perform the action.  This will be used to either back an RBAC specific endpoint or generic authorization endpoint.  Because of the way authorization works today, the set of subjects returned will always be a subset of those with access since any authorizer can say yes.

@kubernetes/sig-auth
2016-12-03 08:55:54 -08:00
Kubernetes Submit Queue f91966e634 Merge pull request #37391 from deads2k/controller-03-roles
Automatic merge from submit-queue (batch tested with PRs 37945, 37498, 37391, 37209, 37169)

add controller roles

Upstream controller roles that have downstream.

@sttts this is a start at roles for controllers.  I've made names match for now, but they could use some love in both the controller manager and here.  I'd recommend using this as a starting point.
2016-12-02 20:32:46 -08:00
Kubernetes Submit Queue 4bc6e717ed Merge pull request #37357 from gmarek/profilinig
Automatic merge from submit-queue (batch tested with PRs 36263, 36755, 37357, 37222, 37524)

Add flag to enable contention profiling in scheduler.

```release-note
Add flag to enable contention profiling in scheduler.
```
2016-12-02 16:26:47 -08:00
Kubernetes Submit Queue 4c50486735 Merge pull request #37020 from deads2k/rbac-20-delegated-role
Automatic merge from submit-queue

auth delegation role

Add a bootstrap role for authentication and authorization delegation.  Useful for extension API servers.

@kubernetes/sig-auth
2016-12-01 06:31:31 -08:00
deads2k c4e2e19e51 allow auth proxy to set groups and extra 2016-12-01 09:00:30 -05:00
gmarek cd2cceb364 Minor scheduler cleanup 2016-11-30 09:35:25 +01:00
Kubernetes Submit Queue a894bde225 Merge pull request #37379 from wojtek-t/safe_schedulercache
Automatic merge from submit-queue

Try self-repair scheduler cache or panic

Fix #37232
2016-11-29 08:15:03 -08:00
Wojciech Tyczynski f5ced35887 Log when pod expires in scheduler 2016-11-29 12:03:29 +01:00
jayunit100 7c94c51860 [scheduler] Use V(10) for anything which may be O(N*P) logging 2016-11-28 10:31:49 -05:00
deads2k a786892d77 add controller roles 2016-11-28 08:38:24 -05:00