Commit Graph

1309 Commits (27d096d27d60d32c1978e08db82f28da17333405)

Author SHA1 Message Date
Wojciech Tyczynski 7387bc0572 Cache node taints in scheduler NodeInfo 2016-11-24 16:54:06 +01:00
Wojciech Tyczynski be2bb39964 Cache node conditions in scheduler NodeInfo 2016-11-24 16:54:05 +01:00
Wojciech Tyczynski 8f1d240f73 Try self-repair scheduler cache or panic 2016-11-24 08:36:34 +01:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu b9e3ffb515 misc 2016-11-23 15:53:09 -08:00
Chao Xu 1044aa4500 plugin/admission; including resourcequota admission 2016-11-23 15:53:09 -08:00
Chao Xu f782aba56e plugin/scheduler 2016-11-23 15:53:09 -08:00
yarntime@163.com 22e0bdcfaa fix typo in predicates 2016-11-23 18:15:17 +08:00
gmarek d8a040fee5 Add flag to enable contention profiling in scheduler. 2016-11-23 09:24:27 +01:00
Wojciech Tyczynski e4d215d508 Reduce impact of scheduler bug 2016-11-22 17:19:45 +01:00
Kubernetes Submit Queue 959ba7c992 Merge pull request #37046 from jlowdermilk/auth-comment
Automatic merge from submit-queue

Document config options for gcp auth provider plugin.

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

Adds source documentation for the gcp auth provider plugin config options. Shouldn't have to read through the code to understand what the options and their defaults are.


