Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing the fluent-bit-ib #407

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions community_images/fluent-bit/ironbank/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ runtimes:
tag: "FLUENT_BIT_IMAGE_TAG"
- type: k8s
script: k8s_coverage.sh
helm:
repo: fluent
repo_url: https://fluent.github.io/helm-charts
chart: fluent-bit
use_helm: False
wait_time_sec: 120
image_keys:
fluent-bit-ib:
repository: "image.repository"
tag: "image.tag"
override_file: "overrides.yml"
override_file: "overrides.yml"
readiness_wait_pod_name_suffix:
- ""
11 changes: 6 additions & 5 deletions community_images/fluent-bit/ironbank/k8s_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"

JSON_PARAMS="$1"

#JSON=$(cat "$JSON_PARAMS")
JSON=$(cat "$JSON_PARAMS")
echo "Json params for k8s coverage = $JSON"
NAMESPACE=$(jq -r '.namespace_name' < "$JSON_PARAMS")
RELEASE_NAME=$(jq -r '.release_name' < "$JSON_PARAMS")
echo "NAMESPACE: $NAMESPACE"
echo "RELEASE_NAME: $RELEASE_NAME"

sleep 10
CONTAINER_NAME=$(kubectl get pods -n "$NAMESPACE" -l "app.kubernetes.io/instance=$RELEASE_NAME" -o jsonpath='{.items[0].metadata.name}')
# copy over the script to the pod
kubectl cp "${SCRIPTPATH}"/config/fluent-bit.config "${CONTAINER_NAME}":/tmp/fluent-bit.config -n "${NAMESPACE}"
kubectl exec "${CONTAINER_NAME}" -n "${NAMESPACE}" -- /bin/bash -c "nohup /fluent-bit/bin/fluent-bit -c /tmp/fluent-bit.config" &

CONTAINER_NAME="$RELEASE_NAME"
AnmolVirdi marked this conversation as resolved.
Show resolved Hide resolved

kubectl exec -n "${NAMESPACE}" "${CONTAINER_NAME}" -- /bin/bash -c "/fluent-bit/bin/fluent-bit -c /etc/fluent-bit.conf" &
sleep 10
# Check if the process is still running and terminate it if needed
if ps -p $! > /dev/null; then
Expand Down
2 changes: 0 additions & 2 deletions community_images/fluent-bit/ironbank/overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ containerSecurityContext:
allowPrivilegeEscalation: true
capabilities:
add: ["SYS_PTRACE"]
resourceType: deployment
AnmolVirdi marked this conversation as resolved.
Show resolved Hide resolved
replicaCount: 1
extraEnvVars:
- name: "RF_VERBOSE"
value: "0"
Expand Down
Loading