Skip to content

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

Open
shelleyshen-0 wants to merge 18 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 18 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 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
  • Merge feat(event-ledger): self-managed deployment mode with ApiKeysClient #885 first, then update docker image tag in values.yaml and appVersion in Chart.yaml

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

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 06391036-c0e7-48d4-a0ca-54ef5a8fec23

📥 Commits

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

📒 Files selected for processing (3)
  • deploy/helm/event-ledger/templates/_helpers.tpl
  • deploy/helm/event-ledger/templates/deployment.yaml
  • deploy/helm/event-ledger/values.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • deploy/helm/event-ledger/templates/deployment.yaml
  • deploy/helm/event-ledger/values.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

Merge Risk: ⚪ Minimal · up to 81414

This PR adds Helm deployment configuration for the event-ledger service and updates related migration image references; no actionable merge-blocking risk remains at the current head after normal checks and review.

Possibly related PRs

  • NVIDIA/nvcf#851: Updates the Cassandra migrations image tag in the same Helm values file.
  • NVIDIA/nvcf#873: Adds Kubernetes Helm charts with shared helpers, deployments, services, service accounts, and values.

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
Linked Issues check ✅ Passed The chart provides deployment, service, probes, resources, service account, projected credentials, OpenBao integration, runtime configuration, and autoscaling.
Out of Scope Changes check ✅ Passed The migration tag updates and Cassandra hostname fix are stated PR objectives, and the remaining changes support the Event Ledger Helm chart.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses valid Conventional Commits syntax and accurately describes the primary change: adding the Event Ledger Helm chart.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/event-ledger-helm-chart
🧪 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