**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`. 
-->
none
2016-11-21 19:00:54 -08:00
Kubernetes Submit Queue a85d352de9 Merge pull request #37234 from liggitt/revert-flex_node_conditions
Automatic merge from submit-queue

Revert "Avoid hard-coding list of Node Conditions"

* we don't know how other API consumers are using node conditions (there was no prior expectation that the scheduler would block on custom conditions)
* not all conditions map directly to schedulability (e.g. `MemoryPressure`/`DiskPressure`)
* not all conditions use True to mean "unschedulable" (e.g. `Ready`)

This reverts commit 511b2ecaa8 to avoid breaking existing API users and to avoid constraining future uses of the node conditions API
2016-11-21 17:41:59 -08:00
Jordan Liggitt c214abb5ff
Revert "Avoid hard-coding list of Node Conditions"
This reverts commit 511b2ecaa8.
2016-11-21 14:55:11 -05:00
Jeff Lowdermilk 3766787458 Document config options for gcp auth provider plugin. 2016-11-21 10:56:39 -08:00
Harry Zhang 5554dbf907 Fix invalid predicates describe 2016-11-19 22:30:15 +08:00
deads2k 18a909edf8 auth delegation role 2016-11-17 14:42:21 -05:00
Kubernetes Submit Queue 05d067d6bb Merge pull request #36210 from justinsb/flex_node_conditions
Automatic merge from submit-queue

Avoid hard-coding list of Node Conditions
2016-11-15 01:02:01 -08:00
Kubernetes Submit Queue c9d0969d25 Merge pull request #36713 from brendandburns/lint
Automatic merge from submit-queue

Fix some lint errors.

`golint` for some reason doesn't like `make([]foo, 0)` so switch to explicit instantiation.
2016-11-14 11:41:46 -08:00
Justin Santa Barbara 511b2ecaa8 Avoid hard-coding list of Node Conditions
We assume that if a Condition isn't well-known, that it blocks
scheduling of pods, and that the "unhealthy" value is api.ConditionTrue
2016-11-14 14:25:45 -05:00
Brendan Burns 860748c08f Fix some lint errors. 2016-11-12 21:25:09 -08:00
Jeff Lowdermilk 5a6cd558c2 Fix race condition in gcp auth provider plugin 2016-11-11 16:27:36 -08:00
Kubernetes Submit Queue 526746288a Merge pull request #33080 from pweil-/psp-authorizer
Automatic merge from submit-queue

Add authz to psp admission

Add authz integration to PSP admission to enable granting access to use specific PSPs on a per-user and per-service account basis.  This allows an administrator to use multiple policies in a cluster that grant different levels of access for different types of users.

Builds on https://github.com/kubernetes/kubernetes/pull/32555.  Second commit adds authz check to matching policy function in psp admission.

@deads2k @sttts @timstclair
2016-11-09 20:39:31 -08:00
Kubernetes Submit Queue 6ea9ff68c8 Merge pull request #36155 from deads2k/rbac-20-node-role
Automatic merge from submit-queue

add nodes role to RBAC bootstrap policy

Add a nodes role.  

@sttts @pweil-
2016-11-09 14:10:20 -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
pweil- bbe9c8f96d add authz checks to allowed policies admission 2016-11-08 08:36:27 -05:00
deads2k 252d8b7066 add rbac action to subjects type 2016-11-08 07:47:11 -05:00
Kubernetes Submit Queue 402f1fa33e Merge pull request #35487 from miaoyq/remove-two-redundant-funcs
Automatic merge from submit-queue

'Max' and 'MIn' don't seem to used anywhere, so I would suggest removing them

Signed-off-by: Yanqiang Miao miao.yanqiang@zte.com.cn
2016-11-08 02:52:46 -08:00
Kubernetes Submit Queue 1866e1862e Merge pull request #36021 from soltysh/cronjobs
Automatic merge from submit-queue

Rename ScheduledJobs to CronJobs

I went with @smarterclayton idea of registering named types in schema. This way we can support both the new (CronJobs) and old (ScheduledJobs) resource name. Fixes #32150.

fyi @erictune @caesarxuchao @janetkuo 

Not ready yet, but getting close there...

**Release note**:
```release-note
Rename ScheduledJobs to CronJobs.
```
2016-11-07 07:12:17 -08:00
Kubernetes Submit Queue 5dd346ab75 Merge pull request #34693 from yarntime/add_pod_affinity_test_cases
Automatic merge from submit-queue

add podAntiAffinity test cases

add podAntiAffinity test cases.
2016-11-07 01:37:22 -08:00
Maciej Szulik 0b5ef16008 Support ScheduledJob name 2016-11-07 10:14:12 +01:00
Maciej Szulik 41d88d30dd Rename ScheduledJob to CronJob 2016-11-07 10:14:12 +01:00
Kubernetes Submit Queue f715b26d9c Merge pull request #35932 from jayunit100/sched_events_spam_reduce
Automatic merge from submit-queue

Reduce spam in Events from scheduler by counter aggregation of failure

Fixes #35842
Part of overall #35555
2016-11-06 17:48:31 -08:00
Kubernetes Submit Queue 4b1e36f970 Merge pull request #36190 from dashpole/revert_node_inode_pressure_split
Automatic merge from submit-queue

We only report diskpressure to users, and no longer report inodepressure

See #36180 for more information on why #33218 was reverted.
2016-11-06 03:00:34 -08:00
Kubernetes Submit Queue 741ef71fa9 Merge pull request #36012 from jlowdermilk/cmd-auth-provider
Automatic merge from submit-queue

Add cmd support to gcp auth provider plugin

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

Adds ability for gcp auth provider plugin to get access token by shelling out to an external command. We need this because for GKE, kubectl should be using gcloud credentials. It currently uses google application default credentials, which causes confusion if user has configured both with different permissions (previously the two were almost always identical).

**Which issue this PR fixes**:
Addresses #35530 with gcp-only solution, as generic cmd plugin was deemed not useful for other providers.

**Special notes for your reviewer**:

Configuration options are to support whatever future command gcloud provides for printing access token of active user. Also works with existing command (`gcloud auth print-access-token`)

```release-note
```
2016-11-06 01:45:48 -08:00
Kubernetes Submit Queue f4738ff575 Merge pull request #35883 from justinsb/aws_strong_volumetype
Automatic merge from submit-queue

AWS: strong-typing for k8s vs aws volume ids
2016-11-05 02:29:17 -07:00
David Ashpole 9aca40dee6 revert #33218. dont need #36180. We only use diskpressure 2016-11-04 08:29:27 -07:00
Di Xu dd6c980949 specify custom ca file to verify the keystone server 2016-11-04 15:11:41 +08:00
jayunit100 5d5bc6759e Reduce spam in Events from scheduler by counter aggregation of failure
reasons.
2016-11-03 13:53:35 -04:00
deads2k df2492f714 add nodes role to RBAC bootstrap policy 2016-11-03 08:30:50 -04:00
gmarek 3971553298 Scheduler Reduce function can use nodeNameToNodeInfo map 2016-11-03 10:07:05 +01:00
Jeff Lowdermilk 283bb31ada Add cmd support to gcp auth provider plugin 2016-11-02 13:57:30 -07:00
gmarek c80d308128 Scheduler Reduce functions can use PriorityMetadata 2016-11-02 16:33:22 +01:00
Justin Santa Barbara 3cdbfc98af AWS: strong-typing for k8s vs aws volume ids
We are more liberal in what we accept as a volume id in k8s, and indeed
we ourselves generate names that look like `aws://<zone>/<id>` for
dynamic volumes.

This volume id (hereafter a KubernetesVolumeID) cannot directly be
compared to an AWS volume ID (hereafter an awsVolumeID).

We introduce types for each, to prevent accidental comparison or
confusion.

Issue #35746
2016-11-02 09:42:55 -04:00
Kubernetes Submit Queue 8c90bc35e2 Merge pull request #35612 from gmarek/scheduler2
Automatic merge from submit-queue

split scheduler priorities into separate files

In the current state it's really hard to find a thing one is looking for, if he doesn't know already know where to look. cc @davidopp
2016-11-02 05:26:55 -07:00
Kubernetes Submit Queue 1fa8369074 Merge pull request #35639 from ncdc/lister-gen
Automatic merge from submit-queue

Add tooling to generate listers

Add lister-gen tool to auto-generate listers. So far this PR only demonstrates replacing the manually-written `StoreToLimitRangeLister` with the generated `LimitRangeLister`, as it's a small and easy swap.

cc @deads2k @liggitt @sttts @nikhiljindal @lavalamp @smarterclayton @derekwaynecarr  @kubernetes/sig-api-machinery @kubernetes/rh-cluster-infra
2016-11-01 09:29:06 -07:00
Kubernetes Submit Queue 3a2ae34ea9 Merge pull request #35608 from soltysh/pdb_admission
Automatic merge from submit-queue

Update PodAntiAffinity to ignore calls to subresources

@smarterclayton I hit this when I was trying to evict a pod, apparently k8s does not have this particular admission plugin on by default. ptal

@mml @davidopp fyi
2016-10-31 20:58:33 -07:00
derekwaynecarr 1bcb057636 quota controller uses informers if available for pod calculation 2016-10-31 11:38:22 -04:00
Andy Goldstein 13abf36c60 Update bazel build files 2016-10-31 11:13:44 -04:00
Andy Goldstein 5ab385480b Convert StoreToLimitRangeLister to LimitRangeLister 2016-10-31 11:13:44 -04:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -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
Kubernetes Submit Queue 9a219eb803 Merge pull request #34651 from smarterclayton/negotiate
Automatic merge from submit-queue

Simplify negotiation in server in preparation for multi version support

This is a pre-factor for #33900 to simplify runtime.NegotiatedSerializer, tighten up a few abstractions that may break when clients can request different client versions, and pave the way for better negotiation.

View this as pure simplification.
2016-10-29 03:32:02 -07:00
Kubernetes Submit Queue 58457daf63 Merge pull request #31652 from intelsdi-x/poc-opaque-int-resources
Automatic merge from submit-queue

[PHASE 1] Opaque integer resource accounting.

## [PHASE 1] Opaque integer resource accounting.

This change provides a simple way to advertise some amount of arbitrary countable resource for a node in a Kubernetes cluster. Users can consume these resources by including them in pod specs, and the scheduler takes them into account when placing pods on nodes. See the example at the bottom of the PR description for more info.

Summary of changes:

- Defines opaque integer resources as any resource with prefix `pod.alpha.kubernetes.io/opaque-int-resource-`.
- Prevent kubelet from overwriting capacity.
- Handle opaque resources in scheduler.
- Validate integer-ness of opaque int quantities in API server.
- Tests for above.

Feature issue: https://github.com/kubernetes/features/issues/76

Design: http://goo.gl/IoKYP1

Issues:

kubernetes/kubernetes#28312
kubernetes/kubernetes#19082

Related:

kubernetes/kubernetes#19080

CC @davidopp @timothysc @balajismaniam 

**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
Added support for accounting opaque integer resources.

Allows cluster operators to advertise new node-level resources that would be
otherwise unknown to Kubernetes. Users can consume these resources in pod
specs just like CPU and memory. The scheduler takes care of the resource
accounting so that no more than the available amount is simultaneously
allocated to pods.
```

## Usage example

```sh
$ echo '[{"op": "add", "path": "pod.alpha.kubernetes.io~1opaque-int-resource-bananas", "value": "555"}]' | \
> http PATCH http://localhost:8080/api/v1/nodes/localhost.localdomain/status \
> Content-Type:application/json-patch+json
```

```http
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 11 Aug 2016 16:44:55 GMT
Transfer-Encoding: chunked

{
    "apiVersion": "v1",
    "kind": "Node",
    "metadata": {
        "annotations": {
            "volumes.kubernetes.io/controller-managed-attach-detach": "true"
        },
        "creationTimestamp": "2016-07-12T04:07:43Z",
        "labels": {
            "beta.kubernetes.io/arch": "amd64",
            "beta.kubernetes.io/os": "linux",
            "kubernetes.io/hostname": "localhost.localdomain"
        },
        "name": "localhost.localdomain",
        "resourceVersion": "12837",
        "selfLink": "/api/v1/nodes/localhost.localdomain/status",
        "uid": "2ee9ea1c-47e6-11e6-9fb4-525400659b2e"
    },
    "spec": {
        "externalID": "localhost.localdomain"
    },
    "status": {
        "addresses": [
            {
                "address": "10.0.2.15",
                "type": "LegacyHostIP"
            },
            {
                "address": "10.0.2.15",
                "type": "InternalIP"
            }
        ],
        "allocatable": {
            "alpha.kubernetes.io/nvidia-gpu": "0",
            "cpu": "2",
            "memory": "8175808Ki",
            "pods": "110"
        },
        "capacity": {
            "alpha.kubernetes.io/nvidia-gpu": "0",
            "pod.alpha.kubernetes.io/opaque-int-resource-bananas": "555",
            "cpu": "2",
            "memory": "8175808Ki",
            "pods": "110"
        },
        "conditions": [
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-07-12T04:07:43Z",
                "message": "kubelet has sufficient disk space available",
                "reason": "KubeletHasSufficientDisk",
                "status": "False",
                "type": "OutOfDisk"
            },
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-07-12T04:07:43Z",
                "message": "kubelet has sufficient memory available",
                "reason": "KubeletHasSufficientMemory",
                "status": "False",
                "type": "MemoryPressure"
            },
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-08-10T06:27:11Z",
                "message": "kubelet is posting ready status",
                "reason": "KubeletReady",
                "status": "True",
                "type": "Ready"
            },
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-08-10T06:27:01Z",
                "message": "kubelet has no disk pressure",
                "reason": "KubeletHasNoDiskPressure",
                "status": "False",
                "type": "DiskPressure"
            }
        ],
        "daemonEndpoints": {
            "kubeletEndpoint": {
                "Port": 10250
            }
        },
        "images": [],
        "nodeInfo": {
            "architecture": "amd64",
            "bootID": "1f7e95ca-a4c2-490e-8ca2-6621ae1eb5f0",
            "containerRuntimeVersion": "docker://1.10.3",
            "kernelVersion": "4.5.7-202.fc23.x86_64",
            "kubeProxyVersion": "v1.3.0-alpha.4.4285+7e4b86c96110d3-dirty",
            "kubeletVersion": "v1.3.0-alpha.4.4285+7e4b86c96110d3-dirty",
            "machineID": "cac4063395254bc89d06af5d05322453",
            "operatingSystem": "linux",
            "osImage": "Fedora 23 (Cloud Edition)",
            "systemUUID": "D6EE0782-5DEB-4465-B35D-E54190C5EE96"
        }
    }
}
```

After patching, the kubelet's next sync fills in allocatable:

```
$ kubectl get node localhost.localdomain -o json | jq .status.allocatable
```

```json
{
  "alpha.kubernetes.io/nvidia-gpu": "0",
  "pod.alpha.kubernetes.io/opaque-int-resource-bananas": "555",
  "cpu": "2",
  "memory": "8175808Ki",
  "pods": "110"
}
```

Create two pods, one that needs a single banana and another that needs a truck load:

```
$ kubectl create -f chimp.yaml
$ kubectl create -f superchimp.yaml
```

Inspect the scheduler result and pod status:

```
$ kubectl describe pods chimp
Name:           chimp
Namespace:      default
Node:           localhost.localdomain/10.0.2.15
Start Time:     Thu, 11 Aug 2016 19:58:46 +0000
Labels:         <none>
Status:         Running
IP:             172.17.0.2
Controllers:    <none>
Containers:
  nginx:
    Container ID:       docker://46ff268f2f9217c59cc49f97cc4f0f085d5ac0e251f508cc08938601117c0cec
    Image:              nginx:1.10
    Image ID:           docker://sha256:82e97a2b0390a20107ab1310dea17f539ff6034438099384998fd91fc540b128
    Port:               80/TCP
    Limits:
      cpu:                                      500m
      memory:                                   64Mi
      pod.alpha.kubernetes.io/opaque-int-resource-bananas:   3
    Requests:
      cpu:                                      250m
      memory:                                   32Mi
      pod.alpha.kubernetes.io/opaque-int-resource-bananas:   1
    State:                                      Running
      Started:                                  Thu, 11 Aug 2016 19:58:51 +0000
    Ready:                                      True
    Restart Count:                              0
    Volume Mounts:                              <none>
    Environment Variables:                      <none>
