Remove the garbage log file in the fluentd-gcp that gets filled with

gunk when installing the google-fluentd agent.

Also let it log things by not redirecting to a file within the container
and only using -q (warning logs only) rather than -qq (error logs only).
This commit is contained in:
Alex Robinson 2015-08-26 21:29:51 +00:00
parent c9a8b2a405
commit b3154a7815
4 changed files with 12 additions and 9 deletions

View File

@ -17,11 +17,14 @@ RUN apt-get -q update && \
apt-get clean && \
curl -s https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh | sudo bash
# Copy the Fluentd configuration file for logging Docker container logs.
COPY google-fluentd.conf /etc/google-fluentd/google-fluentd.conf
# Install the record reformer plugin.
RUN /usr/sbin/google-fluentd-gem install fluent-plugin-record-reformer
# Remove the misleading log file that gets generated when the agent is installed
RUN rm -rf /var/log/google-fluentd
# Copy the Fluentd configuration file for logging Docker container logs.
COPY google-fluentd.conf /etc/google-fluentd/google-fluentd.conf
# Start Fluentd to pick up our config that watches Docker container logs.
CMD /usr/sbin/google-fluentd "$FLUENTD_ARGS" > /var/log/google-fluentd.log
CMD /usr/sbin/google-fluentd "$FLUENTD_ARGS"

View File

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

View File

@ -6,14 +6,14 @@ metadata:
spec:
containers:
- name: fluentd-cloud-logging
image: gcr.io/google_containers/fluentd-gcp:1.11
image: gcr.io/google_containers/fluentd-gcp:1.12
resources:
limits:
cpu: 100m
memory: 200Mi
env:
- name: FLUENTD_ARGS
value: -qq
value: -q
volumeMounts:
- name: varlog
mountPath: /varlog

View File

@ -169,14 +169,14 @@ metadata:
spec:
containers:
- name: fluentd-cloud-logging
image: gcr.io/google_containers/fluentd-gcp:1.11
image: gcr.io/google_containers/fluentd-gcp:1.12
resources:
limits:
cpu: 100m
memory: 200Mi
env:
- name: FLUENTD_ARGS
value: -qq
value: -q
volumeMounts:
- name: varlog
mountPath: /varlog