Comment thread deploy/helm/event-ledger/templates/deployment.yaml
Comment thread deploy/helm/event-ledger/templates/deployment.yaml
@shelleyshen-0 shelleyshen-0 self-assigned this Aug 13, 2026
{
"username": {{ .Data.data.username | toJSON }},
"password": {{ .Data.data.password | toJSON }},
"policy-bearer-token": "self-managed"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this needed currently? the api key services does not require auth.

@shelleyshen-0 shelleyshen-0 Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi Ada perhaps this should have been a point that i should have brought up in the MR for auth model change in event ledger before the monorepo migration. The service depend on the policy-bearer-token to determine the auth model (SSA vs static token) which is actually not correct it should be the file let me make the fix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@along-2017 along-2017 Aug 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

discussed offline. recommend using config to gate it.

@along-2017

Copy link
Copy Markdown
Contributor

Hi for nvcf-openbao-migrations, it uses 0.18.0-test. any blocker?

Comment thread deploy/helm/event-ledger/values.yaml Outdated
# via the vault.hashicorp.com/auth-config-token-path annotation.
# The token's `aud` claim must match the JWT auth role's bound_audiences,
# which the migration sets to OPENBAO_SERVER_INTERNAL_URL.
volumes:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please refer this for SA token mount pattern.
https://gitlab-master.nvidia.com/nvcf/nvcf/-/merge_requests/532/diffs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good callout. Updated here. 81414a0

@shelleyshen-0

shelleyshen-0 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Hi for nvcf-openbao-migrations, it uses 0.18.0-test. any blocker?

I've updated it to 0.18.0. I think you were looking at the old version.

Edit: Also update the PR description. Thanks.

Comment thread deploy/helm/event-ledger/Chart.yaml Outdated
# limitations under the License.

apiVersion: v2
name: helm-event-ledger

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

repo convention is helm-nvcf-* - does this drop the nvcf portion intentionally?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread deploy/helm/event-ledger/Chart.yaml Outdated

version: 0.0.0 # autoversioning enabled via release pipeline

appVersion: "1.0.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This diverges from the tag specified in values

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

name: {{ include "nvcf-event-ledger.fullname" . }}
minReplicas: {{ .Values.eventLedger.autoscaling.minReplicas }}
maxReplicas: {{ .Values.eventLedger.autoscaling.maxReplicas }}
metrics:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can render an empty metrics key if autoscaling is enabled and no metric target is set. This needs a guard to ensure valid output for that combination.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

path: /health
port: api-port

autoscaling:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

min/max both set to 1 makes HPA ineffective. Consider alternative defaults.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread deploy/helm/event-ledger/templates/deployment.yaml
Comment thread deploy/helm/event-ledger/values.yaml Outdated

serviceAccount:
create: true
automount: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verify this is intended. The chart already projects a specific OpenBao-audience token in this values file. If the default SA token is not needed, set automount false.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are right it's not needed updating.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread deploy/helm/event-ledger/values.yaml Outdated
podLabels: {}

podSecurityContext: {}
securityContext: {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aim for less permissive sec config by default.

At minimum I’d expect allowPrivilegeEscalation: false and capabilities.drop: ["ALL"]. runAsNonRoot if the image supports it. If the image does not, then file a follow up to make that possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nvjmcnamee

Copy link
Copy Markdown
Contributor

No optional PodDisruptionBudget, NetworkPolicy, topologySpreadConstraints, or priorityClassName. If the convention is to not provide these, then follow that convention. But worth checking.

@nvjmcnamee

Copy link
Copy Markdown
Contributor

The chart has a useful NOTES.txt, but no README and no values.schema.json. Nearby charts commonly have parent READMEs explaining prerequisites, image settings, Vault/OpenBao expectations, install examples, and operational notes.

For this chart, docs should explicitly cover:

  • Required image values.
  • Expected namespace and fixed service name.
  • Required OpenBao migration: 22_setup_event-ledger.sh.
  • Required Cassandra migration image/version and event_ledger keyspace.
  • Required ServiceAccount name and Vault role coupling.
  • The injected secret file path: /vault/secrets/secrets.json.
  • Required API Keys policy evaluator behavior.
  • Which endpoints are bundled-stack defaults versus override points.
  • Whether external Cassandra/OpenBao/API Keys are supported.
  • How to enable metrics scraping.
  • Why fullnameOverride defaults to event-ledger.
  • Whether appVersion is meaningful or managed elsewhere.

@nvjmcnamee

Copy link
Copy Markdown
Contributor

The current image helper does not support digest pinning. A more complete image helper would support:

digest: ""

and render one of:

registry/repository/name:tag
registry/repository/name:tag@sha256:...
registry/repository/name@sha256:...

Image tags are mutable by nature, digest pinning is preferable to mitigate potential supply chain issues.

@nvjmcnamee

Copy link
Copy Markdown
Contributor

The render shape of the chart looks good as-is, the comments here will tighten it up considerably.

Add chart-owned OpenBao token helpers and move the projected
service-account token volume/mount out of public values lists
into the workload template directly.

- Add openbaoTokenVolumeName/MountPath/FileName/Path helpers
- Add agent-service-account-token-volume-name annotation
- Derive auth-config-token-path from helpers instead of a hardcoded literal
- Render the openbao-token projected volume and mount in deployment.yaml
- Rename volumes/volumeMounts extension points to extraVolumes/extraVolumeMounts
- Move audience from inline volume definition to vault.audience value
…ca guard

- Rename chart from helm-event-ledger to helm-nvcf-event-ledger to follow repo convention
- Set appVersion to 0.10.2 to match the image tag in values.yaml
- Omit spec.replicas when autoscaling is enabled so the HPA controls replica count
- Guard HPA metrics key so it is omitted when no metric target is configured
- Set automount: false to disable unused default SA token (chart uses projected OpenBao token)
- Set maxReplicas to 3 so HPA can actually scale when enabled
- Add EVENT_LEDGER_SELF_MANAGED=true env var
Set allowPrivilegeEscalation: false, runAsNonRoot: true, and drop all
Linux capabilities. The image runs as UID 65532 so runAsNonRoot is safe.
@shelleyshen-0

Copy link
Copy Markdown
Contributor Author

The current image helper does not support digest pinning. A more complete image helper would support:

digest: ""

and render one of:

registry/repository/name:tag registry/repository/name:tag@sha256:... registry/repository/name@sha256:...

Image tags are mutable by nature, digest pinning is preferable to mitigate potential supply chain issues.

Not seeing digest pinning in the other repos. Is this something we are looking to add support for? If so can we do it in a followup?

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

3 participants