Commit Graph

287 Commits (154b816a90b8fdec4eeb5f1c2e9b2159e2d4b0c6)

Author SHA1 Message Date
Jordan Liggitt fc8e915a4b
Add Node authorization mode based on graph of node-related objects 2017-05-30 16:53:03 -04:00
Monis Khan a13f026fd0
Panic server on watch errors in test environment
This change makes it so that errors during watch decoding panic the
server if it is in a test environment.  This allows us to catch coder
errors related to storing incompatible types at the same location in
etcd.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-05-25 13:54:56 -04:00
Jordan Liggitt 20ccdfbd3b
Fix unbound variable 2017-05-19 00:29:50 -04:00
Jordan Liggitt 6fd36792f1
Add NodeRestriction admission plugin 2017-05-18 16:43:42 -04:00
Kubernetes Submit Queue ec415a12d2 Merge pull request #45119 from dims/set-default-host-path-as-provisioner
Automatic merge from submit-queue (batch tested with PRs 45860, 45119, 44525, 45625, 44403)

Support running StatefulSetBasic e2e tests with local-up-cluster

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

Currently StatefulSet(s) fail when you use local-up-cluster without
setting a cloud provider. In this PR, we use set the
kubernetes.io/host-path provisioner as the default provisioner when
there CLOUD_PROVIDER is not specified. This enables e2e test(s)
(specifically StatefulSetBasic) to work.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-16 16:14:51 -07:00
Hemant Kumar 9a1a9cbe08 detach the volume when pod is terminated
Make sure volume is detached when pod is terminated because
of any reason and not deleted from api server.
2017-05-11 22:18:22 -04:00
Yu-Ju Hong daa329c9ae Remove the deprecated `--enable-cri` flag
Except for rkt, CRI is the default and only integration point for
container runtimes.
2017-05-10 13:03:41 -07:00
Kubernetes Submit Queue 15f0468986 Merge pull request #44895 from dcbw/iptables-restore-manual-locking
Automatic merge from submit-queue

util/iptables: grab iptables locks if iptables-restore doesn't support --wait

When iptables-restore doesn't support --wait (which < 1.6.2 don't), it may
conflict with other iptables users on the system, like docker, because it
doesn't acquire the iptables lock before changing iptables rules. This causes
sporadic docker failures when starting containers.

To ensure those don't happen, essentially duplicate the iptables locking
logic inside util/iptables when we know iptables-restore doesn't support
the --wait option.

Unfortunately iptables uses two different locking mechanisms, one until
1.4.x (abstract socket based) and another from 1.6.x (/run/xtables.lock
flock() based).  We have to grab both locks, because we don't know what
version of iptables-restore exists since iptables-restore doesn't have
a --version option before 1.6.2.  Plus, distros (like RHEL) backport the
/run/xtables.lock patch to 1.4.x versions.

Related: https://github.com/kubernetes/kubernetes/pull/43575
See also: https://github.com/openshift/origin/pull/13845
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1417234

@kubernetes/rh-networking @kubernetes/sig-network-misc @eparis @knobunc @danwinship @thockin @freehan
2017-05-06 15:17:21 -07:00
Dan Williams 8f967c929f hack/cluster: map /run/xtables.lock into containerized kubelet filesystem 2017-05-05 23:34:06 -05:00
Kubernetes Submit Queue 0b469f4cb5 Merge pull request #45230 from dims/single-ca-cert
Automatic merge from submit-queue (batch tested with PRs 45239, 45230)

Create a single CA for both client and server certs

**What this PR does / why we need it**:
The following test:
"Certificates API [It] should support building a client with a CSR"

