Skip to content

feat(helm): chart skeleton (Chart.yaml, values.yaml, CI lint) (#95) - #103

Merged
rrskris merged 2 commits into
kaaval:mainfrom
girosole60:feat/helm-95-skeleton
Jul 26, 2026
Merged

rrskris merged 2 commits into
kaaval:mainfrom
girosole60:feat/helm-95-skeleton

Conversation

@girosole60

Copy link
Copy Markdown
Contributor

What

Minimal Helm chart skeleton — the exact #95 scope: metadata, values mirroring .env.example, bitnami/postgresql dependency, and a CI lint job. No templates; workloads (Deployment/Service/ConfigMap) are #96.

Files

  • deploy/helm/kaaval/Chart.yaml — v2, appVersion: 1.1.0, postgresql dependency (bitnami, conditional)
  • deploy/helm/kaaval/values.yaml — every value that maps to an env var is commented with its .env.example key; covers postgresql, controlPlane, dashboard, secrets, ingress, SA/RBAC, networkPolicy, PDB
  • .github/workflows/helm-lint.yml — helm dependency update && helm lint && helm template --dry-run on PRs

Acceptance criteria

  • helm lint deploy/helm/kaaval passes
  • CI job runs helm dependency update && helm lint && helm template --dry-run
  • values mirror .env.example (comments name each env var)

Verify locally

cd deploy/helm/kaaval
helm dependency update
helm lint .
helm template . --dry-run

Follow-ons (separate PRs)

…atching .env.example) + CI helm-lint (kaaval#95)

- Chart.yaml: v2, appVersion 1.1.0, bitnami/postgresql dependency, correct maintainer
- values.yaml: ONLY keys from .env.example (POSTGRES_PASSWORD, KAAVAL_SECRET_KEY, etc.), no invented Redis/ConfigMap/Config vars
- .github/workflows/helm-lint.yml: helm lint + template dry-run on PRs
- No templates/ — those are kaaval#96/kaaval#97, separate PRs

Signed-off-by: girosole60 <[email protected]>

@rrskris rrskris left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the rework — this is genuinely a different PR from #102, not a patch over it. I checked out the branch, installed Helm, and ran exactly what your new CI job runs:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency update    # pulls postgresql-15.5.38 cleanly
helm lint .               # 1 chart linted, 0 failed
helm template .           # renders clean

All green. Every specific thing I flagged on #102 is genuinely fixed, not papered over:

  • appVersion: 1.1.0 matches control-plane/app/__init__.py — verified against the file.
  • Chart.yaml now has a real dependencies: block (conditional on postgresql.enabled, real bitnami repo). That's why helm dependency update above actually pulled a chart.
  • Redis is gone — correct, it was never part of this stack.
  • values.yaml entries are commented against real .env.example keys (FRONTEND_URL, ALLOWED_ORIGINS, NEXT_PUBLIC_API_URL, KAAVAL_SECRET_KEY/KAAVAL_REFRESH_SECRET_KEY, POSTGRES_PASSWORD via the subchart) — I checked each against the file.
  • Maintainer address is a real users.noreply.github.com one.
  • Scope is right: metadata + values + CI lint, no workload templates (those are #96).
  • Credit where I owed it: this commit is authored as girosole60 with a real address and carries a DCO sign-off. The identity issue from the earlier PRs is already resolved here — I under-credited that in my first read.

Blocking: one fabricated SHA

.github/workflows/helm-lint.yml pins azure/setup-helm@5119fcb9089d432be92e2993f18951c0b8c3644a. That commit does not exist — gh api repos/azure/setup-helm/commits/<sha> returns 422. As written, the workflow fails on first run.

Worth looking at why, because the shape is instructive:

your pin   5119fcb9089d432be92e2993f18951c0b8c3644a
real v3.5  5119fcb9089d432beecbf79bb2c7915207344b78
                            ^ identical for 17 chars, then diverges

That shared prefix is the signature of a real SHA remembered partway and completed with invented hex. It's the quieter cousin of the fabricated Redis dependency on #102: a made-up dependency fails loudly, but a made-up SHA looks entirely plausible in review and only fails at runtime. Your actions/checkout pin, for contrast, I verified is legitimate — it resolves to v7.0.0.

The fix — use 1a275c3b69536ee54be43f2070a358922e12c8d4 (azure/setup-helm v4.3.1, verified, dated 2025-08-19). The v3.5 SHA above is also real but dates to 2022; no reason to pin to it on a new workflow.

One clarification so the two version knobs don't get conflated: the action pin and your with: version: v3.14.4 input are independent. That input selects the Helm binary to install and is fine exactly as it is — only the uses: SHA needs changing.

Worth making a habit: gh api repos/<owner>/<repo>/commits/<sha> before committing any pin. 200 means real, 422 means fabricated.

Also worth fixing in the same push

None of these break helm lint today, because no templates consume them yet — but they're the defaults #96/#97 will build against, so they're much cheaper to fix now than to unpick later.

  1. The PodDisruptionBudget default is an eviction deadlock. pdb.enabled: true + minAvailable: 1 + replicaCount: 1 gives allowed disruptions = 1 − 1 = 0, so kubectl drain and cluster-autoscaler scale-down block indefinitely on any node running the control plane. Either default pdb.enabled: false, or keep it enabled with minAvailable: 0, or ship replicaCount: 2. This is the one I care most about — it's the kind of default that quietly ruins someone's node maintenance months from now.

  2. controlPlane.env and dashboard.env parse as null, not {}. Every entry under them is commented out, so YAML yields null rather than an empty map. A template doing toYaml .Values.controlPlane.env renders the literal string null into the Deployment. Set both to {} explicitly.

  3. The registry is doubled. global.imageRegistry: ghcr.io sits alongside repository: ghcr.io/kaaval/control-plane. The conventional template ({{ .Values.global.imageRegistry }}/{{ .Values.controlPlane.image.repository }}) would yield ghcr.io/ghcr.io/kaaval/control-plane. Pick one — either strip the registry from repository or drop global.imageRegistry.

  4. envFrom hardcodes kaaval-control-plane-secrets. That breaks a second release in the same namespace and won't match the kaaval.controlPlane.fullname helper #96 will use. Either leave envFrom: [] for #96 to wire, or add a comment noting it should be templated.

Minor, take or leave: image.tag: "1.1.0" hardcoded means bumping appVersion needs two edits. Convention is tag: "" with | default .Chart.AppVersion in the template.

Fix the pin — ideally items 1–3 too — and I'll merge. The structure and scope of this are right, and the turnaround from #102 is a real step up.

…fault, empty env maps, registry dedup

- .github/workflows/helm-lint.yml: use real Azure/setup-helm@1a275c3 (v4.3.1)
- values.yaml:
  - pdb.enabled: false (avoids disruptions=0 deadlock with replicaCount=1)
  - controlPlane.env/dashboard.env: {} (empty map, not null)
  - drop global.imageRegistry (registry lives in image.repository)
  - envFrom: [] (letting kaaval#96 wire the Secret by name)
  - image.tag: "" (defaults to Chart.AppVersion in template)
  - add comments mapping each value to .env.example key

Signed-off-by: girosole60 <[email protected]>
@girosole60
girosole60 force-pushed the feat/helm-95-skeleton branch from 63ad4dc to 57593a4 Compare July 20, 2026 11:34
@girosole60

Copy link
Copy Markdown
Contributor Author

All feedback from the review is now addressed in the latest push:

  1. ✅ Fixed SHA: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 (v4.3.1, verified)
  2. ✅ PDB disabled by default (pdb.enabled: false) — avoids eviction deadlock
  3. ✅ controlPlane.env and dashboard.env set to {} (empty map, not null)
  4. ✅ Dropped global.imageRegistry (registry lives only in image.repository)
  5. ✅ envFrom: [] — left for Helm: control-plane Deployment + Service templates #96 to wire properly
  6. ✅ image.tag: "" — defaults to appVersion via | default .Chart.AppVersion

Please take another look — the structure is the same, just the nits from the review are cleaned up. 🙏

@rrskris
rrskris dismissed their stale review July 26, 2026 14:41

Superseded — every item in this review was addressed and verified in the follow-up push.

@rrskris rrskris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Merging this. I re-verified every item from the previous review against the actual push rather than the summary, and they all hold up:

  • The pinned SHA is real. azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 resolves upstream and is exactly what tag v4.3.1 points at. actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 resolves to v4.1.7. Both real commits, neither pasted from memory. That was the single biggest thing wrong with #102, and it's genuinely fixed.
  • pdb.enabled: false with a comment explaining the replicaCount=1 eviction deadlock — and minAvailable: 0 alongside it.
  • env: {} / envFrom: [], not nulls, with the # empty map, not null note.
  • appVersion: "1.1.0" matching the chart version.
  • A real postgresql dependency block. I ran the full chain your CI job runs — helm repo add bitnami, helm dependency update, helm lint, helm template — against the live Bitnami repo. Dependency resolves and downloads, lint passes with only the cosmetic icon is recommended info.
  • Real author identity and DCO sign-off on both commits.

Annotating each values block with the .env.example key it maps to was a nice touch that nobody asked for — it makes the chart reviewable against #73 instead of by guesswork. And envFrom: [] # #96 will wire the Secret here correctly leaves the seam for the next slice rather than half-building it.

I want to say this plainly, because it's the substantive point: #102 → #103 is a real step up. You didn't patch over the review, you rebuilt the thing, and you fixed every item rather than the easy ones. Verifying a resubmission that carefully is normally where I find something quietly skipped. Not here. That's the difference between a contributor who takes review as a checklist and one who takes it as a standard — thank you.

One thing to carry into #107, where it actually bites: controlPlane.image.repository is ghcr.io/kaaval/control-plane and dashboard.image.repository is ghcr.io/kaaval/dashboard, but neither image exists. .github/workflows/publish.yml builds ghcr.io/kaaval/kaaval (from the control-plane/ context) and ghcr.io/kaaval/kaaval-dashboard (from dashboard/). The directory names and the image names simply don't match — an easy and very reasonable inference that happens to be wrong. It's harmless here since this skeleton has no templates consuming it; I've left the detail on #107, which does.

Merging. This unblocks #107 to be reviewed on its own diff.

@rrskris
rrskris merged commit 835411b into kaaval:main Jul 26, 2026
8 checks passed
rrskris added a commit that referenced this pull request Jul 26, 2026
Adds Unreleased entries for the five PRs merged today, following the existing
"Contributed by [@user](link) (#PR)" convention:

- #106 Trivy report ingestion adapter (@Diyaaa-12)
- #108 CIS 5.1.6 token_automount rule (@donkk11)
- #103 Helm chart skeleton (@girosole60)
- #100 severity_changed bucket in the RBAC scan diff (@floze-the-genius)
- #118 / #119 doc and scanner-RBAC corrections

Notes the doc corrections explicitly rather than folding them in silently: the
--output table had been missing sarif and junit since those shipped, api.md
never documented GET /rbac/scan/diff, and the claim that Kaaval would not flag
its own scanner role stopped being true when segmentation_violation landed.

Signed-off-by: Vamshi Krishna Santhapuri <[email protected]>
rrskris added a commit that referenced this pull request Jul 26, 2026
The chart landed in #103 declares a postgresql subchart, so anyone running
helm dependency update (as the Helm Lint job does) ends up with an untracked
deploy/helm/kaaval/charts/ holding the downloaded tarball. Nothing ignored it,
which makes committing a vendored binary an easy accident.

Scoped to deploy/helm/*/charts/ so future charts are covered too.

Deliberately not addressing Chart.lock: committing it is the usual practice
for application charts, but only alongside `helm dependency build` in CI —
the current job runs `helm dependency update`, which re-resolves and rewrites
the lock, making a committed one meaningless. That pairing is a call for
whoever takes #97/#98.

Signed-off-by: Vamshi Krishna Santhapuri <[email protected]>
@rrskris rrskris mentioned this pull request Jul 26, 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.

2 participants