Fluentbit Development and Maintenance Guide📜
To Update the Fluentbit Package📜
NOTE: The fluentbit chart has been converted to the passthrough pattern and no longer uses kpt.
-
Navigate to the upstream fluentbit helm chart repo and find the latest chart version that works with the current major version of the associated Iron Bank image. For example, if updating to 1.8.11 I would look at the Chart.yaml
appVersionfield and switch through the latest git tags until I find one that matches 1.x.y. -
git clonethe fluentbit repository from Repo1 and checkout therenovate/ironbankbranch. -
Update the chart version in
./chart/Chart.yamland append or bump the-bb.0suffix (if missing or incorrect) to the chart version from upstream. -
Ensure the Big Bang
./chart/Chart.yamland the target upstream versionChart.yamlalign correctly with the following:- Check
appVersionin./chart/Chart.yamlto make sure it has updated to the correct version - Check the upstream chart dependencies and compare the dependency versions against the corresponding image tags in
./chart/values.yamlto make sure they match
NOTE: The Renovate issue may be blocked by one of the following conditions: - The upstream chart expects a newer image tag that does not yet exist in Iron Bank - If so, ensure that an issue exists in the associated Iron Bank container repository to track the upgrade version. Link the Iron Bank issue to the package Renovate issue for tracking purposes. - There is a newer image tag in Iron Bank, but is not yet supported or tested by upstream - If the newer image is a major version bump and/or contains breaking changes, the Renovate issue can be moved to
status::blockeduntil the upstream chart catches up. If the newer image is only a patch or minor version bump, you can proceed with the Renovate (upgrading the image beyond the version referenced in the upstream chart). - Check
-
Update
upstream.image.tagin./chart/values.yamlto match the updated version in Iron Bank. -
Update the
helm.sh/imagesannotations in./chart/Chart.yamlto match updated versions in Iron Bank. -
Update dependencies and binaries using
helm dependency update ./chart. -
Update
CHANGELOG.mdadding an entry for the new version and noting all changes (at minimum should includeUpdated fluentbit to x.x.x). -
Generate the
README.mdupdates by following the guide in gluon. -
(Optional, only required if package changes are expected to have cascading effects on bigbang umbrella chart) As part of your MR that modifies bigbang packages, you should modify the bigbang bigbang/tests/test-values.yaml to target your branch for CI/CD MR testing.
- At a minimum, follow the instructions at bigbang/docs/community/development/test-package-against-bb.md with Fluent Bit enabled. The example below is a reference; additional changes may be required depending on the package MR.
fluentbit: enabled: true git: tag: null branch: renovate/ironbank values: istio: enabled: true sidecar: enabled: true ### Additional components of fluentbit should be changed to reflect testing changes introduced in the package MR -
Complete the manual testing steps in the following section.
-
Once all manual testing is complete, take your MR out of “Draft” status, assign reviewers, and add the review label.
Manual Testing for Updates📜
NOTE: For these testing steps it is good to do them on both a clean install and an upgrade. For clean install, point fluentbit to your branch. For an upgrade do an install with fluentbit pointing to the latest tag, then perform a helm upgrade with fluentbit pointing to your branch.
Refer to docs/dev-overrides.yaml for YAML values to deploy against Big Bang.
Testing Steps:
- Login to Prometheus, validate under Status -> Targets that all fluentbit targets are showing as up
- Login to Grafana, then navigate to Dashboards -> fluentbit-fluent-bit and validate that the dashboard displays data
- Login to Kibana, then navigate to https://kibana.dev.bigbang.mil/app/management/kibana/indexPatterns and create a data view for logstash-*
- Navigate to Analytics -> Discover and validate that pod logs are appearing in the logstash index pattern
If Kyverno is not enabled, copy the following secrets from the logging namespace to fluentbit to test log shipping to Elasticsearch:
logging-ek-es-http-certs-publiclogging-ek-es-elastic-user
The following commands remove source-object metadata before applying each secret in the target namespace. The yq installation instructions are available here.
kubectl get secret -n logging logging-ek-es-http-certs-public -o yaml | yq 'del(.metadata.creationTimestamp, .metadata.resourceVersion, .metadata.uid, .metadata.ownerReferences) | .metadata.namespace = "fluentbit"' | kubectl apply -f -
kubectl get secret -n logging logging-ek-es-elastic-user -o yaml | yq 'del(.metadata.creationTimestamp, .metadata.resourceVersion, .metadata.uid, .metadata.ownerReferences) | .metadata.namespace = "fluentbit"' | kubectl apply -f -
When in doubt with any testing or upgrade steps ask one of the CODEOWNERS for assistance.