Skip to content

Commit

Permalink
revert back to ruby3.2 for the v1.16 image due to various bugs in the…
Browse files Browse the repository at this point in the history
… base image

Signed-off-by: Peter Wilcsinszky <[email protected]>
  • Loading branch information
pepov committed Jan 15, 2024
1 parent 8dd735c commit f604b0c
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
fluentd:
- v1.16
- v1.16-ruby3.2
- v1.16-ruby3.3
image-type:
- base
- filters
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
fluentd:
- v1.16
- v1.16-ruby3.2
- v1.16-ruby3.3
image-type:
- base
- filters
Expand Down
1 change: 0 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"config:recommended"
],
"ignorePaths": [
"v1.16-ruby3.2/"
],
"automerge": true,
"major": {
Expand Down
15 changes: 7 additions & 8 deletions v1.16-ruby3.2/Dockerfile → v1.16-ruby3.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM public.ecr.aws/sumologic/kubernetes-fluentd:latest-alpine@sha256:b44e3526ae59b558576de5695aa5d6b1bdd4e0a080372f0f25d77a4d2092a476 AS sumo
# https://github.com/SumoLogic/sumologic-kubernetes-fluentd/blob/main/alpine.Dockerfile
# TODO every time the base image is changed please make sure BASEIMAGEDEPS is updated (further down in this file)
FROM public.ecr.aws/sumologic/kubernetes-fluentd:latest-alpine@sha256:9e8bf74ce59da466c2a38592626871f4ca7a04a3909aa6839790118f3c06024a AS sumo

# Adapted from https://github.com/SumoLogic/sumologic-kubernetes-fluentd/blob/main/alpine.Dockerfile#L102C1-L142C16
FROM ruby:3.2.2-alpine3.18 as base
FROM ruby:3.3.0-alpine3.19 as base

ARG BUILD_DEPS=" \
make gcc g++ libc-dev \
Expand All @@ -27,23 +28,21 @@ RUN apk add --no-cache \
tini libmaxminddb geoip \
snappy \
&& apk add --no-cache $BUILD_DEPS \
&& apk add --no-cache "libssl3>=3.1.4-r1" \
&& apk add --no-cache "libcrypto3>=3.1.4-r1" \
&& echo 'gem: --no-document' >> /etc/gemrc \

# BASEIMAGEDEPS
# need to rebuild these gems to have the extensions installed
&& fluent-gem install \
bigdecimal:1.4.4 \
oj:3.15.0 \
google-protobuf:3.21.12 \
nio4r:2.6.0 \
snappy:0.3.0 \
snappy:0.4.0 \
# The only required fluentd dependency is the label router
# kubeclient install is upgrading the one from the base image
&& fluent-gem install specific_install -v 0.3.8 \
&& fluent-gem specific_install -l https://github.com/ManageIQ/kubeclient.git --ref 054bff2c5e31a555004be2b3c4d32fb9dc5e6a0f \
&& fluent-gem specific_install -l https://github.com/kube-logging/fluent-plugin-label-router.git --ref 2ff43789f895735b7852e0a1a809280e22d9e8ef \
# TODO remove once the default version is greater than 0.12.1 https://avd.aquasec.com/nvd/2023/cve-2023-36617/
&& fluent-gem install uri -v 0.12.2 \
&& find /usr/local/bundle/gems/ -newer /etc/gemrc -exec chown fluent:fluent {} \; \
&& apk del $BUILD_DEPS \
&& rm -rf /usr/local/bundle/cache/* && find /usr/local/bundle -name '*.o' -delete
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 9 additions & 5 deletions v1.16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# https://github.com/SumoLogic/sumologic-kubernetes-fluentd/blob/main/alpine.Dockerfile
# TODO every time the base image is changed please make sure BASEIMAGEDEPS is updated (further down in this file)
FROM public.ecr.aws/sumologic/kubernetes-fluentd:latest-alpine@sha256:9e8bf74ce59da466c2a38592626871f4ca7a04a3909aa6839790118f3c06024a AS sumo
FROM public.ecr.aws/sumologic/kubernetes-fluentd:latest-alpine@sha256:b44e3526ae59b558576de5695aa5d6b1bdd4e0a080372f0f25d77a4d2092a476 AS sumo

FROM ruby:3.3.0-alpine3.19 as base
# Adapted from https://github.com/SumoLogic/sumologic-kubernetes-fluentd/blob/main/alpine.Dockerfile#L102C1-L142C16
FROM ruby:3.2.2-alpine3.18 as base

ARG BUILD_DEPS=" \
make gcc g++ libc-dev \
Expand All @@ -28,21 +28,25 @@ RUN apk add --no-cache \
tini libmaxminddb geoip \
snappy \
&& apk add --no-cache $BUILD_DEPS \
&& apk add --no-cache "libssl3>=3.1.4-r1" \
&& apk add --no-cache "libcrypto3>=3.1.4-r1" \
&& echo 'gem: --no-document' >> /etc/gemrc \

# BASEIMAGEDEPS
# need to rebuild these gems to have the extensions installed
&& fluent-gem install \
bigdecimal:1.4.4 \
oj:3.15.0 \
google-protobuf:3.21.12 \
nio4r:2.6.0 \
snappy:0.4.0 \
snappy:0.3.0 \
# The only required fluentd dependency is the label router
# kubeclient install is upgrading the one from the base image
&& fluent-gem install specific_install -v 0.3.8 \
&& fluent-gem specific_install -l https://github.com/ManageIQ/kubeclient.git --ref 054bff2c5e31a555004be2b3c4d32fb9dc5e6a0f \
&& fluent-gem specific_install -l https://github.com/kube-logging/fluent-plugin-label-router.git --ref 2ff43789f895735b7852e0a1a809280e22d9e8ef \
# TODO remove once the default version is greater than 0.12.1 https://avd.aquasec.com/nvd/2023/cve-2023-36617/
&& fluent-gem install uri -v 0.12.2 \
&& find /usr/local/bundle/gems/ -newer /etc/gemrc -exec chown fluent:fluent {} \; \
&& apk del $BUILD_DEPS \
&& rm -rf /usr/local/bundle/cache/* && find /usr/local/bundle -name '*.o' -delete
Expand Down

0 comments on commit f604b0c

Please sign in to comment.