Commit Graph

208 Commits (b4235038b312fff7d67d01fa0c2bfdc81b1ce21f)

Author SHA1 Message Date
Kubernetes Submit Queue be4452cfce Merge pull request #42994 from Shawyeok/features/full-tls-etcd-cluster
Automatic merge from submit-queue

Centos provider: generate SSL certificates for etcd cluster.

**What this PR does / why we need it**:
Support secure etcd cluster for centos provider, generate SSL certificates for etcd in default. Running it w/o SSL is exposing cluster data to everyone and is not recommended. [#39462](https://github.com/kubernetes/kubernetes/pull/39462#issuecomment-271601547)

/cc @jszczepkowski @zmerlynn 

**Release note**:
```release-note
Support secure etcd cluster for centos provider.
```
2017-03-28 09:02:26 -07:00
Jeff Grafton e39978e6bf Update a few regex patterns to support release candidates 2017-03-24 14:38:04 -07:00
shawyeok c692b55b57 Centos provider: generate SSL certificates for etcd cluster.
Making download-cfssl reusable.

Extract generate-etcd-cert method up to common.sh.
2017-03-24 09:15:57 +08:00
Jordan Liggitt b95f5286c1
Default to enabling legacy ABAC policy in non-test GCE kube-up.sh environments 2017-03-22 22:20:09 -04:00
Mike Danese 1b8084fc2f descriminate more when parsing kube-env :(
I HATE BASH
2017-03-09 15:33:43 -08:00
Mike Danese 90b26465d7 fix upgrades 2017-02-28 14:52:37 -08:00
Kubernetes Submit Queue b18bad156d Merge pull request #40634 from Crassirostris/use-docker-log-rotation
Automatic merge from submit-queue

Use docker log rotation mechanism instead of logrotate

This is a solution for https://github.com/kubernetes/kubernetes/issues/38495.

Instead of rotating logs using logrotate tool, which is configured quite rigidly, this PR makes docker responsible for the rotation and makes it possible to configure docker logging parameters. It solves the following problems:

* Logging agent will stop loosing lines upon rotation
* Container's logs size will be more strictly constrained. Instead of checking the size hourly, size will be checked upon write, preventing https://github.com/kubernetes/kubernetes/issues/27754

It's still far from ideal, for example setting logging options per pod, as suggested in https://github.com/kubernetes/kubernetes/issues/15478 would be much more flexible, but latter approach requires deep changes, including changes in API, which may be in vain because of CRI and long-term vision for logging.

Changes include:

* Change in salt. It's possible to configure docker log parameters, using variables in pillar. They're exported from env variables on `gce`, but for different cloud provider they have to be exported first.
* Change in `configure-helper.sh` scripts for those os on `gce` that don't use salt + default values exposed via env variables

This change may be problematic for kubelet logs functionality with CRI enabled, that will be tackled in the follow-up PR, if confirmed.

CC @piosz @Random-Liu @yujuhong @dashpole @dchen1107 @vishh @kubernetes/sig-node-pr-reviews

```release-note
On GCI by default logrotate is disabled for application containers in favor of rotation mechanism provided by docker logging driver.
```
2017-02-26 20:39:34 -08:00
Kubernetes Submit Queue 409d7d0a91 Merge pull request #41326 from ncdc/ci-cache-mutation
Automatic merge from submit-queue (batch tested with PRs 41364, 40317, 41326, 41783, 41782)

Add ability to enable cache mutation detector in GCE

Add the ability to enable the cache mutation detector in GCE. The current default behavior (disabled) is retained.

When paired with https://github.com/kubernetes/test-infra/pull/1901, we'll be able to detect shared informer cache mutations in gce e2e PR jobs.
2017-02-21 07:45:42 -08:00
Random-Liu d40c0a7099 Add standalone npd on GCI. 2017-02-17 16:18:08 -08:00
Andy Goldstein 688c19ec71 Allow cache mutation detector enablement by PRs
Allow cache mutation detector enablement by PRs in an attempt to find
mutations before they're merged in to the code base. It's just for the
apiserver and controller-manager for now. If/when the other components
start using a SharedInformerFactory, we should set them up just like
this as well.
2017-02-17 10:03:13 -05:00
Wojciech Tyczynski 3695e85b34 Expose storage media type as env variable 2017-02-17 14:16:55 +01:00
Kubernetes Submit Queue 33aedca59d Merge pull request #41332 from jszczepkowski/etcd-cluster-state-16
Automatic merge from submit-queue

Added configurable etcd initial-cluster-state to kube-up script.

Added configurable etcd initial-cluster-state to kube-up script. This
allows creation of multi-master cluster from scratch. This is a
cherry-pick of #41320 from 1.5 branch.

```release-note
Added configurable etcd initial-cluster-state to kube-up script.
```
2017-02-15 10:04:31 -08:00
Mik Vyatskov cabb9890ac Use docker log rotation mechanism instead of logrotate 2017-02-15 16:22:29 +01:00
Kubernetes Submit Queue 80be6a259f Merge pull request #41430 from mikedanese/preserve-key
Automatic merge from submit-queue (batch tested with PRs 41360, 41423, 41430, 40647, 41352)

preserve kube-master-cert metadata over upgrades
2017-02-15 05:06:10 -08:00
Anthony Yeh 7500746e7f cluster/gce: Add env var to enable apiserver basic audit log.
For now, this is focused on a fixed set of flags that makes the audit
log show up under /var/log/kube-apiserver-audit.log and behave similarly
to /var/log/kube-apiserver.log. Allowing other customization would
require significantly more complex changes.

Audit log rotation is handled externally by the wildcard /var/log/*.log
already configured in configure-helper.sh.
2017-02-14 15:18:10 -08:00
Mike Danese e17e4e110e preserve kube-master-cert metadata over upgrades 2017-02-14 11:02:11 -08:00
Jerzy Szczepkowski 80e57b7016 Added configurable etcd initial-cluster-state to kube-up script.
Added configurable etcd initial-cluster-state to kube-up script. This
allows creation of multi-master cluster from scratch. This is a
cherry-pick of #41320 from 1.5 branch.
2017-02-13 16:10:47 +01:00
Mike Danese c8ce55fef4 Revert "Merge pull request #41132 from kubernetes/revert-40893-kubelet-auth"
This reverts commit fd56078298, reversing
changes made to d953402cdf.
2017-02-09 15:55:12 -08:00
Aleksandra Malinowska 1841e5b2e0 Revert "remove second CA used for kubelet auth in favor of webhook auth" 2017-02-08 13:22:10 +01:00
Mike Danese 86d9493747 remove second CA used for kubelet auth in favor of webhook auth 2017-02-07 13:22:01 -08:00
Andy Lindeman afb5e8ceb7
Exports KUBE_TEMP for use in Vagrantfile 2017-01-30 22:05:07 -05:00
Matt Liggett 0a4981ebf4 Only run gcloud as root if we plan to change something. 2017-01-20 17:18:05 -08:00
Mike Danese 513994a9f8 pass CA key to signer in GCE 2017-01-20 11:10:19 -08:00
Kubernetes Submit Queue 1430597f7e Merge pull request #39966 from liggitt/cert-users
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

Include system:masters group in the bootstrap admin client certificate

Sets up the bootstrap admin client certificate for new clusters to be in the system:masters group

Removes the need for an explicit grant to the kubecfg user in e2e-bindings

```release-note
The default client certificate generated by kube-up now contains the superuser `system:masters` group
```
2017-01-20 08:28:51 -08:00
Ryan Hallisey dbb92f9836 Use ensure-temp-dir in the common.sh script
Instead of having an ensure-temp-dir function in multiple
places, add it to the common.sh script which is sourced by
all the providers.
2017-01-19 09:30:50 -05:00
Kubernetes Submit Queue b29d9cdbcf Merge pull request #39898 from ixdy/bazel-release-tars
Automatic merge from submit-queue

Build release tars using bazel

**What this PR does / why we need it**: builds equivalents of the various kubernetes release tarballs, solely using bazel.

For example, you can now do
```console
$ make bazel-release
$ hack/e2e.go -v -up -test -down
```

**Special notes for your reviewer**: this is currently dependent on 3b29803eb5, which I have yet to turn into a pull request, since I'm still trying to figure out if this is the best approach.

Basically, the issue comes up with the way we generate the various server docker image tarfiles and load them on nodes:
* we `md5sum` the binary being encapsulated (e.g. kube-proxy) and save that to `$binary.docker_tag` in the server tarball
* we then build the docker image and tag using that md5sum (e.g. `gcr.io/google_containers/kube-proxy:$MD5SUM`)
* we `docker save` this image, which embeds the full tag in the `$binary.tar` file.
* on cluster startup, we `docker load` these tarballs, which are loaded with the tag that we'd created at build time. the nodes then use the `$binary.docker_tag` file to find the right image.

With the current bazel `docker_build` rule, the tag isn't saved in the docker image tar, so the node is unable to find the image after `docker load`ing it.

My changes to the rule save the tag in the docker image tar, though I don't know if there are subtle issues with it. (Maybe we want to only tag when `--stamp` is given?)

Also, the docker images produced by bazel have the timestamp set to the unix epoch, which is not great for debugging. Might be another thing to change with a `--stamp`.

Long story short, we probably need to follow up with bazel folks on the best way to solve this problem.

**Release note**:

```release-note
NONE
```
2017-01-18 14:24:48 -08:00
Wojciech Tyczynski 61f2201304 Really enable etcd3 2017-01-17 15:57:43 +01:00
Jordan Liggitt 7e98e06e48
Include system:masters group in the bootstrap admin client certificate 2017-01-16 14:01:24 -05:00
Jeff Grafton b9e060a630 Update scripts to look for binary artifacts in bazel-bin/ 2017-01-13 16:17:48 -08:00
Kubernetes Submit Queue addc6cae4a Merge pull request #38212 from mikedanese/kubeletauth
Automatic merge from submit-queue (batch tested with PRs 38212, 38792, 39641, 36390, 39005)

Generate a kubelet CA and kube-apiserver cert-pair for kubelet auth.

cc @cjcullen
2017-01-10 19:48:09 -08:00
Mike Danese 3ab0e37cc6 implement upgrades 2017-01-04 11:45:57 -08:00
CJ Cullen d0997a3d1f Generate a kubelet CA and kube-apiserver cert-pair for kubelet auth.
Plumb through to kubelet/kube-apiserver on gci & cvm.
2017-01-03 14:30:45 -08:00
Zach Loafman a3b363000d Fix AWS break injected by kubernetes/kubernetes#39020 2017-01-03 13:52:02 -08:00
Yifan Gu dd59aa1c3b cluster/gce: Rename coreos to container-linux. 2016-12-30 15:32:02 -08:00
deads2k 8360bc1a9f create kubelet client cert with correct group 2016-12-20 14:18:17 -05:00
Kubernetes Submit Queue 46e5f21676 Merge pull request #38730 from ixdy/download-kube-binaries-if-needed
Automatic merge from submit-queue

Automatically download missing kube binaries in kube-up/kube-down.

**What this PR does / why we need it**: some users extract `kubernetes.tar.gz` and then immediately call `cluster/kube-up.sh` without first calling the new `cluster/get-kube-binaries.sh` script. As a result, the cluster fails to start, but it's not immediately clear why binaries are missing.

This PR streamlines this workflow by detecting this condition and prompting the user to download necessary binaries (using `cluster/get-kube-binaries.sh`).

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

cc @arun-gupta @christian-posta
2016-12-16 10:07:22 -08:00
Jeff Grafton 27d096d27d Rename build-tools/ back to build/ 2016-12-14 13:42:15 -08:00
Jeff Grafton cbee65a6d2 Automatically download missing kube binaries in kube-up/kube-down. 2016-12-13 14:59:13 -08:00
Kubernetes Submit Queue e15cd67247 Merge pull request #37839 from euank/modern-python-print
Automatic merge from submit-queue

cluster: fix gcloud check for python3

cc @jlowdermilk as the author of the regressing commit.
2016-12-03 09:36:46 -08:00
Dawn Chen 38a63e388d Set kernel.softlockup_panic =1 based on the flag. 2016-12-02 16:09:16 -08:00
Euan Kemp bf1dcd8d6b cluster: fix gcloud check for python3
Introduced in #36292, breaks anyone who uses a reasonable/recent python
version
2016-12-01 11:12:13 -08:00
Kubernetes Submit Queue 1570aad238 Merge pull request #37451 from jszczepkowski/ha-read-quorum
Automatic merge from submit-queue

Added setting etcd read quorum flag
2016-12-01 06:31:24 -08:00
Kubernetes Submit Queue 3dac320640 Merge pull request #36292 from jlowdermilk/no-gcloud-update
Automatic merge from submit-queue

Don't update gcloud in cluster/*/util.sh

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

Removes automatic gcloud update commands from `cluster/gce/util.sh`, `cluster/gke/util.sh`. Setting env `KUBE_PROMPT_FOR_UPDATE=y` will update required components, otherwise it will only verify that required components are present and at a minimum required version.

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

**Special notes for your reviewer**:

Inline python is nasty but I *really* don't want to do version comparison in bash. Open to other suggestions for verifying required version of gcloud components. cc @kubernetes/sig-cluster-lifecycle, @kubernetes/sig-testing 

**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
`kube-up.sh`/`kube-down.sh` no longer force update gcloud for provider=gce|gke.
```
2016-12-01 00:39:10 -08:00
Kubernetes Submit Queue 85ff555954 Merge pull request #31617 from jsafrane/default-storage-class
Automatic merge from submit-queue

Deploy a default StorageClass instance on AWS and GCE

This needs a newer kubectl in kube-addons-manager container. It's quite tricky to test as I cannot push new container image to gcr.io and I must copy the newer container manually.

cc @kubernetes/sig-storage

**Release note**:
```release-note
Kubernetes now installs a default StorageClass object when deployed on AWS, GCE and
OpenStack with kube-up.sh scripts. This StorageClass will automatically provision
a PeristentVolume in corresponding cloud for a PersistentVolumeClaim that cannot be
satisfied by any existing matching PersistentVolume in Kubernetes.

To override this default provisioning, administrators must manually delete this default StorageClass.
```
2016-11-29 20:52:01 -08:00
Jerzy Szczepkowski 02542cae06 Added setting etcd read quorum flag.
Added setting etcd read quorum flag in kube-up scripts. Required for HA master.
2016-11-25 13:53:11 +01:00
Robert Bailey 9356ff0cd0 Use shasum if sha1sum doesn't exist in the path. 2016-11-23 08:27:40 -08:00
Jan Safranek b52d971aee stash 2016-11-21 10:16:29 +01:00
Jeff Lowdermilk 7c11427ca9 Don't update gcloud in cluster/*/util.sh 2016-11-11 15:53:25 -08:00
Jerzy Szczepkowski ab7266bf19 SSL certificates for etcd cluster.
Added generation of SSL certificates for etcd cluster internal
communication. Turned on on gci & trusty.
2016-11-10 15:26:03 +01:00
Kubernetes Submit Queue 1014bc411a Merge pull request #36346 from jszczepkowski/ha-masterip
Automatic merge from submit-queue

Change master to advertise external IP in kubernetes service.

Change master to advertise external IP in kubernetes service.
In effect, in HA mode in case of multiple masters, IP of external load
balancer will be advertise in kubernetes service.
2016-11-10 05:00:48 -08:00