Merge pull request #37941 from Crassirostris/fluentd-gcp-config-unification

Automatic merge from submit-queue (batch tested with PRs 37692, 37785, 37647, 37941, 37856)

Use unified gcp fluentd image for gci and cvm

Follow-up of https://github.com/kubernetes/kubernetes/pull/37681

Actually unify the pod specs for CVM and GCI, to simplify the configuration

CC @piosz
This commit is contained in:
Kubernetes Submit Queue
2016-12-03 11:45:02 -08:00
committed by GitHub
4 changed files with 7 additions and 74 deletions

View File

@@ -1,62 +0,0 @@
# This config should be kept as similar as possible to the one at
# cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml
apiVersion: v1
kind: Pod
metadata:
name: fluentd-cloud-logging
namespace: kube-system
labels:
k8s-app: fluentd-logging
spec:
dnsPolicy: Default
containers:
- name: fluentd-cloud-logging
image: gcr.io/google_containers/fluentd-gcp:1.28
command:
- '/bin/sh'
- '-c'
# This is pretty hacky, but ruby relies on libsystemd's native code, and
# the ubuntu:16.04 libsystemd doesn't play nice with the journal on GCI
# hosts. Work around the problem by copying in the host's libsystemd.
- 'rm /lib/x86_64-linux-gnu/libsystemd* && cp /host/lib/libsystemd* /lib/x86_64-linux-gnu/ && /usr/sbin/td-agent -q -c /etc/td-agent/td-agent-journal.conf'
resources:
limits:
memory: 200Mi
requests:
# Any change here should be accompanied by a proportional change in CPU
# requests of other per-node add-ons (e.g. kube-proxy).
cpu: 100m
memory: 200Mi
env:
# Jemalloc is a widely used way to decrease memory consumption
# in Ruby world. It's a better implementation of malloc(3).
- name: "LD_PRELOAD"
value: "/opt/td-agent/embedded/lib/libjemalloc.so"
# This is quite hacky, but forces Ruby GC to be ivoked more often
# resulting in lower memory consumption, which is important for us.
- name: "RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR"
value: "0.9"
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: journaldir
mountPath: /var/log/journal
- name: libsystemddir
mountPath: /host/lib
terminationGracePeriodSeconds: 30
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: journaldir
hostPath:
path: /var/log/journal
- name: libsystemddir
hostPath:
path: /usr/lib64

View File

@@ -11,7 +11,7 @@ spec:
dnsPolicy: Default
containers:
- name: fluentd-cloud-logging
image: gcr.io/google_containers/fluentd-gcp:1.28
image: gcr.io/google_containers/fluentd-gcp:1.29
resources:
limits:
memory: 200Mi
@@ -23,20 +23,14 @@ spec:
env:
- name: FLUENTD_ARGS
value: -q
# Jemalloc is a widely used way to decrease memory consumption
# in Ruby world. It's a better implementation of malloc(3).
- name: "LD_PRELOAD"
value: "/opt/td-agent/embedded/lib/libjemalloc.so"
# This is quite hacky, but forces Ruby GC to be ivoked more often
# resulting in lower memory consumption, which is important for us.
- name: "RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR"
value: "0.9"
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: libsystemddir
mountPath: /host/lib
terminationGracePeriodSeconds: 30
volumes:
- name: varlog
@@ -45,4 +39,6 @@ spec:
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: libsystemddir
hostPath:
path: /usr/lib64