fails with local-up-cluster, but works in the existing CI jobs. This
is because the other CI jobs use a single CA cert while local-up-cluster
can use 2 different sets of CA(s). We need a way to mimic the other
CI jobs (or alternatively change everything to have separate CA's). Just
updating local-up-cluster with a flag seems to be the easy route.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-02 14:11:53 -07:00
Davanum Srinivas 0d95f74ef5 Create a single CA for both client and server certs
The following test:
"Certificates API [It] should support building a client with a CSR"

fails with local-up-cluster, but works in the existing CI jobs. This
is because the other CI jobs use a single CA cert while local-up-cluster
can use 2 different sets of CA(s). We need a way to mimic the other
CI jobs (or alternatively change everything to have separate CA's). Just
updating local-up-cluster with a flag seems to be the easy route.
2017-05-02 13:43:46 -04:00
Kubernetes Submit Queue 29f37fde3e Merge pull request #45177 from dims/allow-cluster-signing-ca-crt-and-key
Automatic merge from submit-queue (batch tested with PRs 45077, 45180, 34727, 45079, 45177)

Allow specifying cluster signing ca/key

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-01 18:55:16 -07:00
Davanum Srinivas ec44cc2e7c Allow specifying cluster signing ca/key
Makes it useful in testing some scenarios with automatically
signing certificates
2017-05-01 19:25:56 -04:00
Andy Goldstein 43cb024402 Add kube-proxy config file support
Add support for configuring kube-proxy via a config file instead of
command line flags.
2017-05-01 18:02:47 -04:00
Davanum Srinivas 49faff32da Support running StatefulSetBasic e2e tests with local-up-cluster
Currently StatefulSet(s) fail when you use local-up-cluster without
setting a cloud provider. In this PR, we use set the
kubernetes.io/host-path provisioner as the default provisioner when
there CLOUD_PROVIDER is not specified. This enables e2e test(s)
(specifically StatefulSetBasic) to work.
2017-04-28 15:10:22 -04:00
Kubernetes Submit Queue 21f30db4c6 Merge pull request #44826 from dims/enable-default-signer-in-local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 41287, 41636, 44881, 44826)

Enable default signer implementation

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

The Kubernetes controller manager provides a default implementation
of a signer. We should enable it by passing the --cluster-signing-cert-file
and --cluster-signing-key-file parameters to the controller manager
with paths to your Certificate Authority’s keypair. Hoping this will
help pass the "Certificates API [It] should support building a client with a CSR"
e2e test when run against k8s started using local-up-cluster.sh

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-25 17:56:44 -07:00
Davanum Srinivas eb9ee75c28 Enable default signer implementation
The Kubernetes controller manager provides a default implementation
of a signer. We should enable it by passing the --cluster-signing-cert-file
and --cluster-signing-key-file parameters to the controller manager
with paths to your Certificate Authority’s keypair. Hoping this will
help pass the "Certificates API [It] should support building a client with a CSR"
e2e test when run against k8s started using local-up-cluster.sh
2017-04-24 13:20:52 -04:00
Matthew Wong 0dc99ef80f Validate etcd only when expecting to run etcd 2017-04-24 12:28:19 -04:00
Kubernetes Submit Queue a9be156eea Merge pull request #44292 from derekwaynecarr/local-up-deploy-dashboard
Automatic merge from submit-queue (batch tested with PRs 44222, 44614, 44292, 44638)

Optionally deploy kubernetes dashboard in local-up cluster

**What this PR does / why we need it**:
Enable users of local up cluster to optionally deploy the kubernetes dashboard.

**Special notes for your reviewer**:
The dashboard is especially useful when working on k8s + service catalog at the same time.
2017-04-18 17:42:06 -07:00
Kubernetes Submit Queue 08bd9c773f Merge pull request #44071 from liggitt/service-account-lookup
Automatic merge from submit-queue (batch tested with PRs 44406, 41543, 44071, 44374, 44299)

Enable service account token lookup by default

Fixes #24167

```release-note
kube-apiserver: --service-account-lookup now defaults to true, requiring the Secret API object containing the token to exist in order for a service account token to be valid. This enables service account tokens to be revoked by deleting the Secret object containing the token.
```
2017-04-13 19:52:06 -07:00
Kubernetes Submit Queue 765755376e Merge pull request #43831 from jayunit100/local-up-conformance
Automatic merge from submit-queue

local up dns defaults/Privileged defaults so that [Conformance] sets mostly pass on local clusters.

Fixes #43651 So that only 4 tests fail out of the box.
2017-04-12 20:44:02 -07:00
Derek Carr ab6812324d Optionally deploy kubernetes dashboard in local-up cluster 2017-04-11 10:54:33 -04:00
Kubernetes Submit Queue b9a5a5c9b3 Merge pull request #42748 from dcbw/cfssl-localup
Automatic merge from submit-queue (batch tested with PRs 43866, 42748)

hack/cluster: download cfssl if not present

hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too so users don't have
to bother installing it from somewhere.
2017-04-10 14:27:11 -07:00
jayunit100 60829a88c2 Remove conformance from port forwarding so local / secure clusters aren't expected to support it. 2017-04-07 16:48:26 -04:00
Kubernetes Submit Queue b41e415ebd Merge pull request #43137 from shashidharatd/federation-domain
Automatic merge from submit-queue

[Federation] Remove FEDERATIONS_DOMAIN_MAP references

Remove all references to FEDERATIONS_DOMAIN_MAP as this method is no longer is used and is replaced by adding federation domain map to kube-dns configmap.

cc @madhusudancs @kubernetes/sig-federation-pr-reviews 

**Release note**:
```
[Federation] Mechanism of adding `federation domain maps` to kube-dns deployment via `--federations` flag is superseded by adding/updating `federations` key in `kube-system/kube-dns` configmap. If user is using kubefed tool to join cluster federation, adding federation domain maps to kube-dns is already taken care by `kubefed join` and does not need further action.
```
2017-04-06 02:05:42 -07:00
Jordan Liggitt 0d2e5a0dd8
Enable service account token lookup by default
```release-note
kube-apiserver: --service-account-lookup now defaults to true. This enables service account tokens to be revoked by deleting the Secret object containing the token.
```
2017-04-04 22:00:11 -04:00
Dan Williams f20437a822 hack/cluster: download cfssl if not present
hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too.
2017-04-03 23:31:16 -05:00
Davanum Srinivas 605589dc0d Specify a directory for the logs
Switch from hard coded "/tmp" to a user specified location for
the logs. Default to "/tmp" to keep the current behavior and
not break any current users or jobs.
2017-03-31 15:17:14 -04:00
Kubernetes Submit Queue 2179ffeb63 Merge pull request #42379 from xilabao/enable-audit-log-in-local-cluster
Automatic merge from submit-queue (batch tested with PRs 42379, 42668, 42876, 41473, 43260)

Enable audit log in local cluster

fixes #42318

`ENABLE_APISERVER_BASIC_AUDIT=true hack/local-up-cluster.sh`
2017-03-30 23:36:20 -07:00
jayunit100 f3fb966e73 local up dns defaults 2017-03-30 17:35:40 -04:00
Kubernetes Submit Queue eaf8351d45 Merge pull request #41554 from jsafrane/local-up-class
Automatic merge from submit-queue

local-up-cluster.sh should create a default storage class

To make dynamic provisioning working out of the box in local cluster a default
storage class needs to be instantiated.

```release-note
NONE
```
2017-03-27 12:51:27 -07:00
deads2k 8e26fa25da wire in aggregation 2017-03-27 09:44:10 -04:00
Kubernetes Submit Queue dae73287ab Merge pull request #43569 from alejandroEsc/ae/localup/etcd3
Automatic merge from submit-queue (batch tested with PRs 43149, 41399, 43154, 43569, 42507)

allow etcd2/3 choice when bringing up a local cluster, default to etcd3

**What this PR does / why we need it**: local-up-cluster currently doesn't allow you to select which etcd version to use, here we allow you to select one, since k8s is moving towards etcd3 we suggest it to be the default.

**Special notes for your reviewer**: Note, i didnt realize this until i had used https://github.com/kubernetes/kubernetes/pull/42656 which made it immediately clear.

**Release note**:
```
NONE
```
2017-03-26 00:55:23 -07:00
Kubernetes Submit Queue 9aac45a5be Merge pull request #42347 from aveshagarwal/master-local-cluster-up-fix
Automatic merge from submit-queue

Fix local cluster up script for kube-public namespace error.

Fix local cluster up script for kube-public namespace error:
```
Error from server (AlreadyExists): namespaces "kube-public" already exists
```
2017-03-24 10:25:41 -07:00
Alejandro Escobar 6a8f55736a allow etcd2/3 choice when bringing up a local cluster, default to 3 but thats negotiable, it is what we will be using going forwards. 2017-03-23 06:42:44 -07:00
shashidharatd b09b20b598 Remove FEDERATIONS_DOMAIN_MAP references 2017-03-15 23:06:16 +05:30
Zihong Zheng 3acff7d3ef Update startup scripts for kube-dns ConfigMap and ServiceAccount 2017-03-09 11:10:23 -08:00
xilabao 183fd62a52 Enable audit log in local cluster 2017-03-02 17:02:50 +08:00
Avesh Agarwal 490d2e08cb Fix local cluster up script for following kube-public namespace error:
Error from server (AlreadyExists): namespaces "kube-public" already exists
2017-03-01 15:38:02 -05: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