Skip to content

fix: preserve associated aggregator on multiple detached configs#2232

Merged
csatib02 merged 3 commits into
masterfrom
fix/preserve-associated-syslogng-fluentd-on-excess
May 5, 2026
Merged

fix: preserve associated aggregator on multiple detached configs#2232
csatib02 merged 3 commits into
masterfrom
fix/preserve-associated-syslogng-fluentd-on-excess

Conversation

@csatib02
Copy link
Copy Markdown
Member

@csatib02 csatib02 commented May 5, 2026

Creating a second FluentdConfig / SyslogNGConfig in the control namespace tore down the running aggregator instead of flagging the new one as excess.

Fix: When multiple detached configs exist, looking up Logging.Status.{Fluentd,SyslogNG}ConfigName and keep that one as Configuration. Stale reference (named config no longer exists) falls through to the existing all-excess behavior.
Also fixed a copy-paste typo in while handling excess SyslogNG.

csatib02 added 2 commits May 5, 2026 10:18
Signed-off-by: Bence Csati <bence.csati@axoflow.com>
Signed-off-by: Bence Csati <bence.csati@axoflow.com>
@promptless-for-oss
Copy link
Copy Markdown

Promptless prepared a documentation update related to this change.

Triggered by PR #2232

Clarified in the FluentdConfig and SyslogNGConfig docs that when multiple configs exist, the previously-associated aggregator continues running and log forwarding remains uninterrupted while users resolve the excess configuration conflict.

Review: Clarify excess config behavior preserves running aggregator

When a second FluentdConfig or SyslogNGConfig was created in the
control namespace, FluentdConfigFor/SyslogNGConfigFor returned a nil
Configuration. The reconciler then cleared
Logging.Status.{Fluentd,SyslogNG}ConfigName and the finalizer logic in
LoggingReconciler.{fluentd,syslogNG}ConfigFinalizer removed the
finalizer because externalConfig was nil. The running aggregator
StatefulSet got de-associated and log forwarding broke - even though
the user only added a redundant CRD that should have been flagged as
excess.

Preserve the previously-associated configuration (looked up via
Logging.Status.{Fluentd,SyslogNG}ConfigName) when multiple detached
configs exist. Stale references (the named config no longer exists)
fall through to the existing all-excess behavior.

Adds regression tests for both paths plus the stale-association case.

Surfaced by flaky e2e TestSyslogNGDetachedIsRunningAndForwardingLogs.

Signed-off-by: Bence Csati <bence.csati@axoflow.com>
@csatib02 csatib02 force-pushed the fix/preserve-associated-syslogng-fluentd-on-excess branch from 03ccd9d to 7181e34 Compare May 5, 2026 09:02
@csatib02 csatib02 merged commit bbb9bb1 into master May 5, 2026
33 checks passed
@csatib02 csatib02 deleted the fix/preserve-associated-syslogng-fluentd-on-excess branch May 5, 2026 16:36
fekete-robert pushed a commit to kube-logging/kube-logging.github.io that referenced this pull request May 12, 2026
When multiple FluentdConfig or SyslogNGConfig resources exist in the
same namespace, the documentation now clearly states that:
- The previously-associated config continues to operate normally
- Log forwarding remains uninterrupted while resolving the conflict
- Users should delete the excess config to resolve the issue

Also standardized SyslogNGConfig capitalization.

Related: kube-logging/logging-operator#2232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants