Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
7e3b8a59
Commit
7e3b8a59
authored
Aug 15, 2017
by
Arve Knudsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Base Fluentd image off debian:stretch-slim for systemd with LZ4
parent
6dc567ab
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
18 deletions
+68
-18
fluentd-es-ds.yaml
cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml
+4
-4
Dockerfile
.../addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile
+4
-7
Makefile
...er/addons/fluentd-elasticsearch/fluentd-es-image/Makefile
+1
-1
clean-apt
...r/addons/fluentd-elasticsearch/fluentd-es-image/clean-apt
+29
-0
clean-install
...dons/fluentd-elasticsearch/fluentd-es-image/clean-install
+30
-0
run.sh
cluster/addons/fluentd-elasticsearch/fluentd-es-image/run.sh
+0
-6
No files found.
cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml
View file @
7e3b8a59
...
@@ -48,11 +48,11 @@ roleRef:
...
@@ -48,11 +48,11 @@ roleRef:
apiVersion
:
extensions/v1beta1
apiVersion
:
extensions/v1beta1
kind
:
DaemonSet
kind
:
DaemonSet
metadata
:
metadata
:
name
:
fluentd-es
name
:
fluentd-es
-v2.0.1
namespace
:
kube-system
namespace
:
kube-system
labels
:
labels
:
k8s-app
:
fluentd-es
k8s-app
:
fluentd-es
version
:
v2.0.
0
version
:
v2.0.
1
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/cluster-service
:
"
true"
addonmanager.kubernetes.io/mode
:
Reconcile
addonmanager.kubernetes.io/mode
:
Reconcile
spec
:
spec
:
...
@@ -61,7 +61,7 @@ spec:
...
@@ -61,7 +61,7 @@ spec:
labels
:
labels
:
k8s-app
:
fluentd-es
k8s-app
:
fluentd-es
kubernetes.io/cluster-service
:
"
true"
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
# This annotation ensures that fluentd does not get evicted if the node
# supports critical pod annotation based priority scheme.
# supports critical pod annotation based priority scheme.
# Note that this does not guarantee admission on the nodes (#40573).
# Note that this does not guarantee admission on the nodes (#40573).
...
@@ -71,7 +71,7 @@ spec:
...
@@ -71,7 +71,7 @@ spec:
serviceAccountName
:
fluentd-es
serviceAccountName
:
fluentd-es
containers
:
containers
:
-
name
:
fluentd-es
-
name
:
fluentd-es
image
:
gcr.io/google-containers/fluentd-elasticsearch:v2.0.
0
image
:
gcr.io/google-containers/fluentd-elasticsearch:v2.0.
1
env
:
env
:
-
name
:
FLUENTD_ARGS
-
name
:
FLUENTD_ARGS
value
:
--no-supervisor -q
value
:
--no-supervisor -q
...
...
cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile
View file @
7e3b8a59
...
@@ -19,8 +19,10 @@
...
@@ -19,8 +19,10 @@
# Note that fluentd is run with root permssion to allow access to
# Note that fluentd is run with root permssion to allow access to
# log files with root only access under /var/log/containers/*
# 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
COPY
Gemfile /Gemfile
# 1. Install & configure dependencies.
# 1. Install & configure dependencies.
...
@@ -31,18 +33,13 @@ RUN BUILD_DEPS="make gcc g++ libc6-dev ruby-dev" \
...
@@ -31,18 +33,13 @@ RUN BUILD_DEPS="make gcc g++ libc6-dev ruby-dev" \
&&
clean-install
$BUILD_DEPS
\
&&
clean-install
$BUILD_DEPS
\
ca-certificates
\
ca-certificates
\
libjemalloc1
\
libjemalloc1
\
liblz4-1
\
ruby
\
ruby
\
&&
echo
'gem: --no-document'
>>
/etc/gemrc
\
&&
echo
'gem: --no-document'
>>
/etc/gemrc
\
&&
gem
install
--file
Gemfile
\
&&
gem
install
--file
Gemfile
\
&&
apt-get purge
-y
--auto-remove
\
&&
apt-get purge
-y
--auto-remove
\
-o
APT::AutoRemove::RecommendsImportant
=
false
\
-o
APT::AutoRemove::RecommendsImportant
=
false
\
$BUILD_DEPS
\
$BUILD_DEPS
\
&&
rm
-rf
/tmp/
*
\
&&
clean-apt
\
/var/lib/apt/lists/
*
\
/usr/lib/ruby/gems/
*
/cache/
*
.gem
\
/var/log/
*
\
/var/tmp/
*
\
# Ensure fluent has enough file descriptors
# Ensure fluent has enough file descriptors
&& ulimit -n 65536
&& ulimit -n 65536
...
...
cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile
View file @
7e3b8a59
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
PREFIX
=
gcr.io/google-containers
PREFIX
=
gcr.io/google-containers
IMAGE
=
fluentd-elasticsearch
IMAGE
=
fluentd-elasticsearch
TAG
=
v2.0.
0
TAG
=
v2.0.
1
build
:
build
:
docker build
--pull
-t
$(PREFIX)
/
$(IMAGE)
:
$(TAG)
.
docker build
--pull
-t
$(PREFIX)
/
$(IMAGE)
:
$(TAG)
.
...
...
cluster/addons/fluentd-elasticsearch/fluentd-es-image/clean-apt
0 → 100755
View file @
7e3b8a59
#!/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/
*
cluster/addons/fluentd-elasticsearch/fluentd-es-image/clean-install
0 → 100755
View file @
7e3b8a59
#!/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
cluster/addons/fluentd-elasticsearch/fluentd-es-image/run.sh
View file @
7e3b8a59
...
@@ -20,10 +20,4 @@
...
@@ -20,10 +20,4 @@
# For systems without journald
# For systems without journald
mkdir
-p
/var/log/journal
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
$@
/usr/local/bin/fluentd
$@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment