Skip to content

Conversation

@pengzhouml
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Fluent Bit hot reload and update support plus comprehensive e2e tests for log collection scenarios (disabled, partial, custom resources, custom filters). Key changes include: conditional ConfigMap update logic with patch comparison, enabling Fluent Bit HTTP server/metrics/hot_reload, and adjusting log volume mount to a Logs subPath.

  • Added e2e tests covering multiple LogCollection configurations (enable/disable, selective files, resources, filters).
  • Implemented patch-based reconciliation to update existing ConfigMaps when data changes and added hot reload/server settings to Fluent Bit configuration.
  • Modified StatefulSet Fluent Bit volume mount to use a subPath "Logs".

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.

File Description
test/e2e/6_log_collection_test.go New e2e tests for various LogCollection configurations and behaviors.
pkg/k8sutil/statefulset.go Added subPath "Logs" to Fluent Bit volume mount.
pkg/k8sutil/configmap.go Added patch-based update logic and hot reload / HTTP server settings to Fluent Bit ConfigMap generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 61 to 63
if !patchDiff.IsEmpty() {
logger.Info("MarkLogic ConfigMap data has changed, updating it")
configmap.Data = desiredConfigMap.Data
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Patch-based update logic here is duplicated in ReconcileFluentBitConfigMap; consider extracting a shared helper to reduce repetition and ensure consistent handling of annotations and future changes.

Copilot uses AI. Check for mistakes.
Comment on lines 121 to 123
if !patchDiff.IsEmpty() {
logger.Info("Fluent Bit ConfigMap data has changed, updating it")
configmap.Data = desiredConfigMap.Data
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Same patch/update pattern as earlier; refactoring into a generic ConfigMap reconcile helper would simplify maintenance and reduce risk of divergence.

Copilot uses AI. Check for mistakes.
Peng Zhou added 3 commits December 2, 2025 11:40
add sleep Wait for MarkLogic services to fully initialize
@pengzhouml pengzhouml merged commit d41d12b into develop Dec 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants