Commit Graph

248 Commits (b3be5774c92fa3cec8697f8afe07e8a31ff7559b)

Author SHA1 Message Date
Zihong Zheng 3acff7d3ef Update startup scripts for kube-dns ConfigMap and ServiceAccount 2017-03-09 11:10:23 -08:00
Kubernetes Submit Queue 2249550b57 Merge pull request #42316 from feiskyer/cri-local
Automatic merge from submit-queue

This PR adds a new environmental variable ENABLE_CRI for customizing CRI

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

This PR adds a new environmental variable `ENABLE_CRI` for customizing CRI (e.g. switching between dockershim and dockertools) and sets `--enable-cri=true` by default.

**Which issue this PR fixes** 

Fixes #42315.

**Release note**:

```release-note
NONE
```

Maybe we should also cherry-pick this to 1.6 branch.

cc @yujuhong @Random-Liu
2017-03-01 07:09:19 -08:00
Pengfei Ni 36f551ab1d This PR adds a new environmental variable ENABLE_CRI for customing
CRI config.

Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
2017-03-01 15:21:13 +08:00
deads2k 3d039f60cf allow incluster authentication info lookup 2017-02-28 13:29:59 -05:00
Vishnu Kannan cc5f5474d5 add support for node allocatable phase 2 to kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00
Andy Goldstein bd912f50ba statefulset: use pvc lister, replace legacylisters
Use a PVC lister instead of a client when retrieving PVCs.

Replace unit test's use of legacylisters with the generated listers.
2017-02-27 06:38:11 -05:00
Kubernetes Submit Queue 77ba346f55 Merge pull request #41815 from kevin-wangzefeng/enable-defaulttolerationseconds-admission-controller
Automatic merge from submit-queue (batch tested with PRs 40932, 41896, 41815, 41309, 41628)

enable DefaultTolerationSeconds admission controller by default

**What this PR does / why we need it**:
Continuation of PR #41414, enable DefaultTolerationSeconds admission controller by default.


**Which issue this PR fixes**: 
fixes: #41860
related Issue: #1574, #25320
related PRs: #34825, #41133, #41414 

**Special notes for your reviewer**:

**Release note**:

```release-note
enable DefaultTolerationSeconds admission controller by default
```
2017-02-26 08:09:58 -08:00
Kubernetes Submit Queue b799bbf0a8 Merge pull request #38816 from deads2k/rbac-23-switch-kubedns-sa
Automatic merge from submit-queue

move kube-dns to a separate service account

Switches the kubedns addon to run as a separate service account so that we can subdivide RBAC permission for it.  The RBAC permissions will need a little more refinement which I'm expecting to find in https://github.com/kubernetes/kubernetes/pull/38626 .

@cjcullen @kubernetes/sig-auth since this is directly related to enabling RBAC with subdivided permissions
 @thockin @kubernetes/sig-network since this directly affects now kubedns is added.  


```release-note
`kube-dns` now runs using a separate `system:serviceaccount:kube-system:kube-dns` service account which is automatically bound to the correct RBAC permissions.
```
2017-02-23 12:06:13 -08:00
Derek Carr 43ae6f49ad Enable per pod cgroups, fix defaulting of cgroup-root when not specified 2017-02-21 16:34:22 -05:00
Kevin cd427fa4be enable DefaultTolerationSeconds admission controller by default 2017-02-22 00:45:56 +08:00
Kubernetes Submit Queue caa9bd137b Merge pull request #41526 from xilabao/add-swagger-ui-option
Automatic merge from submit-queue (batch tested with PRs 41756, 36344, 34259, 40843, 41526)

add swagger ui in local cluster

use `ENABLE_SWAGGER_UI=true hack/local-up-cluster.sh`
2017-02-20 13:39:41 -08:00
Jordan Liggitt eaff780312
Revert "first steps to adding kubelet option to enable debugger mode, next steps is to included a warning message."
This reverts commit d3b2708ae8.
2017-02-20 13:41:20 -05:00
Kubernetes Submit Queue 506950ada0 Merge pull request #36765 from derekwaynecarr/quota-precious-resources
Automatic merge from submit-queue (batch tested with PRs 41421, 41440, 36765, 41722)

ResourceQuota ability to support default limited resources

Add support for the ability to configure the quota system to identify specific resources that are limited by default.  A limited resource means its consumption is denied absent a covering quota.  This is in contrast to the current behavior where consumption is unlimited absent a covering quota.  Intended use case is to allow operators to restrict consumption of high-cost resources by default.

Example configuration:

**admission-control-config-file.yaml**
```
apiVersion: apiserver.k8s.io/v1alpha1
kind: AdmissionConfiguration
plugins:
- name: "ResourceQuota"
  configuration:
    apiVersion: resourcequota.admission.k8s.io/v1alpha1
    kind: Configuration
    limitedResources:
    - resource: pods
      matchContains:
      - pods
      - requests.cpu
    - resource: persistentvolumeclaims
      matchContains:
      - .storageclass.storage.k8s.io/requests.storage
```

