Skip to content

feat: push events to ephemeral volume if Loki disabled and stdout#879

Open
rohan2794 wants to merge 6 commits into
openebs:developfrom
rohan2794:push-events-loki-volume
Open

feat: push events to ephemeral volume if Loki disabled and stdout#879
rohan2794 wants to merge 6 commits into
openebs:developfrom
rohan2794:push-events-loki-volume

Conversation

@rohan2794

@rohan2794 rohan2794 commented Jun 3, 2026

Copy link
Copy Markdown

Description

  • Added support to log events to a JSON file on the pod's ephemeral volume when Loki is disabled.
  • Integrated the Rust clap crate for command-line argument parsing and configuration management.
  • Implemented log rotation for JSON event files to prevent unbounded file growth when Loki is not configured.

@rohan2794 rohan2794 requested a review from a team as a code owner June 3, 2026 11:48
@rohan2794 rohan2794 force-pushed the push-events-loki-volume branch 2 times, most recently from af17550 to fae2ba0 Compare June 4, 2026 06:15
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/Cargo.toml Outdated
Comment thread events-aggregator/Cargo.toml Outdated
Comment thread events-aggregator/src/exporter/engine.rs Outdated
Comment thread events-aggregator/src/exporter/engine.rs Outdated
@rohan2794 rohan2794 force-pushed the push-events-loki-volume branch 2 times, most recently from d97200e to 9fe9421 Compare June 10, 2026 09:32
@rohan2794 rohan2794 changed the title chore: push events to loki if enabled else log it into ephemeral volume chore: push events to ephemeral volume if Loki disabled Jun 10, 2026
@rohan2794 rohan2794 force-pushed the push-events-loki-volume branch 3 times, most recently from 69c1ac6 to 67f0095 Compare June 11, 2026 08:41

@tiagolobocastro tiagolobocastro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please update the title, we're also pushing to stdout?

Also there are not chores, it's feat

Comment thread events-aggregator/src/client/nats_client.rs Outdated
Comment thread events-aggregator/src/client/nats_client.rs Outdated
Comment thread events-aggregator/src/client/nats_client.rs Outdated
Comment thread events-aggregator/Cargo.toml Outdated
Comment thread events-aggregator/src/exporter/engine.rs Outdated
Comment thread events-aggregator/src/main.rs
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/exporter/engine.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the events-aggregator to support exporting events to a JSON file on pod-local ephemeral storage when Loki is disabled, and wires the new component into the Nix image build/release flow.

Changes:

  • Added a file-based batch exporter with simple rotation and size limiting for event JSON output.
  • Switched events-aggregator configuration to clap CLI parsing (NATS URL, JetStream toggle, Loki toggle, file export options).
  • Updated Nix packaging and release scripts to build and publish the new events.aggregator image.

Reviewed changes

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

Show a summary per file
File Description
scripts/release.sh Adds events.aggregator to the list of released images.
nix/pkgs/images/default.nix Introduces build-events-image and includes events images in the build set.
nix/pkgs/extensions/default.nix Adds the events extension derivation and installer for events-aggregator.
nix/pkgs/extensions/cargo-project.nix Includes events-aggregator in the all-in-one cargo build set.
events-aggregator/src/main.rs Adds clap-based CLI, exporter wiring, and updates message processing to forward compact JSON to exporter.
events-aggregator/src/exporter/mod.rs Defines exporter module exports for integration with main.rs.
events-aggregator/src/exporter/engine.rs Implements batching, retry loop, disk write, and rotation logic.
events-aggregator/src/constant.rs Centralizes constants for channels, timeouts, batching, and NATS settings.
events-aggregator/src/client/nats_client.rs Refactors to use shared constants and adjusts connection/timeouts and retry logic.
events-aggregator/Cargo.toml Updates dependencies to include clap/url/utils plus exporter dependencies.
Cargo.lock Captures new dependency graph changes (clap/parse-size/tracing-appender/etc).

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

Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/main.rs Outdated
Comment thread events-aggregator/src/exporter/engine.rs Outdated
rohan2794 added 5 commits June 12, 2026 09:06
Signed-off-by: rohan2794 <rohan2794@gmial.com>
Signed-off-by: rohan2794 <rohan2794@gmial.com>
Signed-off-by: rohan2794 <rohan2794@gmial.com>
Signed-off-by: rohan2794 <rohan2794@gmial.com>
…rotation guards

Signed-off-by: rohan2794 <rohan2794@gmial.com>
@rohan2794 rohan2794 force-pushed the push-events-loki-volume branch from cb1b35e to 690b1f9 Compare June 12, 2026 09:06
@rohan2794 rohan2794 changed the title chore: push events to ephemeral volume if Loki disabled feat: push events to ephemeral volume if Loki disabled and console Jun 12, 2026
@rohan2794 rohan2794 changed the title feat: push events to ephemeral volume if Loki disabled and console feat: push events to ephemeral volume if Loki disabled and stdout Jun 12, 2026
Signed-off-by: rohan2794 <rohan2794@gmial.com>
@rohan2794 rohan2794 force-pushed the push-events-loki-volume branch from 64e7149 to 4cb2a08 Compare June 15, 2026 11:38
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