Skip to content

Commit 01e73d3

Browse files
committed
feat(fluentd): use official fluent/fluentd:1.3 docker image
1 parent d094f5f commit 01e73d3

33 files changed

Lines changed: 49 additions & 494 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
manifests/*.tmp.yaml
2-
rootfs/opt/fluentd/deis-output/pkg
2+
rootfs/fluentd/deis-output/pkg
33
rootfs/*.gem

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ docker-build:
1313
docker tag ${IMAGE} ${MUTABLE_IMAGE}
1414

1515
test: docker-build
16-
docker run ${IMAGE} /bin/bash -c "cd /opt/fluentd/deis-output && rake test"
16+
docker run ${IMAGE} /bin/bash -c "cd /fluentd/deis-output && rake test"
1717

1818
install:
1919
helm upgrade fluentd charts/fluentd --install --namespace deis --set org=${IMAGE_PREFIX},docker_tag=${VERSION}

charts/fluentd/templates/logger-fluentd-clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
heritage: deis
1010
rules:
1111
- apiGroups: [""]
12-
resources: ["pods"]
12+
resources: ["pods", "namespaces"]
1313
verbs: ["list", "get", "watch"]
1414
{{- end -}}
1515
{{- end -}}

rootfs/Dockerfile

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,27 @@
1-
FROM quay.io/deis/base:v0.3.6
1+
FROM fluent/fluentd:v1.3
22

3-
COPY . /
3+
COPY fluentd /fluentd
4+
COPY entrypoint.sh /bin/
5+
RUN chmod +x /bin/entrypoint.sh
46

5-
RUN buildDeps='g++ gcc make ruby-dev'; \
6-
apt-get update && \
7-
apt-get install -y \
8-
$buildDeps \
9-
ruby && \
10-
export FLUENTD_VERSION=0.14.13 && \
11-
gem install --no-document fluentd -v $FLUENTD_VERSION && \
12-
gem install bundler && \
13-
bundle install --gemfile=/opt/fluentd/deis-output/Gemfile && \
14-
rake --rakefile=/opt/fluentd/deis-output/Rakefile build && \
15-
fluent-gem install --no-document fluent-plugin-kubernetes_metadata_filter -v 0.25.3 && \
16-
fluent-gem install --no-document fluent-plugin-elasticsearch -v 2.3.0 && \
17-
fluent-gem install --no-document fluent-plugin-remote_syslog -v 0.3.2 && \
18-
fluent-gem install --no-document fluent-plugin-sumologic-mattk42 -v 0.0.4 && \
19-
fluent-gem install --no-document fluent-plugin-gelf-hs -v 1.0.4 && \
20-
fluent-gem install --no-document influxdb -v 0.3.2 && \
21-
fluent-gem install --no-document nsq-ruby -v 1.7.0 && \
22-
fluent-gem install --local /opt/fluentd/deis-output/pkg/fluent-plugin-deis_output-0.1.0.gem && \
23-
# cleanup
24-
apt-get purge -y --auto-remove $buildDeps && \
25-
apt-get autoremove -y && \
26-
apt-get clean -y && \
27-
# package up license files if any by appending to existing tar
28-
COPYRIGHT_TAR='/usr/share/copyrights.tar'; \
29-
gunzip -f $COPYRIGHT_TAR.gz; tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright; gzip $COPYRIGHT_TAR && \
30-
rm -rf \
31-
/usr/share/doc \
32-
/usr/share/man \
33-
/usr/share/info \
34-
/usr/share/locale \
35-
/var/lib/apt/lists/* \
36-
/var/log/* \
37-
/var/cache/debconf/* \
38-
/etc/systemd \
39-
/lib/lsb \
40-
/lib/udev \
41-
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
42-
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
43-
bash -c "mkdir -p /usr/share/man/man{1..8}"
7+
RUN apk add bash findutils
8+
RUN apk add --update --virtual .build-deps sudo build-base ruby-dev \
9+
&& gem install bundler \
10+
&& bundle config --global silence_root_warning 1 \
11+
&& bundle install --gemfile=/fluentd/deis-output/Gemfile \
12+
&& rake --rakefile=/fluentd/deis-output/Rakefile build \
13+
&& fluent-gem install --no-document fluent-plugin-kubernetes_metadata_filter -v 2.1.4 \
14+
&& fluent-gem install --no-document fluent-plugin-elasticsearch -v 2.12.0 \
15+
&& fluent-gem install --no-document fluent-plugin-remote_syslog -v 1.0.0 \
16+
&& fluent-gem install --no-document fluent-plugin-sumologic-mattk42 -v 0.0.4 \
17+
&& fluent-gem install --no-document fluent-plugin-gelf-hs -v 1.0.7 \
18+
&& fluent-gem install --no-document influxdb -v 0.6.1 \
19+
&& fluent-gem install --no-document nsq-ruby -v 2.3.1 \
20+
&& fluent-gem install --local /fluentd/deis-output/pkg/fluent-plugin-deis_output-0.1.0.gem \
21+
&& sudo gem sources --clear-all \
22+
&& apk del .build-deps \
23+
&& rm -rf /var/cache/apk/* /root/.gem/ruby/*/cache/*.gem
4424

45-
COPY /var /var
25+
ENTRYPOINT ["/bin/entrypoint.sh"]
4626

47-
CMD ["/opt/fluentd/sbin/boot"]
27+
CMD ["/fluentd/sbin/boot"]

rootfs/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/dumb-init /bin/sh
2+
3+
exec "$@"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)