Repository navigation
feat(helm): chart skeleton (Chart.yaml, values.yaml, CI lint) (#95) - #103
Conversation
…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]>
There was a problem hiding this comment.
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.0matchescontrol-plane/app/__init__.py— verified against the file.Chart.yamlnow has a realdependencies:block (conditional onpostgresql.enabled, real bitnami repo). That's whyhelm dependency updateabove actually pulled a chart.- Redis is gone — correct, it was never part of this stack.
values.yamlentries are commented against real.env.examplekeys (FRONTEND_URL,ALLOWED_ORIGINS,NEXT_PUBLIC_API_URL,KAAVAL_SECRET_KEY/KAAVAL_REFRESH_SECRET_KEY,POSTGRES_PASSWORDvia the subchart) — I checked each against the file.- Maintainer address is a real
users.noreply.github.comone. - Scope is right: metadata + values + CI lint, no workload templates (those are #96).
- Credit where I owed it: this commit is authored as
girosole60with 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.
-
The PodDisruptionBudget default is an eviction deadlock.
pdb.enabled: true+minAvailable: 1+replicaCount: 1gives allowed disruptions = 1 − 1 = 0, sokubectl drainand cluster-autoscaler scale-down block indefinitely on any node running the control plane. Either defaultpdb.enabled: false, or keep it enabled withminAvailable: 0, or shipreplicaCount: 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. -
controlPlane.envanddashboard.envparse asnull, not{}. Every entry under them is commented out, so YAML yields null rather than an empty map. A template doingtoYaml .Values.controlPlane.envrenders the literal stringnullinto the Deployment. Set both to{}explicitly. -
The registry is doubled.
global.imageRegistry: ghcr.iosits alongsiderepository: ghcr.io/kaaval/control-plane. The conventional template ({{ .Values.global.imageRegistry }}/{{ .Values.controlPlane.image.repository }}) would yieldghcr.io/ghcr.io/kaaval/control-plane. Pick one — either strip the registry fromrepositoryor dropglobal.imageRegistry. -
envFromhardcodeskaaval-control-plane-secrets. That breaks a second release in the same namespace and won't match thekaaval.controlPlane.fullnamehelper #96 will use. Either leaveenvFrom: []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]>
63ad4dc to
57593a4
Compare
|
All feedback from the review is now addressed in the latest push:
Please take another look — the structure is the same, just the nits from the review are cleaned up. 🙏 |
Superseded — every item in this review was addressed and verified in the follow-up push.
rrskris
left a comment
There was a problem hiding this comment.
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@1a275c3b69536ee54be43f2070a358922e12c8d4resolves upstream and is exactly what tagv4.3.1points at.actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332resolves tov4.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: falsewith a comment explaining thereplicaCount=1eviction deadlock — andminAvailable: 0alongside it.env: {}/envFrom: [], not nulls, with the# empty map, not nullnote.appVersion: "1.1.0"matching the chart version.- A real
postgresqldependency 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 cosmeticicon is recommendedinfo. - 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.
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]>
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]>
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,postgresqldependency (bitnami, conditional)deploy/helm/kaaval/values.yaml— every value that maps to an env var is commented with its.env.examplekey; covers postgresql, controlPlane, dashboard, secrets, ingress, SA/RBAC, networkPolicy, PDB.github/workflows/helm-lint.yml—helm dependency update && helm lint && helm template --dry-runon PRsAcceptance criteria
helm lint deploy/helm/kaavalpasseshelm dependency update && helm lint && helm template --dry-run.env.example(comments name each env var)Verify locally
Follow-ons (separate PRs)