Commit Graph

319 Commits (70960a5ed785c64df837139a783f89901d7891f1)

Author SHA1 Message Date
Zihong Zheng db8f9ddcec Merge kube-dns templates into a single file 2017-10-03 09:43:52 -07:00
WanLinghao d5f610c250 clusterrolebindings duplicate create in local-up-cluster.sh
Changes to be committed:
  modified:   hack/local-up-cluster.sh
2017-09-28 00:16:13 +08:00
Weiwei Jiang 655f591d85 Remove the deprecated env "ENABLE_CRI"
Remove the deprecated env "ENABLE_CRI" according to https://github.com/kubernetes/kubernetes/pull/45194
2017-09-20 13:45:58 +08:00
Derek Carr 17c3b1ff56 hack/local-up-cluster.sh defaults to allow swap 2017-08-26 01:04:08 -04:00
Andy Lindeman 60e4912bdf
Creates /var/lib/kubelet as root
Fixes:
```
mkdir: cannot create directory ‘/var/lib/kubelet’: Permission denied
```
2017-08-14 21:45:48 +00:00
Kubernetes Submit Queue a0fe9edd27 Merge pull request #49808 from dims/fix-dynamic-admission-control-in-local-cluster
Automatic merge from submit-queue (batch tested with PRs 48365, 49902, 49808, 48722, 47045)

Add admission controller API to runtime config and externalize ADMISSION_CONTROL

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

Enable the dynamic admission controller registration API by
adding "admissionregistration.k8s.io/v1alpha1" to --runtime-config
to fix problems when starting up local-up-cluster. Also make sure
ADMISSION_CONTROL can be specified externally.

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

Fixes #47385

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-02 22:32:56 -07:00
Kubernetes Submit Queue 0f10e61241 Merge pull request #44278 from aveshagarwal/master-fix-resource-quota
Automatic merge from submit-queue (batch tested with PRs 49990, 49997, 44278, 49936, 49891)

Move ResourceQuota plugin at the end of the admission plugin chain.

@liggitt @derekwaynecarr
2017-08-02 10:21:46 -07:00
Kubernetes Submit Queue 11f8047735 Merge pull request #49729 from LihuaWu/feature-zjt
Automatic merge from submit-queue

fix hack/local-up-cluster.sh apiserver not listening bug

**What this PR does / why we need it**:
This PR fix a potential bug int hack/local-up-cluster.sh and it helps developers to build local cluster properly

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-31 13:30:45 -07:00
wulihua e0fefbee9c Fix issue: https://github.com/kubernetes/kubernetes/issues/49728
Let user choose ADVERTISE_ADDRESS in case the apiserver heuristic
 for the external address is broken
2017-07-31 21:36:31 +08:00
Jordan Liggitt 33a3a7c730
Enable node authorizer in local-up-cluster 2017-07-28 14:59:41 -04:00
Davanum Srinivas 13558335bd Add admission controller API to config and externalize ADMISSION_CONTROL
Enable the dynamic admission controller registration API by
adding "admissionregistration.k8s.io/v1alpha1" to --runtime-config
to fix problems when starting up local-up-cluster. Also make sure
ADMISSION_CONTROL can be specified externally.

Fixes 47385
2017-07-28 14:12:50 -04:00
Avesh Agarwal b6b26ae9c0 Move ResourceQuota plugin at the end of the admission plugin chain. 2017-07-28 08:57:46 -04:00
Kubernetes Submit Queue 427dfd5ce1 Merge pull request #49430 from dims/set-external-hostname-in-local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Set external hostname in local-up-cluster

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

If we set --external-hostname, then the api server does not look
in the CloudProviderOptions.DefaultExternalHost method. While we
are at it, let's log an info message, so if there is a failure
the operator gets a hint that they can use --external-hostname
to bypass the lookup in the cloud provider. This will enable us
to set the CLOUD_PROVIDER to openstack for example and not have to
really run api server inside a openstack vm.

**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-07-25 12:14:48 -07:00
Kubernetes Submit Queue 2189314895 Merge pull request #40050 from mtaufen/standalone-mode
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Use presence of kubeconfig file to toggle standalone mode

Fixes #40049 

```release-note
The deprecated --api-servers flag has been removed. Use --kubeconfig to provide API server connection information instead. The --require-kubeconfig flag is now deprecated. The default kubeconfig path is also deprecated. Both --require-kubeconfig and the default kubeconfig path will be removed in Kubernetes v1.10.0.
```

