From 73b3edb263c08d3e1213eb03604a4c7f4bdb8fe5 Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Tue, 19 May 2015 16:42:49 -0700 Subject: [PATCH] Update GPC logging sidecar to use latest gem --- contrib/logging/fluentd-sidecar-gcp/Dockerfile | 3 +++ contrib/logging/fluentd-sidecar-gcp/Makefile | 2 +- contrib/logging/fluentd-sidecar-gcp/README.md | 2 +- .../logging/fluentd-sidecar-gcp/logging-sidecar-example.yaml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/logging/fluentd-sidecar-gcp/Dockerfile b/contrib/logging/fluentd-sidecar-gcp/Dockerfile index fff5efaa8673f..f63a12e10d458 100644 --- a/contrib/logging/fluentd-sidecar-gcp/Dockerfile +++ b/contrib/logging/fluentd-sidecar-gcp/Dockerfile @@ -20,6 +20,9 @@ RUN apt-get -q update && \ apt-get clean && \ curl -s https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh | sudo bash +# Update gem for fluent-plugin-google-cloud +RUN /usr/sbin/google-fluentd-gem update fluent-plugin-google-cloud + # Copy the configuration file generator for creating input configurations for # each file specified in the FILES_TO_COLLECT environment variable. COPY config_generator.sh /usr/local/sbin/config_generator.sh diff --git a/contrib/logging/fluentd-sidecar-gcp/Makefile b/contrib/logging/fluentd-sidecar-gcp/Makefile index 3b6dd3be93871..afab501dc00c5 100644 --- a/contrib/logging/fluentd-sidecar-gcp/Makefile +++ b/contrib/logging/fluentd-sidecar-gcp/Makefile @@ -1,6 +1,6 @@ .PHONY: build push -TAG = 1.0 +TAG = 1.1 build: docker build -t gcr.io/google_containers/fluentd-sidecar-gcp:$(TAG) . diff --git a/contrib/logging/fluentd-sidecar-gcp/README.md b/contrib/logging/fluentd-sidecar-gcp/README.md index fd06bbc732c5f..578062675b2b5 100644 --- a/contrib/logging/fluentd-sidecar-gcp/README.md +++ b/contrib/logging/fluentd-sidecar-gcp/README.md @@ -9,7 +9,7 @@ This shouldn't be necessary if your container writes its logs to stdout or stder In order to make this work, you have to add a few things to your pod config: -1. A second container, using the `gcr.io/google_containers/fluentd-sidecar-gcp:1.0` image to send the logs to Google Cloud Logging. +1. A second container, using the `gcr.io/google_containers/fluentd-sidecar-gcp:1.1` image to send the logs to Google Cloud Logging. 2. A volume for the two containers to share. The emptyDir volume type is a good choice for this because we only want the volume to exist for the lifetime of the pod. 3. Mount paths for the volume in each container. In your primary container, this should be the path that the applications log files are written to. In the secondary container, this can be just about anything, so we put it under /mnt/log to keep it out of the way of the rest of the filesystem. 4. The `FILES_TO_COLLECT` environment variable in the sidecar container, telling it which files to collect logs from. These paths should always be in the mounted volume. diff --git a/contrib/logging/fluentd-sidecar-gcp/logging-sidecar-example.yaml b/contrib/logging/fluentd-sidecar-gcp/logging-sidecar-example.yaml index afb8151e270ea..8aed32508b1a7 100644 --- a/contrib/logging/fluentd-sidecar-gcp/logging-sidecar-example.yaml +++ b/contrib/logging/fluentd-sidecar-gcp/logging-sidecar-example.yaml @@ -13,7 +13,7 @@ spec: - name: log-storage mountPath: /var/log - name: sidecar-log-collector - image: gcr.io/google_containers/fluentd-sidecar-gcp:1.0 + image: gcr.io/google_containers/fluentd-sidecar-gcp:1.1 env: - name: FILES_TO_COLLECT value: "/mnt/log/synthetic-count.log /mnt/log/synthetic-dates.log"