Conditions:
  Type          Status
  Initialized   True 
  Ready         True 
  PodScheduled  True 
No volumes.
QoS Class:      Burstable
Events:
  FirstSeen     LastSeen        Count   From                            SubobjectPath           Type            Reason                  Message
  ---------     --------        -----   ----                            -------------           --------        ------                  -------
  9m            9m              1       {default-scheduler }                                    Normal          Scheduled               Successfully assigned chimp to localhost.localdomain
  9m            9m              2       {kubelet localhost.localdomain}                         Warning         MissingClusterDNS       kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy.
  9m            9m              1       {kubelet localhost.localdomain} spec.containers{nginx}  Normal          Pulled                  Container image "nginx:1.10" already present on machine
  9m            9m              1       {kubelet localhost.localdomain} spec.containers{nginx}  Normal          Created                 Created container with docker id 46ff268f2f92
  9m            9m              1       {kubelet localhost.localdomain} spec.containers{nginx}  Normal          Started                 Started container with docker id 46ff268f2f92
```

```
$ kubectl describe pods superchimp
Name:           superchimp
Namespace:      default
Node:           /
Labels:         <none>
Status:         Pending
IP:
Controllers:    <none>
Containers:
  nginx:
    Image:      nginx:1.10
    Port:       80/TCP
    Requests:
      cpu:                                      250m
      memory:                                   32Mi
      pod.alpha.kubernetes.io/opaque-int-resource-bananas:   10Ki
    Volume Mounts:                              <none>
    Environment Variables:                      <none>
Conditions:
  Type          Status
  PodScheduled  False 
No volumes.
QoS Class:      Burstable
Events:
  FirstSeen     LastSeen        Count   From                    SubobjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                    -------------   --------        ------                  -------
  3m            1s              15      {default-scheduler }                    Warning         FailedScheduling        pod (superchimp) failed to fit in any node
