Skip to content

feat(event-ledger): add Helm chart for self-hosted stack - #762

Open
shelleyshen-0 wants to merge 12 commits into
mainfrom
feat/event-ledger-helm-chart
Open

feat(event-ledger): add Helm chart for self-hosted stack#762
shelleyshen-0 wants to merge 12 commits into
mainfrom
feat/event-ledger-helm-chart

Conversation

@shelleyshen-0

@shelleyshen-0 shelleyshen-0 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Closes #168

Summary

  • Adds deploy/helm/event-ledger Helm chart for deploying the event-ledger service in the self-hosted NVCF stack
  • Fixes Cassandra contact point hostname (cassandra.cassandra-system.svc.cluster.local)
  • Bumps nvcf-cassandra-migrations to 0.16.0 and nvcf-openbao-migrations to 0.18.0-test (pending official release)

Test plan

  • Deployed and verified on ARM64 colossus k3d cluster
  • Event-ledger pod reaches 2/2 Running with Cassandra connected and API server started on :8080
  • OpenBao migration 22_setup_event-ledger ran successfully via 0.18.0-test image
  • Cassandra event_ledger keyspace created via 0.16.0 migrations image
  • Pending: update nvcf-openbao-migrations tag once official 0.18.0 image is released

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Helm deployment support for the Event Ledger service.
    • Added configurable networking, health checks, resources, autoscaling, service accounts, telemetry, tracing, and storage settings.
    • Added secure Vault/OpenBao credential integration and configuration mounting.
    • Added deployment guidance and validation for required service settings.
  • Updates

    • Updated the Cassandra migration image version.
    • Updated the OpenBao migration image version.

Adds deploy/helm/event-ledger, a new Helm chart for deploying
event-ledger as an optional add-on in the self-managed stack.

- Deploys into the nvcf namespace
- ServiceAccount name matches the OpenBao JWT auth role (event-ledger)
- App config mounted via ConfigMap at /etc/event-ledger/config.yaml,
  read via EVENT_LEDGER_CONFIG; sets deprecate-endpoints: true (v3-only),
  cloudevents disabled, policy provider pointed at api-keys-api
- Vault Agent template renders Cassandra credentials from
  services/event-ledger/kv/data/cassandra/creds and a dummy
  policy-bearer-token (api-keys-api evaluator is open/unauthenticated)
- jwk-set-url points at services/event-ledger/jwt/jwks so inbound
  SIS/NVCA/NVCF-API JWTs are verified against event-ledger's own engine
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: eff01a3c-d4ae-4ba5-8e62-959635a13c84

📥 Commits

Reviewing files that changed from the base of the PR and between c68085f and 8259198.

📒 Files selected for processing (2)
  • deploy/helm/event-ledger/files/secrets.json.tmpl
  • deploy/helm/event-ledger/templates/deployment.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • deploy/helm/event-ledger/files/secrets.json.tmpl
  • deploy/helm/event-ledger/templates/deployment.yaml

📝 Walkthrough

Walkthrough

The PR adds an NVCF-owned Helm chart for Event Ledger. It configures deployment, services, autoscaling, Vault/OpenBao credential injection, runtime settings, validation, and deployment notes. It also updates Cassandra and OpenBao migration image tags.

Changes

Event Ledger Helm chart

Layer / File(s) Summary
Chart configuration and rendering contracts
deploy/helm/event-ledger/Chart.yaml, deploy/helm/event-ledger/values.yaml, deploy/helm/event-ledger/templates/_helpers.tpl, deploy/helm/event-ledger/files/secrets.json.tmpl, deploy/helm/event-ledger/templates/configmap-app.yaml, deploy/helm/event-ledger/templates/configmap-vault-agent-template.yaml, deploy/helm/event-ledger/templates/validation.yaml
The chart adds metadata, default configuration, naming and image helpers, Vault annotations, credential rendering, application configuration, and required-value checks.
Workload and secret injection
deploy/helm/event-ledger/templates/deployment.yaml, deploy/helm/event-ledger/templates/serviceaccount.yaml
The chart adds the Event Ledger Deployment and optional ServiceAccount. The workload mounts application configuration and Vault-injected credentials.
Service, scaling, and deployment operations
deploy/helm/event-ledger/templates/service.yaml, deploy/helm/event-ledger/templates/hpa.yaml, deploy/helm/event-ledger/templates/NOTES.txt
The chart adds the Service, optional autoscaling, and deployment notes for discovery, health checks, metrics, and Vault troubleshooting.

