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
5753a319
Commit
5753a319
authored
Jul 29, 2016
by
Manuel de Brito Fontes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce the size of fluentd images
parent
b1737900
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
34 deletions
+69
-34
Dockerfile
.../addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile
+4
-17
Makefile
...er/addons/fluentd-elasticsearch/fluentd-es-image/Makefile
+1
-1
build.sh
...er/addons/fluentd-elasticsearch/fluentd-es-image/build.sh
+45
-0
Dockerfile
cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile
+16
-13
Makefile
cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile
+1
-1
fluentd-es.yaml
cluster/saltbase/salt/fluentd-es/fluentd-es.yaml
+1
-1
fluentd-gcp.yaml
cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml
+1
-1
No files found.
cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile
View file @
5753a319
...
...
@@ -22,7 +22,7 @@
# Please see http://docs.fluentd.org/articles/install-by-deb for more
# information about installing fluentd using deb package.
FROM
ubuntu:14.04
FROM
gcr.io/google_containers/ubuntu-slim:0.3
MAINTAINER
Alex Robinson "arob@google.com"
MAINTAINER
Jimmi Dyson "jimmidyson@gmail.com"
...
...
@@ -32,24 +32,11 @@ RUN ulimit -n 65536
# Disable prompts from apt.
ENV
DEBIAN_FRONTEND noninteractive
# Install prerequisites.
RUN
apt-get update
&&
\
apt-get
install
-y
-q
curl make g++
&&
\
apt-get clean
&&
\
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
# Install Fluentd.
RUN
/usr/bin/curl
-L
https://td-toolbelt.herokuapp.com/sh/install-ubuntu-trusty-td-agent2.sh | sh
# Change the default user and group to root.
# Needed to allow access to /var/log/docker/... files.
RUN
sed
-i
-e
"s/USER=td-agent/USER=root/"
-e
"s/GROUP=td-agent/GROUP=root/"
/etc/init.d/td-agent
# Install the Elasticsearch Fluentd plug-in.
RUN
td-agent-gem
install
fluent-plugin-kubernetes_metadata_filter fluent-plugin-elasticsearch
# Copy the Fluentd configuration file.
COPY
td-agent.conf /etc/td-agent/td-agent.conf
COPY
build.sh /tmp/build.sh
RUN
/tmp/build.sh
# Run the Fluentd service.
ENTRYPOINT
["td-agent"]
cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile
View file @
5753a319
...
...
@@ -15,7 +15,7 @@
.PHONY
:
build push
IMAGE
=
fluentd-elasticsearch
TAG
=
1.1
7
TAG
=
1.1
9
build
:
docker build
-t
gcr.io/google_containers/
$(IMAGE)
:
$(TAG)
.
...
...
cluster/addons/fluentd-elasticsearch/fluentd-es-image/build.sh
0 → 100755
View file @
5753a319
#!/bin/sh
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# 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.
# Install prerequisites.
apt-get update
apt-get
install
-y
-q
--no-install-recommends
\
curl ca-certificates make g++
sudo
bash
# Install Fluentd.
/usr/bin/curl
-sSL
https://toolbelt.treasuredata.com/sh/install-ubuntu-xenial-td-agent2.sh | sh
# Change the default user and group to root.
# Needed to allow access to /var/log/docker/... files.
sed
-i
-e
"s/USER=td-agent/USER=root/"
-e
"s/GROUP=td-agent/GROUP=root/"
/etc/init.d/td-agent
# Install the Elasticsearch Fluentd plug-in.
td-agent-gem
install
fluent-plugin-kubernetes_metadata_filter fluent-plugin-elasticsearch
# Remove docs and postgres references
rm
-rf
/opt/td-agent/embedded/share/doc
\
/opt/td-agent/embedded/share/gtk-doc
\
/opt/td-agent/embedded/lib/postgresql
\
/opt/td-agent/embedded/bin/postgres
\
/opt/td-agent/embedded/share/postgresql
apt-get remove
-y
make g++
apt-get autoremove
-y
apt-get clean
-y
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile
View file @
5753a319
...
...
@@ -20,7 +20,7 @@
# scope and that the Logging API has been enabled for the project
# in the Google Developer Console.
FROM
ubuntu:16.04
FROM
gcr.io/google_containers/ubuntu-slim:0.3
MAINTAINER
Alex Robinson "arob@google.com"
# Disable prompts from apt.
...
...
@@ -29,19 +29,22 @@ ENV DEBIAN_FRONTEND noninteractive
ENV
DO_NOT_INSTALL_CATCH_ALL_CONFIG true
RUN
apt-get
-q
update
&&
\
apt-get
install
-y
curl
&&
\
apt-get
install
-y
gcc
&&
\
apt-get
install
-y
make
&&
\
apt-get
install
-y
curl ca-certificates gcc make bash
&&
\
apt-get
install
-y
--reinstall
lsb-base lsb-release
&&
\
echo
"Installing logging agent"
&&
\
curl
-sSL
https://dl.google.com/cloudagents/install-logging-agent.sh | bash
&&
\
/usr/sbin/google-fluentd-gem
install
fluent-plugin-record-reformer
-v
0.8.1
&&
\
/usr/sbin/google-fluentd-gem
install
fluent-plugin-systemd
-v
0.0.3
&&
\
apt-get remove
-y
gcc make
&&
\
apt-get autoremove
-y
&&
\
apt-get clean
&&
\
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
&&
\
curl
-s
https://dl.google.com/cloudagents/install-logging-agent.sh | bash
# Install the record reformer and systemd plugins.
RUN
/usr/sbin/google-fluentd-gem
install
fluent-plugin-record-reformer
-v
0.8.1
RUN
/usr/sbin/google-fluentd-gem
install
fluent-plugin-systemd
-v
0.0.3
# Remove the misleading log file that gets generated when the agent is installed
RUN
rm
-rf
/var/log/google-fluentd
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
\
/opt/google-fluentd/embedded/share/doc
\
/opt/google-fluentd/embedded/share/gtk-doc
\
/opt/google-fluentd/embedded/lib/postgresql
\
/opt/google-fluentd/embedded/bin/postgres
\
/opt/google-fluentd/embedded/share/postgresql
\
/var/log/google-fluentd
# Copy the Fluentd configuration files for logging Docker container logs.
# Either configuration file can be used by specifying `-c <file>` as a command
...
...
cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile
View file @
5753a319
...
...
@@ -28,7 +28,7 @@
.PHONY
:
kbuild kpush
TAG
=
1.2
1
TAG
=
1.2
2
# Rules for building the test image for deployment to Dockerhub with user kubernetes.
...
...
cluster/saltbase/salt/fluentd-es/fluentd-es.yaml
View file @
5753a319
...
...
@@ -8,7 +8,7 @@ metadata:
spec
:
containers
:
-
name
:
fluentd-elasticsearch
image
:
gcr.io/google_containers/fluentd-elasticsearch:1.17
image
:
aledbf/fluentd-elasticsearch:1.19
resources
:
limits
:
memory
:
200Mi
...
...
cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml
View file @
5753a319
...
...
@@ -11,7 +11,7 @@ spec:
dnsPolicy
:
Default
containers
:
-
name
:
fluentd-cloud-logging
image
:
gcr.io/google_containers/fluentd-gcp:1.21
image
:
aledbf/fluentd-gcp:1.22
resources
:
limits
:
memory
:
200Mi
...
...
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