Repository navigation
feat(fluentbit): add sidecarContainers to FluentbitSpec - #2359
Open
NopeCharon wants to merge 1 commit into
Open
NopeCharon wants to merge 1 commit into
NopeCharon wants to merge 1 commit into
Conversation
FluentdSpec has supported user-defined sidecar containers since 4.5, but the Fluent Bit DaemonSet only ever ran the operator-managed containers (fluent-bit, the optional config-reloader and the optional buffer metrics sidecar). Users who need a helper next to every collector, for example a liveness sidecar that restarts a fluent-bit that stopped shipping logs, had no way to add one. Add a sidecarContainers field to FluentbitSpec, mirroring the one on FluentdSpec, and append its containers to the DaemonSet pod template after the operator-managed containers. The field is available both on FluentbitAgent and on the legacy inline logging.spec.fluentbit, since both share FluentbitSpec. Regenerate the deepcopy functions, CRDs and API docs, and add a sample manifest that the field documentation links to. Fixes kube-logging#2333 Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
Promptless documentation updates
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FluentdSpechas supported user-definedsidecarContainerssince 4.5, but the Fluent Bit DaemonSet only ever ran the containers the operator manages itself (fluent-bit, the optional config-reloader and the optional buffer metrics sidecar). Fluent Bit already supports extra volumes and other pod tweaks, but there was no way to run a helper container next to each collector. The issue's example is a liveness sidecar that restarts a fluent-bit that has stopped shipping logs.This adds
sidecarContainerstoFluentbitSpec, mirroring the field onFluentdSpec. The containers are appended to the DaemonSet pod template after the operator-managed containers.FluentbitAgentand the legacy inlinelogging.spec.fluentbitshareFluentbitSpec, so the field works in both places.Deepcopy, CRDs (config and chart) and the API docs are regenerated. A sample manifest,
config/samples/fluentbit_sidecars.yaml, is added and linked from the field documentation.Test plan
TestDaemonSetSidecarContainersinpkg/resources/fluentbitcovers no sidecars, sidecars only, and sidecars together with the config-reloader and buffer metrics sidecar, where the user sidecars must come last. It fails without the change.Loggingand aFluentbitAgentwithsidecarContainersand ran the real reconciler. The field survived CRD schema pruning, and the generated DaemonSet had the containers[fluent-bit probe].make lint(all three modules) and thepkg/sdk/loggingandpkg/resources/fluentbittests pass.make codegen fmt manifests docsproduces no further diff.Fixes #2333