-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enable log collection for PersistentVolume and PersistentVolumeClaim * Multi process worker support - final set of changes * Updates to custom docker image instruction * V3.0.2 changelog, charts version changes * minor change for logs configmap template * add oci_images.tf; update dashboard import instructions * review comments, pull in change from PR#39 --------- Co-authored-by: Naga Raju Barri <naga.barri@oracle.com> Co-authored-by: paliwalparitosh <paritoshedx@gmail.com>
- Loading branch information
1 parent
de39606
commit 0efdaf6
Showing
19 changed files
with
810 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ rules: | |
- batch | ||
- discovery.k8s.io | ||
- metrics.k8s.io | ||
- storage.k8s.io | ||
resources: | ||
- '*' | ||
verbs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Copyright (c) 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
### Build the docker image using multi-stage build | ||
|
||
## To build/install all the dependencies | ||
|
||
FROM container-registry.oracle.com/os/oraclelinux:8-slim AS builder | ||
|
||
USER root | ||
WORKDIR /fluentd | ||
|
||
# Environment variables | ||
ENV PATH /fluentd/vendor/bundle/ruby/2.7.0/bin:$PATH | ||
ENV GEM_PATH /fluentd/vendor/bundle/ruby/2.7.0:$GEM_PATH | ||
ENV GEM_HOME /fluentd/vendor/bundle/ruby/2.7.0 | ||
# skip runtime bundler installation | ||
ENV FLUENTD_DISABLE_BUNDLER_INJECTION 1 | ||
|
||
COPY Gemfile* /fluentd/ | ||
|
||
# Install ruby, ruby-libs along with rubygems and bundler. | ||
RUN microdnf -y module enable ruby:2.7 \ | ||
# Install ruby (it's dependencies gdbm-libs) and ruby-libs, disabling week dependencies | ||
&& microdnf -y install --setopt=install_weak_deps=0 --nodocs ruby-2.7.6 ruby-libs-2.7.6 gdbm-libs \ | ||
# Install rubygems (it's dependencies rubygem-openssl rubygem-psych), disabling week dependencies | ||
&& microdnf -y install --setopt=install_weak_deps=0 --nodocs rubygems-3.1.6 \ | ||
&& gem install bundler -v 2.3.25 \ | ||
# Install development dependent packages for gems native installation | ||
&& microdnf -y install --nodocs gcc make redhat-rpm-config openssl ruby-devel gcc-c++ libtool libffi-devel bzip2 git \ | ||
# Install Fluentd, it's dependencies along with other run time dependencies for OCI Logging Analytics Solution | ||
&& bundle config silence_root_warning true \ | ||
&& bundle config --local path /fluentd/vendor/bundle \ | ||
&& bundle config --global jobs 9 \ | ||
&& bundle install --gemfile=/fluentd/Gemfile \ | ||
# Install tini, init for containers (from EPEL repo) | ||
&& microdnf -y install oracle-epel-release-el8 \ | ||
&& microdnf -y install tini-0.19.0 \ | ||
# Install jemalloc (custom make with no docs) | ||
&& cd /tmp && ls /tmp \ | ||
&& git clone -b 5.3.0 https://github.com/jemalloc/jemalloc.git && cd jemalloc/ \ | ||
&& ./autogen.sh && make && make install_bin install_include install_lib \ | ||
&& mv lib/libjemalloc.so.2 /usr/lib | ||
|
||
## To build the final docker image | ||
|
||
FROM container-registry.oracle.com/os/oraclelinux:8-slim | ||
|
||
USER root | ||
WORKDIR /fluentd | ||
|
||
# Environment variables | ||
ENV PATH /fluentd/vendor/bundle/ruby/2.7.0/bin:$PATH | ||
ENV GEM_PATH /fluentd/vendor/bundle/ruby/2.7.0:$GEM_PATH | ||
ENV GEM_HOME /fluentd/vendor/bundle/ruby/2.7.0 | ||
# skip runtime bundler installation | ||
ENV FLUENTD_DISABLE_BUNDLER_INJECTION 1 | ||
|
||
# Install ruby, ruby-libs along with rubygems and bundler. | ||
RUN microdnf -y module enable ruby:2.7 \ | ||
# Install ruby (it's dependencies gdbm-libs) and ruby-libs, disabling week dependencies | ||
&& microdnf -y install --setopt=install_weak_deps=0 --nodocs ruby-2.7.6 ruby-libs-2.7.6 gdbm-libs \ | ||
# Install rubygems (it's dependencies rubygem-openssl rubygem-psych), disabling week dependencies | ||
&& microdnf -y install --setopt=install_weak_deps=0 --nodocs rubygems-3.1.6 \ | ||
&& gem install bundler -v 2.3.25 \ | ||
&& bundle config --local path /fluentd/vendor/bundle \ | ||
# clear caches | ||
&& microdnf clean all \ | ||
&& rm -rf /var/cache/dnf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem | ||
|
||
# Copy binaries (tini & jemallco) and rubygems bundler environment from build stage | ||
COPY --from=builder /fluentd /fluentd | ||
COPY --from=builder /usr/bin/tini /usr/bin/tini | ||
COPY --from=builder /usr/lib/libjemalloc.so.2 /usr/lib/libjemalloc.so.2 | ||
|
||
RUN mkdir -p /fluentd/etc /fluentd/plugins \ | ||
&& touch /fluentd/etc/disable.conf | ||
|
||
# Environment variables | ||
ENV FLUENTD_CONF="/fluentd/etc/fluent.conf" | ||
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2" | ||
|
||
COPY entrypoint.sh /fluentd/entrypoint.sh | ||
# Give execution permission to entrypoint.sh | ||
RUN ["chmod", "+x", "/fluentd/entrypoint.sh"] | ||
|
||
# Overwrite ENTRYPOINT to run fluentd as root for /var/log / /var/lib | ||
ENTRYPOINT ["tini", "--", "/fluentd/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "oj", "3.14.1" | ||
gem "json", "2.6.3" | ||
gem "ext_monitor", "0.1.2" | ||
gem "fluentd", "1.15.3" | ||
gem "fluent-plugin-oci-logging-analytics", "2.0.5" | ||
gem "fluent-plugin-concat", "~> 2.5.0" | ||
gem "fluent-plugin-rewrite-tag-filter", "~> 2.4.0" | ||
gem "fluent-plugin-parser-cri", "~> 0.1.1" | ||
gem "fluent-plugin-kubernetes_metadata_filter", "2.13.0" | ||
gem "fluent-plugin-kubernetes-objects", "1.2.1" |
Oops, something went wrong.