Merge pull request #41407 from Crassirostris/fluentd-gcp-sysmted-fix

Automatic merge from submit-queue (batch tested with PRs 41382, 41407, 41409, 41296, 39636)

Fix copying systemd libraries upon fluentd-gcp startup

Fix https://github.com/kubernetes/kubernetes/issues/40936
Revert https://github.com/kubernetes/kubernetes/pull/40017
pull/6/head
Kubernetes Submit Queue 2017-02-14 13:04:21 -08:00 committed by GitHub
commit a48284862c
4 changed files with 27 additions and 9 deletions

View File

@ -2,28 +2,28 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluentd-gcp-v1.35
name: fluentd-gcp-v1.37
namespace: kube-system
labels:
k8s-app: fluentd-gcp
kubernetes.io/cluster-service: "true"
version: v1.35
version: v1.37
spec:
template:
metadata:
labels:
k8s-app: fluentd-gcp
kubernetes.io/cluster-service: "true"
version: v1.35
# This annotation ensures that fluentd does not get evicted if the node
# supports critical pod annotation based priority scheme.
# Note that this does not guarantee admission on the nodes (#40573).
version: v1.37
# This annotation ensures that fluentd does not get evicted if the node
# supports critical pod annotation based priority scheme.
# Note that this does not guarantee admission on the nodes (#40573).
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
containers:
- name: fluentd-gcp
image: gcr.io/google_containers/fluentd-gcp:1.35
image: gcr.io/google_containers/fluentd-gcp:1.37
# If fluentd consumes its own logs, the following situation may happen:
# fluentd fails to send a chunk to the server => writes it to the log =>
# tries to send this message to the server => fails to send a chunk and so on.
@ -45,6 +45,9 @@ spec:
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: libsystemddir
mountPath: /host/lib
readOnly: true
# Liveness probe is aimed to help in situarions where fluentd
# silently hangs for no apparent reasons until manual restart.
# The idea of this probe is that if fluentd is not queueing or
@ -87,3 +90,6 @@ spec:
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: libsystemddir
hostPath:
path: /usr/lib64

View File

@ -26,7 +26,7 @@
.PHONY: build push
PREFIX=gcr.io/google_containers
TAG = 1.35
TAG = 1.37
build:
docker build --pull -t $(PREFIX)/fluentd-gcp:$(TAG) .

View File

@ -17,6 +17,12 @@
# For systems without journald
mkdir -p /var/log/journal
if [ ! -z "`ls /host/lib/libsystemd* 2>/dev/null`" ]
then
rm /lib/x86_64-linux-gnu/libsystemd*
cp -a /host/lib/libsystemd* /lib/x86_64-linux-gnu/
fi
LD_PRELOAD=/opt/td-agent/embedded/lib/libjemalloc.so
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0.9

View File

@ -15,7 +15,7 @@ spec:
dnsPolicy: Default
containers:
- name: fluentd-cloud-logging
image: gcr.io/google_containers/fluentd-gcp:1.35
image: gcr.io/google_containers/fluentd-gcp:1.37
# If fluentd consumes its own logs, the following situation may happen:
# fluentd fails to send a chunk to the server => writes it to the log =>
# tries to send this message to the server => fails to send a chunk and so on.
@ -39,6 +39,9 @@ spec:
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: libsystemddir
mountPath: /host/lib
readOnly: true
# Liveness probe is aimed to help in situarions where fluentd
# silently hangs for no apparent reasons until manual restart.
# The idea of this probe is that if fluentd is not queueing or
@ -79,3 +82,6 @@ spec:
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: libsystemddir
hostPath:
path: /usr/lib64