In the above configuration, if a namespace lacked a quota for any of the following:
* cpu
* any pvc associated with particular storage class

The attempt to consume the resource is denied with a message stating the user has insufficient quota for the matching resources.

```
$ kubectl create -f pvc-gold.yaml 
Error from server: error when creating "pvc-gold.yaml": insufficient quota to consume: gold.storageclass.storage.k8s.io/requests.storage
$ kubectl create quota quota --hard=gold.storageclass.storage.k8s.io/requests.storage=10Gi
$ kubectl create -f pvc-gold.yaml 
... created
```
2017-02-20 10:37:42 -08:00
Kubernetes Submit Queue 4e1ca53394 Merge pull request #41440 from alejandroEsc/ae/kubelet/debug
Automatic merge from submit-queue (batch tested with PRs 41421, 41440, 36765, 41722)

local-up-cluster, allow debug option to kubelet

**What this PR does / why we need it**: Allows for kubelet to start in debug mode.

**Release note**:
```
NONE
```
2017-02-20 10:37:41 -08:00
deads2k 36b586d5d7 move kube-dns to a separate service account 2017-02-20 07:35:08 -05:00
Derek Carr 3fad0cb52a Implement support for limited resources in quota 2017-02-18 12:10:22 -05:00
Pengfei Ni a106ef381d Defaulting client certs owner to current user if not speicified 2017-02-17 10:08:46 +08:00
deads2k b53b7f2062 make the on-infrastructure of kube-aggregator case easier 2017-02-16 09:31:20 -05:00
xilabao 363bfaa5f2 add swagger ui in local cluster 2017-02-16 09:58:34 +08:00
Alejandro Escobar d3b2708ae8 first steps to adding kubelet option to enable debugger mode, next steps is to included a warning message.
added warning in case that debug mode is on for kubelet.
2017-02-15 12:20:16 -08:00
Yu-Ju Hong 9287d6eec3 Remove EXPERIMENTAL_CRI in local-up-cluster.sh
Kubelet now uses CRI by default.
2017-02-15 11:02:53 -08:00
deads2k c2ac9e5ca3 kube-aggregator manifests based on hostpath 2017-02-15 09:00:10 -05:00
Jordan Liggitt cc11d7367a
Switch kube-scheduler to secure API access 2017-02-15 01:05:42 -05:00
deads2k 1d40c3ff76 update scripts for new kube-aggregator location 2017-02-14 14:16:59 -05:00
Kubernetes Submit Queue aa724ae0a9 Merge pull request #41137 from resouer/pod-dir
Automatic merge from submit-queue

Add pod manifest path to local cluster

Added `POD_MANIFEST_PATH` to local cluster up because we are frequently using this flag when testing static & mirror pod during local dev.
2017-02-10 17:38:32 -08:00
Kubernetes Submit Queue f4baa5860f Merge pull request #41114 from ncdc/shared-informers-04-endpoints
Automatic merge from submit-queue (batch tested with PRs 39418, 41175, 40355, 41114, 32325)

Switch endpoints controller to shared informers

cc @bprashanth @thockin @deads2k @sttts @liggitt @smarterclayton  @kubernetes/sig-scalability-pr-reviews
2017-02-10 04:50:48 -08:00
Harry Zhang 984c43fb4e Add pod manifest path to local cluster 2017-02-10 10:44:03 +08:00
Kubernetes Submit Queue 76b39431d3 Merge pull request #41147 from derekwaynecarr/improve-eviction-logs
Automatic merge from submit-queue (batch tested with PRs 41074, 41147, 40854, 41167, 40045)

Add debug logging to eviction manager

**What this PR does / why we need it**:
This PR adds debug logging to eviction manager.

We need it to help users understand when/why eviction manager is/is not making decisions to support information gathering during support.
2017-02-09 17:41:41 -08:00
Andy Goldstein 80ddac7157 Fix controller manager RBAC in local-up-cluster
Change the name of the client cert used by the controller manager from
system:controller to system:kube-controller-manager, so the appropriate
RBAC rules are applied. Also remove the system:masters group from this
client cert so it doesn't have super powers.

Also, always enable using service account credentials in the controller
manager.
2017-02-09 20:40:43 -05:00
Derek Carr 0171121486 Add debug logging to eviction manager 2017-02-08 15:01:12 -05:00
xilabao 544e7aaee4 allow to set local kubeconfig and update the prompt 2017-02-07 13:35:41 +08:00
Kubernetes Submit Queue 4f1489edf0 Merge pull request #41045 from sttts/sttts-client-admin-key-readable
Automatic merge from submit-queue

Make client-admin.key of local-up-cluster.sh readable by kubectl

Follow-up of https://github.com/kubernetes/kubernetes/pull/40922
2017-02-06 15:35:28 -08:00
Kubernetes Submit Queue 1250278bf6 Merge pull request #40922 from berrange/hack-client-cert
Automatic merge from submit-queue

local-up-cluster: fix instructions for set-credentials