/cc @kubernetes/sig-cluster-lifecycle-misc @kubernetes/sig-node-misc
2017-07-25 12:14:43 -07:00
Michael Taufen 38aee0464d Providing kubeconfig file is now the switch for standalone mode
Replaces use of --api-servers with --kubeconfig in Kubelet args across
the turnup scripts. In many cases this involves generating a kubeconfig
file for the Kubelet and placing it in the correct location on the node.
2017-07-24 11:03:00 -07:00
Davanum Srinivas f4011d485a Set external hostname in local-up-cluster
If we set --external-hostname, then the api server does not look
in the CloudProviderOptions.DefaultExternalHost method. While we
are at it, let's log an info message, so if there is a failure
the operator gets a hint that they can use --external-hostname
to bypass the lookup in the cloud provider. This will enable us
to set the CLOUD_PROVIDER to openstack for example and not have to
really run api server inside a openstack vm.
2017-07-24 07:58:46 -04:00
Sunil Arora 4d5b96f94e fixed conflict resolution behavior while apply podpresets 2017-07-21 13:19:57 -07:00
mtanino f1351e34e7 Enable RBAC by default in hack/local-up-cluster.sh
Since hack/local-up-cluster.sh checks https API port
after commit 413ab26df9,
RBAC should be enabled by default to avoid TLS port
access denied.

Fixes #49319
2017-07-20 15:05:26 -04:00
Kubernetes Submit Queue b78fc209a4 Merge pull request #49045 from ericchiang/remove-anytoken-authenticator-option
Automatic merge from submit-queue (batch tested with PRs 49058, 49072, 49137, 49182, 49045)

*: remove --insecure-allow-any-token option

~Since the authenticator is still used in e2e tests, don't remove
the actual package. Maybe a follow up?~

edit: e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```

closes #49031

cc @kubernetes/sig-auth-pr-reviews
2017-07-19 10:27:29 -07:00
Eric Chiang e2f2ab67f2 *: remove --insecure-allow-any-token option
e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```
2017-07-18 16:03:15 -07:00
Chen Rong 413ab26df9 use https to check healthz in hack/local-up-cluster.sh 2017-07-18 12:17:47 +08:00
Kubernetes Submit Queue a92123c530 Merge pull request #48037 from wanghaoran1988/add_bootstrap_option
Automatic merge from submit-queue (batch tested with PRs 48295, 48298, 47339, 44910, 48037)

Make the `--controllers` flag configurable in hack/local-up-cluster.sh

**What this PR does / why we need it**:
add options to enable tokencleaner,bootstrapsigner controller for bootstrap token testing

**Release note**:
```
None
```
2017-06-30 14:34:32 -07:00
Kubernetes Submit Queue 33fc75e223 Merge pull request #47984 from ironcladlou/local-cluster-vmodule
Automatic merge from submit-queue (batch tested with PRs 46850, 47984)

Enable vmodule support for all components

Support vmodule (via `LOG_SPEC`) for all local cluster components.

```release-note
NONE
```
2017-06-29 07:18:34 -07:00
Nikhita Raghunath 52bd0bc713
Fix error in local-cluster-up
When $GO_OUT is not set, line 152 will output the error:
[: ==: unary operator expected. This occurs because the if condition becomes
if [  == "" ]. This results in an error because == is a binary operator.
2017-06-26 21:59:01 +05:30
Haoran Wang 38f3a9cc4b add options enable tokencleaner,bootstrapsigner controller 2017-06-26 23:46:55 +08:00
Dan Mace 321ed7f7cf Enable vmodule support for all components
Support vmodule (via `LOG_SPEC`) for all local cluster components.
2017-06-23 15:12:35 -04:00
Kubernetes Submit Queue cc645a8c6f Merge pull request #46327 from supereagle/mark-network-plugin-dir-deprecated
Automatic merge from submit-queue (batch tested with PRs 46327, 47166)

mark --network-plugin-dir deprecated for kubelet

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-19 11:23:54 -07:00
Clayton Coleman 4ce3907639
Add Initializers to all admission control paths by default 2017-06-02 22:09:04 -04:00
Kubernetes Submit Queue 62435edeff Merge pull request #46448 from dashpole/disk_eviction_defaults
Automatic merge from submit-queue

Set Kubelet Disk Defaults for the 1.7 release

The `--low-diskspace-threshold-mb` flag has been depreciated since 1.6.
This PR sets the default to `0`, and sets defaults for disk eviction based on the values used for our [e2e tests](https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/services/kubelet.go#L145).
This also removes the custom defaults for vagrant, as the new defaults should work for it as well.

/assign @derekwaynecarr 
cc @vishh 

```release-note
By default, --low-diskspace-threshold-mb is not set, and --eviction-hard includes "nodefs.available<10%,nodefs.inodesFree<5%"
```
2017-06-01 10:04:27 -07:00
supereagle dc9f0f9729 mark --network-plugin-dir deprecated for kubelet, and update related bootstrap scripts 2017-06-01 22:06:44 +08:00
Haoran Wang cadbcf9419 Disable all alpha feature gates by default 2017-05-31 23:30:00 +08:00
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
David Ashpole b2a60dc9a4 By default, Disable LowDiskSpaceThresholdMB, and enable eviciton for disk 2017-05-25 10:03:35 -07: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