mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
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:
parent
c9a8b2a405
commit
b3154a7815
@ -17,11 +17,14 @@ RUN apt-get -q update && \
|
|||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
curl -s https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh | sudo bash
|
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.
|
# Install the record reformer plugin.
|
||||||
RUN /usr/sbin/google-fluentd-gem install fluent-plugin-record-reformer
|
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.
|
# 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"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
.PHONY: kbuild kpush
|
.PHONY: kbuild kpush
|
||||||
|
|
||||||
TAG = 1.11
|
TAG = 1.12
|
||||||
|
|
||||||
# Rules for building the test image for deployment to Dockerhub with user kubernetes.
|
# Rules for building the test image for deployment to Dockerhub with user kubernetes.
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: fluentd-cloud-logging
|
- name: fluentd-cloud-logging
|
||||||
image: gcr.io/google_containers/fluentd-gcp:1.11
|
image: gcr.io/google_containers/fluentd-gcp:1.12
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 200Mi
|
memory: 200Mi
|
||||||
env:
|
env:
|
||||||
- name: FLUENTD_ARGS
|
- name: FLUENTD_ARGS
|
||||||
value: -qq
|
value: -q
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: varlog
|
- name: varlog
|
||||||
mountPath: /varlog
|
mountPath: /varlog
|
||||||
|
@ -169,14 +169,14 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: fluentd-cloud-logging
|
- name: fluentd-cloud-logging
|
||||||
image: gcr.io/google_containers/fluentd-gcp:1.11
|
image: gcr.io/google_containers/fluentd-gcp:1.12
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 200Mi
|
memory: 200Mi
|
||||||
env:
|
env:
|
||||||
- name: FLUENTD_ARGS
|
- name: FLUENTD_ARGS
|
||||||
value: -qq
|
value: -q
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: varlog
|
- name: varlog
|
||||||
mountPath: /varlog
|
mountPath: /varlog
|
||||||
|
Loading…
Reference in New Issue
Block a user