Note that envvar cannot be used in include section
This PR is a short addition noting that environment variables cannot be used in the include section. Some users may attempt to use environment variables in the include section and eventually run into issues - often ending up at workaround discussions such as this one: https://github.com/fluent/fluent-bit/issues/2020
It would be great to add a note clarifying that the include section does not parse environment variables, and, if possible, include a link to the above issue as a reference for the workaround.
Thank you!
Summary by CodeRabbit
- Documentation
- Clarified that environment variables are not supported in include directives.
- Noted that included file paths must be specified as literal strings.
- Updated guidance to prevent confusion when referencing external configuration files, ensuring users supply explicit file paths rather than relying on variable expansion.
✏️ Tip: You can customize this high-level summary in your review settings.
Walkthrough
Added documentation clarifications stating that include directives in Fluent Bit do not support environment variables and that included file paths must be specified as literal strings.
Changes
| Cohort / File(s) | Summary |
|---|---|
Documentation — YAML includes administration/configuring-fluent-bit/yaml/includes-section.md |
Added note: environment variables are not supported in the includes section; file paths must be literal strings. |
Documentation — Classic mode include file administration/configuring-fluent-bit/classic-mode/configuration-file.md |
Added note to Include File section: environment variables are not supported in includes and included file paths must be literal strings. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
- Documentation-only changes; review wording and placement of the new note in both files.
Poem
🐰 I hop through docs with nibbling light,
I dot the rule in plain daylight,
No env vars here — just strings so true,
Paths penned plainly for me and you,
A tidy include, and off I bite.
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main change: adding a note clarifying that environment variables cannot be used in the include section of Fluent Bit documentation. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 9d03311c80b533497edfcee8595a3448f32e71f4 and c9bd723b8cb45c5bcbef44b966383bcf9971d7c5.
📒 Files selected for processing (2)
administration/configuring-fluent-bit/classic-mode/configuration-file.md(1 hunks)administration/configuring-fluent-bit/yaml/includes-section.md(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- administration/configuring-fluent-bit/yaml/includes-section.md
🔇 Additional comments (1)
administration/configuring-fluent-bit/classic-mode/configuration-file.md (1)
162-163: Clear and appropriately placed clarification. ✓The note documenting that environment variables aren't supported in includes is well-positioned at the end of the "Config include file" section, immediately after explaining the include mechanics. The text is direct and unambiguous.
Optional enhancement: Consider adding a reference to the related issue (https://github.com/fluent/fluent-bit/issues/2020) mentioned in the PR if linking workarounds is valuable for users encountering this limitation. This would help users find alternative approaches if they need dynamic include paths.
Please confirm that corresponding clarification notes have been added to the YAML configuration documentation as mentioned in the PR discussion, ensuring consistency across both configuration formats.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
@eschabell Hi, this is not updating to reflect code changes. This describes the current limitation of Fluent Bit's configuration syntax of YAML. So, we can :shipit:!
Is this a limitation of just the YAML format? I thought I'd used env vars for includes in classic before. We should call out the delta if so and/or update the classic docs as well.
@patrick-stephens Sorry for late reply. Yes, I'm pretty sure that it doesn't work on the classic config now. I specified them on the classic docs as well.