Skip to content

[CHORE]: Helm chart build Makefile with lint and values.schema.json validation + CODEOWNERS, CHANGELOG.md, .helmignore and CONTRIBUTING.md #222

@crivetimihai

Description

@crivetimihai

🧭 Chore Summary — Hardening the Helm Chart charts/mcp-stack

Add the chart-maintenance scaffolding, Makefile and schema so that every Helm release is lintable, schema-validated, and documented out-of-the-box.
Deliver the standard open-source housekeeping files and a tiny Makefile that shields contributors from boiler-plate commands.


🧱 Areas Affected

  • charts/mcp-stack/

    • NEW values.schema.json
    • NEW CODEOWNERS
    • NEW CHANGELOG.md
    • NEW CONTRIBUTING.md
    • NEW Makefile
    • NEW .helmignore
  • CI workflow that already packages & pushes the chart

  • Project docs (README may need one-line links)


⚙️ Context / Rationale

The chart already ships an excellent README with architecture diagrams and a polished values.yaml .
What's missing are:

  • Schema validation – contributors can currently enter a typo in values.yaml and Helm will happily accept it.
  • Ownership signals – GitHub can't auto-request reviews without a CODEOWNERS file.
  • Change traceability – a CHANGELOG makes it trivial to spot breaking changes between chart versions.
  • Contributor guidance – a short CONTRIBUTING doc + Make targets lowers the bar for first-timers.
  • Ignore noise.helmignore trims render time and OCI package size.

📋 Acceptance Criteria

  • helm lint charts/mcp-stack succeeds on a clean checkout with no extra flags.

  • make lint (defined in the new Makefile) runs:

    1. helm lint .
    2. helm template . | kube-val (optional but encouraged)
    3. yamllint on all YAML sources
  • make schema validates every default in values.yaml against values.schema.json.

  • GitHub highlights the chart OWNERS when a PR touches charts/mcp-stack/**.

  • CHANGELOG.md documents at least v0.2.0 → HEAD.

  • CI workflow step:

    - name: Helm lint & schema-check
      run: |
        cd charts/mcp-stack
        make lint

    fails the pipeline on any violation.

  • .helmignore excludes: *.tgz, *.DS_Store, dist/, test/, .venv/, *.orig, etc.


🛠️ Task Checklist

Step Action
1 Generate JSON Schema
• `helm show values .
kubeconform --output jsonschema > values.schema.json*or* usehelm-schema-gen.<br/>• Verify that *all* keys in values.yamlpassajv validate`.
2 Write the Makefile
Minimal targets:
makefile<br/>.PHONY: lint schema package<br/>lint: schema ## helm lint + yamllint<br/>\thelm lint .<br/>\tyamllint templates/ values.yaml Chart.yaml<br/>schema: ## validate values against JSON schema<br/>tajv validate -s values.schema.json -d values.yaml<br/>package: ## helm package + OCI push<br/>helm package . -d dist/ && helm push dist/*.tgz oci://ghcr.io/ibm/mcp-context-forge<br/>
3 CODEOWNERS
4 CHANGELOG.md
Follow Keep-a-Changelog; at minimum add an Unreleased section with Added “schema, Makefile, docs” entries.
5 CONTRIBUTING.md
Short bullets:
1. Fork & branch.
2. cd charts/mcp-stack && make lint.
3. Open PR.
4. Chart version bump is mandatory (Chart.yamlappVersion & version).
6 .helmignore
Copy the default from Helm template and extend with project-specific paths (README.md, *.md, docs/, dist/).
7 Wire into CI
Add a job (or extend existing package job) that executes make lint inside charts/mcp-stack.
8 Docs touch-up
• Add quick links at bottom of README → CONTRIBUTING & CHANGELOG.
• Optionally mention the new Make targets in “CI/CD & OCI Push” section.
9 Smoke test
```bash
helm lint charts/mcp-stack
helm template charts/mcp-stack
kube-val --strict
``` should exit 0.

🔄 Alternatives Considered

  • Using a single, top-level Makefile for the project - rejected to keep the chart independently buildable.
  • Storing the schema in helm-schemas/ – out of scope for now; local file is enough.

📓 Additional Notes

  • Keep values.schema.json in sync by regenerating it every time you add a new value key.
  • If ajv proves too heavy, switch to helm-json-schema-validation GitHub Action—just document the choice in CONTRIBUTING.
  • .helmignore rules mirror .gitignore + anything that slows down helm template.

After this chore lands, any contributor can run one command:

cd charts/mcp-stack && make lint

and be confident their change will pass CI the first time.

Additional tools

# Install
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest

# Generate (creates documentation, not schema)
helm-docs

# Install
npm install -g @json-schema-tools/schema-from-object

# Generate (requires some manual cleanup)
helm template . | yq eval '.spec.template.spec.containers[0].env' | schema-from-object > values.schema.json

# Install
npm install -g json-schema-generator

# Convert values.yaml to JSON first, then generate schema
yq eval -o=json values.yaml | json-schema-generator > values.schema.json

Metadata

Metadata

Assignees

Labels

devopsDevOps activities (containers, automation, deployment, makefiles, etc)enhancementNew feature or requesthelmHelm charttriageIssues / Features awaiting triage

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions