Skip to content

Commit

Permalink
fixing runtime issue
Browse files Browse the repository at this point in the history
Signed-off-by: Rajat <[email protected]>
  • Loading branch information
Rajat0002 committed Dec 13, 2023
1 parent 1dc63b0 commit 140af36
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 102 deletions.
93 changes: 93 additions & 0 deletions community_images/fluent-bit/bitnami/config/fluent-bit.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[SERVICE]
# Flush
# =====
# set an interval of seconds before to flush records to a destination
flush 1

# Daemon
# ======
# instruct Fluent Bit to run in foreground or background mode.
daemon Off

# Log_Level
# =========
# Set the verbosity level of the service, values can be:
#
# - error
# - warning
# - info
# - debug
# - trace
#
# by default 'info' is set, that means it includes 'error' and 'warning'.
log_level info

# Parsers File
# ============
# specify an optional 'Parsers' configuration file
#parsers_file parsers.conf

# Plugins File
# ============
# specify an optional 'Plugins' configuration file to load external plugins.
#plugins_file plugins.conf

# HTTP Server
# ===========
# Enable/Disable the built-in HTTP Server for metrics
http_server Off
http_listen 0.0.0.0
http_port 2020

# Storage
# =======
# Fluent Bit can use memory and filesystem buffering based mechanisms
#
# - https://docs.fluentbit.io/manual/administration/buffering-and-storage
#
# storage metrics
# ---------------
# publish storage pipeline metrics in '/api/v1/storage'. The metrics are
# exported only if the 'http_server' option is enabled.
#
storage.metrics on

# storage.path
# ------------
# absolute file system path to store filesystem data buffers (chunks).
#
# storage.path /tmp/storage

# storage.sync
# ------------
# configure the synchronization mode used to store the data into the
# filesystem. It can take the values normal or full.
#
# storage.sync normal

# storage.checksum
# ----------------
# enable the data integrity check when writing and reading data from the
# filesystem. The storage layer uses the CRC32 algorithm.
#
# storage.checksum off

# storage.backlog.mem_limit
# -------------------------
# if storage.path is set, Fluent Bit will look for data chunks that were
# not delivered and are still in the storage layer, these are called
# backlog data. This option configure a hint of maximum value of memory
# to use when processing these records.
#
# storage.backlog.mem_limit 5M

[INPUT]
name cpu
tag cpu.local

# Read interval (sec) Default: 1
interval_sec 1

[OUTPUT]
name stdout
match *
2 changes: 2 additions & 0 deletions community_images/fluent-bit/bitnami/dc_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ sleep 10

# log for debugging
docker inspect "${CONTAINER_NAME}"
docker cp "${SCRIPTPATH}"/config/fluent-bit.config "${CONTAINER_NAME}":/tmp/fluent-bit.config
sleep 10
docker cp "${SCRIPTPATH}"/scripts/fluent-bit_coverage_script.sh "${CONTAINER_NAME}":/tmp/fluent-bit_coverage_script.sh
docker exec -i "${CONTAINER_NAME}" bash -c "bash /tmp/fluent-bit_coverage_script.sh"
3 changes: 2 additions & 1 deletion community_images/fluent-bit/bitnami/k8s_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ RELEASE_NAME=$(jq -r '.release_name' < "$JSON_PARAMS")

sleep 60
CONTAINER_NAME="${RELEASE_NAME}-0"

kubectl cp "${SCRIPTPATH}"/config/fluent-bit.config "${CONTAINER_NAME}":/tmp/fluent-bit.config -n "${NAMESPACE}"
sleep 10
# copy over the script to the pod
kubectl cp "${SCRIPTPATH}"/scripts/fluent-bit_coverage_script.sh "${CONTAINER_NAME}":/tmp/cvoverage_script.sh -n "${NAMESPACE}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
set -x

# Start Fluent Bit with the specified configuration file
/opt/bitnami/fluent-bit/bin/fluent-bit -c /opt/bitnami/fluent-bit/conf/fluent-bit.conf &
/opt/bitnami/fluent-bit/bin/fluent-bit -c /tmp/fluent-bit.conf &

# Add a delay to allow Fluent Bit to run (you can adjust this as needed)
# Capture the PID of the last background process
Expand Down
93 changes: 93 additions & 0 deletions community_images/fluent-bit/ironbank/config/fluent-bit.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[SERVICE]
# Flush
# =====
# set an interval of seconds before to flush records to a destination
flush 1

# Daemon
# ======
# instruct Fluent Bit to run in foreground or background mode.
daemon Off

# Log_Level
# =========
# Set the verbosity level of the service, values can be:
#
# - error
# - warning
# - info
# - debug
# - trace
#
# by default 'info' is set, that means it includes 'error' and 'warning'.
log_level info

# Parsers File
# ============
# specify an optional 'Parsers' configuration file
#parsers_file parsers.conf

# Plugins File
# ============
# specify an optional 'Plugins' configuration file to load external plugins.
#plugins_file plugins.conf

# HTTP Server
# ===========
# Enable/Disable the built-in HTTP Server for metrics
http_server Off
http_listen 0.0.0.0
http_port 2020

# Storage
# =======
# Fluent Bit can use memory and filesystem buffering based mechanisms
#
# - https://docs.fluentbit.io/manual/administration/buffering-and-storage
#
# storage metrics
# ---------------
# publish storage pipeline metrics in '/api/v1/storage'. The metrics are
# exported only if the 'http_server' option is enabled.
#
storage.metrics on

# storage.path
# ------------
# absolute file system path to store filesystem data buffers (chunks).
#
# storage.path /tmp/storage

# storage.sync
# ------------
# configure the synchronization mode used to store the data into the
# filesystem. It can take the values normal or full.
#
# storage.sync normal

# storage.checksum
# ----------------
# enable the data integrity check when writing and reading data from the
# filesystem. The storage layer uses the CRC32 algorithm.
#
# storage.checksum off

# storage.backlog.mem_limit
# -------------------------
# if storage.path is set, Fluent Bit will look for data chunks that were
# not delivered and are still in the storage layer, these are called
# backlog data. This option configure a hint of maximum value of memory
# to use when processing these records.
#
# storage.backlog.mem_limit 5M

[INPUT]
name cpu
tag cpu.local

# Read interval (sec) Default: 1
interval_sec 1

[OUTPUT]
name stdout
match *
99 changes: 0 additions & 99 deletions community_images/fluent-bit/ironbank/config/fluent-bit.yml

This file was deleted.

1 change: 1 addition & 0 deletions community_images/fluent-bit/ironbank/dc_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ sleep 10
# log for debugging
docker inspect "${CONTAINER_NAME}"
docker cp "${SCRIPTPATH}"/scripts/fluent-bit_coverage_script.sh "${CONTAINER_NAME}":/tmp/fluent-bit_coverage_script.sh
sleep 10
docker exec -i "${CONTAINER_NAME}" bash -c "bash /tmp/fluent-bit_coverage_script.sh"
2 changes: 2 additions & 0 deletions community_images/fluent-bit/ironbank/k8s_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ echo "RELEASE_NAME: $RELEASE_NAME"
sleep 60
CONTAINER_NAME="${RELEASE_NAME}-0"
# copy over the script to the pod
kubectl cp "${SCRIPTPATH}"/config/fluent-bit.config "${CONTAINER_NAME}":/tmp/fluent-bit.config -n "${NAMESPACE}"
sleep 10
kubectl cp "${SCRIPTPATH}"/scripts/fluent-bit_coverage_script.sh "${CONTAINER_NAME}":/tmp/fluent-bit_cvoverage_script.sh -n "${NAMESPACE}"

test_fluent-bit "${CONTAINER_NAME}" "${NAMESPACE}" "yes"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
set -x

# Start Fluent Bit with the specified configuration file
/fluent-bit/bin/fluent-bit -c /fluent-bit/etc/fluent-bit.conf &
/fluent-bit/bin/fluent-bit -c /tmp/fluent-bit.conf &


# Capture the PID of the last background process
Expand Down

0 comments on commit 140af36

Please sign in to comment.