After launching the services, local-up-cluster.sh tells the
user how to configure kubectl to access it. The instructions
for 'set-credentials' enable plain password auth, but the
services are configured to mandate client certificate auth.
As a result it is not possible to access the cluster with
the instructions printed.

The use of client certs by default was added in

  commit a1b17db458
  Author: Dr. Stefan Schimanski <sttts@redhat.com>
  Date:   Sat Nov 12 23:09:04 2016 +0100

    Configure client certs in local-cluster-up.sh

and the instructions were correctly updated to refer to
client certificates.

The changed instructions were (mistakenly) reverted though
when the following commit was merged:

  commit 72e0e91b5e
  Author: xilabao <chenr.fnst@cn.fujitsu.com>
  Date:   Fri Dec 2 11:04:25 2016 +0800

    change prompt for enabling RBAC on local-up-cluster

Fixes: #40192

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-02-06 15:35:17 -08:00
Dr. Stefan Schimanski 15cec37e7b Make client-admin.key of local-up-cluster.sh readable by kubectl 2017-02-06 23:07:06 +01:00
Daniel P. Berrange 4ed13ec484 local-up-cluster: fix instructions for set-credentials
After launching the services, local-up-cluster.sh tells the
user how to configure kubectl to access it. The instructions
for 'set-credentials' enable plain password auth, but the
services are configured to mandate client certificate auth.
As a result it is not possible to access the cluster with
the instructions printed.

The use of client certs by default was added in

  commit a1b17db458
  Author: Dr. Stefan Schimanski <sttts@redhat.com>
  Date:   Sat Nov 12 23:09:04 2016 +0100

    Configure client certs in local-cluster-up.sh

and the instructions were correctly updated to refer to
client certificates.

The changed instructions were (mistakenly) reverted though
when the following commit was merged:

  commit 72e0e91b5e
  Author: xilabao <chenr.fnst@cn.fujitsu.com>
  Date:   Fri Dec 2 11:04:25 2016 +0800

    change prompt for enabling RBAC on local-up-cluster

Fixes: #40192

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-02-06 09:55:41 +00:00
Klaus Ma 00960b4d71 Using API_HOST_IP to do apiserver health check. 2017-02-06 04:22:20 +08:00
Kubernetes Submit Queue a777a8e3ba Merge pull request #39972 from derekwaynecarr/pod-cgroups-default
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Rename experimental-cgroups-per-pod flag

**What this PR does / why we need it**:
1. Rename `experimental-cgroups-per-qos` to `cgroups-per-qos`
1. Update hack/local-up-cluster to match `CGROUP_DRIVER` with docker runtime if used.

**Special notes for your reviewer**:
We plan to roll this feature out in the upcoming release.  Previous node e2e runs were running with this feature on by default.  We will default this feature on for all e2es next week.

**Release note**:
```release-note
Rename --experiemental-cgroups-per-qos to --cgroups-per-qos
```
2017-02-04 04:43:08 -08:00
Derek Carr 75fa285a56 Make hack/local-up-cluster default to right cgroup driver 2017-02-03 17:28:23 -05:00
Morgan Bauer 21d976868f
print apiserver log location on apiserver error 2017-02-03 01:35:08 +00:00
Alejandro Escobar f79094e8a2 added warning message error about not running kubelet if not darwin/linux to my check 2017-01-26 13:11:27 -08:00
Alejandro Escobar 9ccade5939 added warning message to display when host_os is found to be darwin since kubelet is not supported in that case. 2017-01-26 13:03:49 -08:00
Seth Jennings e2750a305a reclaim terminated pod volumes 2017-01-20 11:08:35 -06:00
deads2k de725e56e2 prevent anonymous auth and allow all 2017-01-17 10:16:33 -05:00
Kubernetes Submit Queue efff7c0336 Merge pull request #39577 from kargakis/fix-openshift-example
Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

examples: fix OpenShift example

Fixes https://github.com/kubernetes/kubernetes/issues/39575
2017-01-10 22:24:11 -08:00
deads2k 453651cbfc rename kubernetes-discovery to kube-aggregator 2017-01-10 12:27:42 -05:00
Michail Kargakis 68f23120a7 examples: fix OpenShift example 2017-01-09 09:58:35 +01:00
Slava Semushin 83a3cc4eea hack/local-up-cluster.sh: fix typo in error message.
And also remove stale comment.
2017-01-03 16:43:22 +01:00
xilabao f98af5b325 create psp policy in local-up-cluster.sh 2016-12-29 16:08:42 +08:00
Alejandro Escobar 7d9c06f82d local-up-cluster changes: added help option, added error message for why docker ps fails and how to recover, added test to check if etcd is in your path to fail fast when not found.
from etcd.sh split the start process into validate fucntion + start function so that the validate piece can be reused elsewhere. the up-cluster script has been changed to remove duplicate docker logic to the one used in buid-tools/common.sh and the validate etcd function is now used here.

moved docker daemon check function to util.sh and made function name changes and upstream changes.
2016-12-16 07:41:35 -08:00
Zihong Zheng 7921764b0f Second pass of renaming kube-dns configure files 2016-12-13 15:16:34 -08:00