Migration image updates

Layer / File(s) Summary
Migration image version updates
deploy/helm/cassandra/helm/values.yaml, deploy/helm/openbao/helm/values.yaml
The Cassandra migration image changes from 0.11.0 to 0.16.0. The OpenBao migration image changes from 0.16.2 to 0.18.0.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: apartha-nv

Sequence Diagram(s)

sequenceDiagram
  participant Helm
  participant Kubernetes
  participant VaultAgent
  participant EventLedger
  Helm->>Kubernetes: Render Deployment and ConfigMaps
  Kubernetes->>VaultAgent: Start sidecar with Vault annotations
  VaultAgent->>VaultAgent: Render Cassandra credentials
  VaultAgent->>EventLedger: Provide secrets.json
  Kubernetes->>EventLedger: Mount config.yaml and expose ports
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required feat(scope): subject format and accurately describes the new Event Ledger Helm chart.
Linked Issues check ✅ Passed The chart implements deployment, services, probes, resources, service accounts, projected credentials, OpenBao integration, runtime configuration, and autoscaling required by issue #168.
Out of Scope Changes check ✅ Passed The migration image updates support the stated deployment objectives, and the remaining changes implement the Event Ledger Helm chart.
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
  • Commit unit tests in branch feat/event-ledger-helm-chart

Comment @coderabbitai help to get the list of available commands.

