mirror of https://github.com/k3s-io/k3s
Base Fluentd image off debian:stretch-slim for systemd with LZ4
parent
6dc567abb9
commit
7e3b8a59dc
|
@ -48,11 +48,11 @@ roleRef:
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: fluentd-es
|
||||
name: fluentd-es-v2.0.1
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: fluentd-es
|
||||
version: v2.0.0
|
||||
version: v2.0.1
|
||||
kubernetes.io/cluster-service: "true"
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
spec:
|
||||
|
@ -61,7 +61,7 @@ spec:
|
|||
labels:
|
||||
k8s-app: fluentd-es
|
||||
kubernetes.io/cluster-service: "true"
|
||||
version: v2.0.0
|
||||
version: v2.0.1
|
||||
# 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).
|
||||
|
@ -71,7 +71,7 @@ spec:
|
|||
serviceAccountName: fluentd-es
|
||||
containers:
|
||||
- name: fluentd-es
|
||||
image: gcr.io/google-containers/fluentd-elasticsearch:v2.0.0
|
||||
image: gcr.io/google-containers/fluentd-elasticsearch:v2.0.1
|
||||
env:
|
||||
- name: FLUENTD_ARGS
|
||||
value: --no-supervisor -q
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
# Note that fluentd is run with root permssion to allow access to
|
||||
# log files with root only access under /var/log/containers/*
|
||||
|
||||
FROM gcr.io/google-containers/debian-base-amd64:0.1
|
||||
FROM debian:stretch-slim
|
||||
|
||||
COPY clean-apt /usr/bin
|
||||
COPY clean-install /usr/bin
|
||||
COPY Gemfile /Gemfile
|
||||
|
||||
# 1. Install & configure dependencies.
|
||||
|
@ -31,18 +33,13 @@ RUN BUILD_DEPS="make gcc g++ libc6-dev ruby-dev" \
|
|||
&& clean-install $BUILD_DEPS \
|
||||
ca-certificates \
|
||||
libjemalloc1 \
|
||||
liblz4-1 \
|
||||
ruby \
|
||||
&& echo 'gem: --no-document' >> /etc/gemrc \
|
||||
&& gem install --file Gemfile \
|
||||
&& apt-get purge -y --auto-remove \
|
||||
-o APT::AutoRemove::RecommendsImportant=false \
|
||||
$BUILD_DEPS \
|
||||
&& rm -rf /tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/usr/lib/ruby/gems/*/cache/*.gem \
|
||||
/var/log/* \
|
||||
/var/tmp/* \
|
||||
&& clean-apt \
|
||||
# Ensure fluent has enough file descriptors
|
||||
&& ulimit -n 65536
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
PREFIX = gcr.io/google-containers
|
||||
IMAGE = fluentd-elasticsearch
|
||||
TAG = v2.0.0
|
||||
TAG = v2.0.1
|
||||
|
||||
build:
|
||||
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# A script encapsulating a common Dockerimage pattern for installing packages
|
||||
# and then cleaning up the unnecessary install artifacts.
|
||||
# e.g. clean-install iptables ebtables conntrack
|
||||
|
||||
set -o errexit
|
||||
|
||||
apt-get clean -y
|
||||
rm -rf \
|
||||
/var/cache/debconf/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/log/* \
|
||||
/tmp/* \
|
||||
/var/tmp/*
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# A script encapsulating a common Dockerimage pattern for installing packages
|
||||
# and then cleaning up the unnecessary install artifacts.
|
||||
# e.g. clean-install iptables ebtables conntrack
|
||||
|
||||
set -o errexit
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo >&2 "No packages specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends $@
|
||||
clean-apt
|
|
@ -20,10 +20,4 @@
|
|||
# For systems without journald
|
||||
mkdir -p /var/log/journal
|
||||
|
||||
# Copy host libsystemd into image to avoid compatibility issues.
|
||||
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
|
||||
|
||||
/usr/local/bin/fluentd $@
|
||||
|
|
Loading…
Reference in New Issue