fit failure on node (localhost.localdomain): Insufficient pod.alpha.kubernetes.io/opaque-int-resource-bananas
```
2016-10-28 22:25:18 -07:00
Kubernetes Submit Queue 3e7172d49e Merge pull request #34859 from jingxu97/syncAttach-10-15
Automatic merge from submit-queue

Add sync state loop in master's volume reconciler

At master volume reconciler, the information about which volumes are
attached to nodes is cached in actual state of world. However, this
information might be out of date in case that node is terminated (volume
is detached automatically). In this situation, reconciler assume volume
is still attached and will not issue attach operation when node comes
back. Pods created on those nodes will fail to mount.
This PR adds the logic to periodically sync up the truth for attached
volumes kept in
the actual state cache. If the volume is no longer attached to the node,
the actual state will be updated to reflect the truth. In turn,
reconciler will take actions if needed.
To avoid issuing many concurrent operations on cloud provider, this PR
tries to add batch operation to check whether a list of volumes are
attached to the node instead of one request per volume.
2016-10-28 18:33:29 -07:00
Connor Doyle c93646e8da Support opaque integer resource accounting.
- Prevents kubelet from overwriting capacity during sync.
- Handles opaque integer resources in the scheduler.
  - Adds scheduler predicate tests for opaque resources.
- Validates opaque int resources:
  - Ensures supplied opaque int quantities in node capacity,
    node allocatable, pod request and pod limit are integers.
  - Adds tests for new validation logic (node update and pod spec).
- Added e2e tests for opaque integer resources.
2016-10-28 10:15:13 -07:00
Jing Xu abbde43374 Add sync state loop in master's volume reconciler
At master volume reconciler, the information about which volumes are
attached to nodes is cached in actual state of world. However, this
information might be out of date in case that node is terminated (volume
is detached automatically). In this situation, reconciler assume volume
is still attached and will not issue attach operation when node comes
back. Pods created on those nodes will fail to mount.

This PR adds the logic to periodically sync up the truth for attached volumes kept in the actual state cache. If the volume is no longer attached to the node, the actual state will be updated to reflect the truth. In turn, reconciler will take actions if needed.

To avoid issuing many concurrent operations on cloud provider, this PR
tries to add batch operation to check whether a list of volumes are
attached to the node instead of one request per volume.

More details are explained in PR #33760
2016-10-28 09:24:53 -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
Kubernetes Submit Queue 6ce128c4b1 Merge pull request #35606 from gmarek/scheduler
Automatic merge from submit-queue

Small cleanup of scheduler default algorithm provider

It's a no-op PR that just moves stuff around.
2016-10-28 06:06:11 -07:00
deads2k 3f9a4d51d5 wire up authenticating front proxy: 2016-10-28 08:36:46 -04:00
deads2k 557e653785 add front proxy authenticator 2016-10-28 08:36:46 -04:00
deads2k f34bb50ce7 add x509 verifier 2016-10-28 08:05:16 -04:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
gmarek 802ebf01e2 split scheduler priorities 2016-10-26 14:11:15 +02:00
Maciej Szulik bdc8c82240 Update PodAntiAffinity to ignore calls to subresources 2016-10-26 11:53:31 +02:00
gmarek fc8a771b1c Small cleanup of scheduler default algorithm provider 2016-10-26 10:50:15 +02:00
Clayton Coleman 07bd50be0d
Internal weight field for affinity must be int32 2016-10-25 19:28:40 -04:00
Kubernetes Submit Queue e3067f326f Merge pull request #34634 from mwielgus/pod-unschedulable
Automatic merge from submit-queue

Make "Unschedulable" reason a constant in api

String "Unschedulable" is used in couple places in K8S:
* scheduler
* federation replicaset and deployment controllers
* cluster autoscaler
* rescheduler
This PR makes the string a part of API so it not changed.

cc: @davidopp @fgrzadkowski @wojtek-t
2016-10-25 09:30:49 -07:00
Yanqiang Miao 3fbb0bca45 'Max' and 'MIn' don't seem to used anywhere, so I would suggest removing them
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-10-25 11:13:33 +08:00
Mike Danese df713b478c fix tests by declaring testdata 2016-10-21 17:32:32 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue a7807eb5a4 Merge pull request #34138 from ingvagabund/create-restclient-interface
Automatic merge from submit-queue

Create restclient interface

Refactoring of code to allow replace *restclient.RESTClient with any RESTClient implementation that implements restclient.RESTClientInterface interface.
2016-10-21 16:02:04 -07:00
Jan Chaloupka 6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Kubernetes Submit Queue b0a4216182 Merge pull request #33763 from jayunit100/sched-checkservice-predicateCache
Automatic merge from submit-queue

Predicate cacheing and cleanup

Fix to #31795 

First pass @ cleanup and caching of the CheckServiceAffinity function.  

The cleanup IMO is necessary because the logic around the pod listing and the use of the "implicit selector" (which is reverse engineered to enable the homogenous pod groups).

Should still pass the E2Es.

@timothysc @wojtek-t
2016-10-20 07:39:41 -07:00
jayunit100 08cff0157d PredicateMetadata factory and optimization, Cleaned up some comments,
Comments addressed, Make emptyMetadataProducer a func to avoid casting,
FakeSvcLister: remove error return for len(svc)=0.  New test for
predicatePrecomp to make method semantics explictly enforced when meta
is missing. Precompute wrapper.
2016-10-20 08:27:11 -04:00
Kubernetes Submit Queue 6306ab00d2 Merge pull request #34845 from derekwaynecarr/make_pvc_informer_list
Automatic merge from submit-queue

PVC informer lister supports listing

This will be used in follow-on PRs for quota evaluation backed by informers for pvcs.

/cc @deads2k @eparis @kubernetes/sig-storage
2016-10-19 19:29:02 -07:00
Kubernetes Submit Queue 91b7e1f9c3 Merge pull request #34638 from screeley44/k8-get-sc
Automatic merge from submit-queue

Adding default StorageClass annotation printout for resource_printer and describer and some refactoring

adding ISDEFAULT for _kubectl get storageclass_ output

```
[root@screeley-sc1 gce]# kubectl get storageclass
NAME            TYPE                   ISDEFAULT
another-class   kubernetes.io/gce-pd   NO        
generic1-slow   kubernetes.io/gce-pd   YES       
generic2-fast   kubernetes.io/gce-pd   YES       
```

```release-note
Add ISDEFAULT to kubectl get storageClass output
```

@kubernetes/sig-storage
2016-10-19 11:36:08 -07:00
Scott Creeley 86f1a94be5 Adding default StorageClass annotation printout for resource_printer 2016-10-19 10:59:07 -04:00
Kubernetes Submit Queue cd44cec587 Merge pull request #34765 from ivan4th/fix-more-typos
Automatic merge from submit-queue

Fix typos
2016-10-19 00:21:11 -07:00
Clayton Coleman 957c0955aa
Run defaulting on the scheduler startup 2016-10-18 21:07:35 -04:00
Clayton Coleman 1694cfb72d
Make defaulting part of versioning codec
Most normal codec use should perform defaulting. DirectCodecs should not
perform defaulting. Update the defaulting_test to fuzz the list of known
defaulters. Use the new versioning.NewDefaultingCodec() method.
2016-10-18 21:07:35 -04:00
derekwaynecarr 555231fad7 PVC informer lister supports listing 2016-10-18 14:36:33 -04:00
Kubernetes Submit Queue c592a46e16 Merge pull request #28300 from pweil-/psp-seccomp
Automatic merge from submit-queue

Add PSP support for seccomp profiles

Seccomp support for PSP.  There are still a couple of TODOs that need to be fixed but this is passing tests.

One thing of note, since seccomp is all being stored in annotations right now it breaks some of the assumptions we've stated for the provider in terms of mutating the passed in pod.  I've put big warning comments around the pieces that do that to make sure it's clear and covered the rollback in admission if the policy fails to validate.

@sttts @pmorie @erictune @smarterclayton @liggitt
2016-10-18 09:26:09 -07:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
Kubernetes Submit Queue bcbdcd17f3 Merge pull request #34685 from resouer/eclass-2
Automatic merge from submit-queue

Refactor scheduler to enable switch on equivalence cache

Part 2 of #30844 

Refactoring to enable easier switch on of equivalence cache.
2016-10-18 04:21:33 -07:00
derekwaynecarr 3c0b35d6b1 Add LimitRange informer 2016-10-17 16:00:26 -04:00
pweil- 49e14744db support seccomp in psp 2016-10-17 14:49:02 -04:00
Kubernetes Submit Queue f90deb2bdd Merge pull request #34829 from deads2k/api-25-gc-admission
Automatic merge from submit-queue

add ownerref permission checks

Adds an admission plugin that ensures that anyone adding an `ownerReference` to a resource has delete rights on the resource they're setting up a delete for.

@caesarxuchao example admission plugin that tests for ownerReference diffs and uses an authorizer to drive the decision.

@liggitt @ncdc we've talked about this before
2016-10-17 09:34:31 -07:00
Harry Zhang 50eaeaa7bd Update ecache and add scheduler method 2016-10-17 11:42:16 -04:00
Kubernetes Submit Queue 65c98dafe0 Merge pull request #34729 from deads2k/rbac-14-admin-role
Automatic merge from submit-queue

add admin,edit,view roles

Adds some more basic roles to bootstrapping and associated tests.
2016-10-17 07:43:10 -07:00
deads2k 14c164a328 add ownerref permission checks 2016-10-17 09:38:05 -04:00
deads2k d56a27f130 add admin,edit,view roles 2016-10-17 09:04:16 -04:00
Kubernetes Submit Queue 669efd72a4 Merge pull request #34041 from pigmej/fix_typos_plugin
Automatic merge from submit-queue

Fix typos and englishify plugin/pkg

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

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

**Special notes for your reviewer**: Just typos

**Release note**: `NONE`
2016-10-15 02:13:06 -07:00
Kubernetes Submit Queue e5cdc95b85 Merge pull request #34767 from ivan4th/fix-more-typos-1
Automatic merge from submit-queue

Fix typos
2016-10-14 23:30:23 -07:00
Kubernetes Submit Queue cfba438e41 Merge pull request #34084 from ingvagabund/replace-client-with-clientset-in-scheduler-factory
Automatic merge from submit-queue

replace kubeclient with kubeclientset in scheduler factory
2016-10-14 22:09:07 -07:00
Kubernetes Submit Queue 19848dddfd Merge pull request #24980 from aveshagarwal/master-project-node-selector
Automatic merge from submit-queue

Add support for admission controller based on namespace node selectors.

This work is to upstream openshift's project node selectors based admission controller.

Fixes https://github.com/kubernetes/kubernetes/issues/17151
2016-10-14 18:37:33 -07:00
Ivan Shvedunov f1258dca4e Fix typos 2016-10-15 00:21:00 +03:00
Kubernetes Submit Queue c3742a8fbe Merge pull request #34047 from deads2k/rbac-11-informer-cache
Automatic merge from submit-queue

Run rbac authorizer from cache

RBAC authorization can be run very effectively out of a cache.  The cache is a normal reflector backed cache (shared informer).

I've split this into three parts:
 1. slim down the authorizer interfaces
 1. boilerplate for adding rbac shared informers and associated listers which conform to the new interfaces
 1. wiring

@liggitt @ericchiang @kubernetes/sig-auth
2016-10-14 08:12:28 -07:00
Jan Chaloupka 19ab3c6140 replace kubeclient with kubeclientset in scheduler factory
Current factory's client type does not allow to use different client implementing the same interface.
2016-10-14 14:43:43 +02:00
Kubernetes Submit Queue e0fc43b42d Merge pull request #34471 from timothysc/deprecated-scheduler-flags
Automatic merge from submit-queue

Remove scheduler flags that were marked as deprecated 2+ releases ago.

Starting to spin back into scheduler testing and performance evaluation, and I noticed some leftover cleanup work from 2+ releases ago.

**Release note**: Removed unused bind-pods-qps, and bind-pods-burst flags from the scheduler.
2016-10-13 23:51:14 -07:00