Update fluentd-gcp to use a new google-fluentd build with my recent

changes to fluent-plugin-google-cloud to attach Kubernetes metadata to
logs.

Along with this, separate logs from containers in the cluster out from
logs from the daemons running on the node by instantiating two instances
of the output plugin, one which uses the new metadata (for containers)
and one which doesn't (for things like docker and the kubelet).
This commit is contained in:
Alex Robinson
2015-09-11 16:53:18 -07:00
parent f691dca96e
commit 8040f75594
4 changed files with 24 additions and 6 deletions

View File

@@ -14,7 +14,7 @@
.PHONY: kbuild kpush
TAG = 1.12
TAG = 1.13
# Rules for building the test image for deployment to Dockerhub with user kubernetes.

View File

@@ -123,16 +123,34 @@
tag kube-scheduler
</source>
<match **>
# We use 2 output stanzas - one to handle the container logs and one to handle
# the node daemon logs, the latter of which explicitly sends its logs to the
# compute.googleapis.com service rather than container.googleapis.com to keep
# them separate since most users don't care about the node logs.
<match kubernetes.**>
type google_cloud
# Set the chunk limit conservatively to avoid exceeding the GCL limit
# of 2MB per write request.
buffer_chunk_limit 512K
# Cap buffer memory usage to 512KB/chunk * 128 chunks = 65 MB
buffer_queue_limit 128
# Cap the combined memory usage of this buffer and the one below to
# 512KB/chunk * (96 + 32) chunks = 65 MB
buffer_queue_limit 96
# Never wait more than 5 seconds before flushing logs in the non-error case.
flush_interval 5s
# Never wait longer than 5 minutes between retries.
max_retry_wait 300
# Disable the limit on the number of retries (retry forever).
disable_retry_limit
</match>
# Keep a smaller buffer here since these logs are less important than the user's
# container logs.
<match **>
type google_cloud
detect_subservice false
buffer_chunk_limit 512K
buffer_queue_limit 32
flush_interval 5s
max_retry_wait 300
disable_retry_limit
</match>

View File

@@ -6,7 +6,7 @@ metadata:
spec:
containers:
- name: fluentd-cloud-logging
image: gcr.io/google_containers/fluentd-gcp:1.12
image: gcr.io/google_containers/fluentd-gcp:1.13
resources:
limits:
cpu: 100m

View File

@@ -169,7 +169,7 @@ metadata:
spec:
containers:
- name: fluentd-cloud-logging
image: gcr.io/google_containers/fluentd-gcp:1.12
image: gcr.io/google_containers/fluentd-gcp:1.13
resources:
limits:
cpu: 100m