@shelleyshen-0

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Comment thread deploy/helm/openbao/helm/values.yaml Outdated

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deploy/helm/event-ledger/files/secrets.json.tmpl`:
- Around line 2-5: Update the username and password fields in the secrets
template to serialize their interpolated credential values with the Helm toJSON
function, removing the surrounding manual quotes. Leave the policy-bearer-token
value unchanged.

In `@deploy/helm/event-ledger/templates/NOTES.txt`:
- Around line 4-7: Replace the hardcoded event-ledger Service references in the
DNS record and port-forward command with the chart’s rendered Service name,
reusing the existing fullname/service naming template so fullnameOverride values
are honored consistently.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b73471e4-3c79-4c28-a163-af7022fffc3e

📥 Commits

Reviewing files that changed from the base of the PR and between f711515 and 85e060d.

📒 Files selected for processing (14)
  • deploy/helm/cassandra/helm/values.yaml
  • deploy/helm/event-ledger/Chart.yaml
  • deploy/helm/event-ledger/files/secrets.json.tmpl
  • deploy/helm/event-ledger/templates/NOTES.txt
  • deploy/helm/event-ledger/templates/_helpers.tpl
  • deploy/helm/event-ledger/templates/configmap-app.yaml
  • deploy/helm/event-ledger/templates/configmap-vault-agent-template.yaml
  • deploy/helm/event-ledger/templates/deployment.yaml
  • deploy/helm/event-ledger/templates/hpa.yaml
  • deploy/helm/event-ledger/templates/service.yaml
  • deploy/helm/event-ledger/templates/serviceaccount.yaml
  • deploy/helm/event-ledger/templates/validation.yaml
  • deploy/helm/event-ledger/values.yaml
  • deploy/helm/openbao/helm/values.yaml

Comment thread deploy/helm/event-ledger/files/secrets.json.tmpl
Comment thread deploy/helm/event-ledger/templates/NOTES.txt Outdated
@shelleyshen-0
shelleyshen-0 marked this pull request as ready for review August 11, 2026 23:12
@shelleyshen-0
shelleyshen-0 requested review from a team as code owners August 11, 2026 23:12
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
deploy/helm/event-ledger/templates/deployment.yaml (1)

16-113: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add automated chart coverage or document the exception.

The supplied PR material records manual cluster testing. It does not include automated chart tests or explain why tests are not applicable. Add repository-native rendering coverage for the Deployment, HPA, ServiceAccount, and validation paths. Record the native test command in the PR.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deploy/helm/event-ledger/templates/deployment.yaml` around lines 16 - 113,
Add repository-native Helm chart rendering tests covering the Deployment, HPA,
ServiceAccount, and validation paths for the nvcf-event-ledger chart, including
assertions for the rendered resources and relevant configuration. If automated
coverage cannot be added, document the exception and rationale; otherwise record
the command used to run the native tests in the PR.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deploy/helm/event-ledger/templates/deployment.yaml`:
- Around line 30-32: Add a checksum annotation alongside checksum/config-app in
the deployment template, hashing the Vault Agent secrets.json.tmpl content so
changes to that template alter the pod template and trigger a rollout. Use the
chart’s existing template rendering mechanism and preserve the current
annotations.
- Line 24: Conditionally render spec.replicas in the deployment template only
when eventLedger.autoscaling.enabled is false, omitting it entirely when
autoscaling is enabled so the HPA controls the replica count.

---

Outside diff comments:
In `@deploy/helm/event-ledger/templates/deployment.yaml`:
- Around line 16-113: Add repository-native Helm chart rendering tests covering
the Deployment, HPA, ServiceAccount, and validation paths for the
nvcf-event-ledger chart, including assertions for the rendered resources and
relevant configuration. If automated coverage cannot be added, document the
exception and rationale; otherwise record the command used to run the native
tests in the PR.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5a20e895-d9d1-4438-a3fc-37b772b89cc4

📥 Commits

Reviewing files that changed from the base of the PR and between 1d46dca and de0ca1d.

📒 Files selected for processing (14)
  • deploy/helm/cassandra/helm/values.yaml
  • deploy/helm/event-ledger/Chart.yaml
  • deploy/helm/event-ledger/files/secrets.json.tmpl
  • deploy/helm/event-ledger/templates/NOTES.txt
  • deploy/helm/event-ledger/templates/_helpers.tpl
  • deploy/helm/event-ledger/templates/configmap-app.yaml
  • deploy/helm/event-ledger/templates/configmap-vault-agent-template.yaml
  • deploy/helm/event-ledger/templates/deployment.yaml
  • deploy/helm/event-ledger/templates/hpa.yaml
  • deploy/helm/event-ledger/templates/service.yaml
  • deploy/helm/event-ledger/templates/serviceaccount.yaml
  • deploy/helm/event-ledger/templates/validation.yaml
  • deploy/helm/event-ledger/values.yaml
  • deploy/helm/openbao/helm/values.yaml
🚧 Files skipped from review as they are similar to previous changes (7)
  • deploy/helm/event-ledger/files/secrets.json.tmpl
  • deploy/helm/cassandra/helm/values.yaml
  • deploy/helm/openbao/helm/values.yaml
  • deploy/helm/event-ledger/Chart.yaml
  • deploy/helm/event-ledger/templates/NOTES.txt
  • deploy/helm/event-ledger/values.yaml
  • deploy/helm/event-ledger/templates/_helpers.tpl

labels:
{{- include "nvcf-event-ledger.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.eventLedger.replicaCount }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not set spec.replicas when autoscaling is enabled.

When eventLedger.autoscaling.enabled is true, omit spec.replicas. A Helm upgrade otherwise reapplies eventLedger.replicaCount and resets the replica count selected by the HPA.

Proposed fix
-  replicas: {{ .Values.eventLedger.replicaCount }}
+  {{- if not .Values.eventLedger.autoscaling.enabled }}
+  replicas: {{ .Values.eventLedger.replicaCount }}
+  {{- end }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deploy/helm/event-ledger/templates/deployment.yaml` at line 24, Conditionally
render spec.replicas in the deployment template only when
eventLedger.autoscaling.enabled is false, omitting it entirely when autoscaling
is enabled so the HPA controls the replica count.

Comment thread deploy/helm/event-ledger/templates/deployment.yaml
@shelleyshen-0 shelleyshen-0 self-assigned this Aug 13, 2026
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.

Package Event Ledger as a Helm chart

1 participant