k3s/cluster/gce
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
..
container-linux Merge pull request #41326 from ncdc/ci-cache-mutation 2017-02-21 07:45:42 -08:00
debian Added configurable etcd initial-cluster-state to kube-up script. 2017-02-13 16:10:47 +01:00
gci Merge pull request #40634 from Crassirostris/use-docker-log-rotation 2017-02-26 20:39:34 -08:00
trusty Add standalone npd on GCI. 2017-02-17 16:18:08 -08:00
BUILD Build release tarballs in bazel and add `make bazel-release` rule 2017-01-13 16:17:44 -08:00
OWNERS Add gmarek and jszczepkowski to cluster/gce owners 2017-02-14 17:53:39 +01:00
config-common.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
config-default.sh Merge pull request #41815 from kevin-wangzefeng/enable-defaulttolerationseconds-admission-controller 2017-02-26 08:09:58 -08:00
config-test.sh Merge pull request #41815 from kevin-wangzefeng/enable-defaulttolerationseconds-admission-controller 2017-02-26 08:09:58 -08:00
configure-vm.sh refactor certs in GCE 2017-02-23 10:12:31 -08:00
delete-stranded-load-balancers.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
list-resources.sh Don't fail if the grep fails to match any resources 2017-02-22 14:55:57 -08:00
upgrade.sh Add standalone npd on GCI. 2017-02-17 16:18:08 -08:00
util.sh Add standalone npd on GCI. 2017-02-17 16:18:08 -08:00