chore(charts): add chart-testing (ct) CI for lint validation#1260
chore(charts): add chart-testing (ct) CI for lint validation#1260ferponse wants to merge 2 commits into
Conversation
Adds .github/workflows/chart-testing.yml running on every PR that touches a chart: - `ct lint` (helm lint + yamllint) over all charts, exercising the default values AND each ci/*-values.yaml value set. - `kubeconform` validation of the rendered manifests against explicit, pinned Kubernetes schema versions (1.21.1 / 1.28.6 / 1.34.2), mirroring the versions in kubernetes-test.yml and the charts' kubeVersion floor. Adds per-chart ci/ value sets so the conditional template branches - not just the defaults - are linted and schema-validated. This is the class of regressions the effort targets (opensandbox-group#1233, opensandbox-group#1235, opensandbox-group#1236, opensandbox-group#1240): - opensandbox-controller: full-features (non-empty extra volumes/mounts, sidecars, init containers, env, pull secrets, scheduling, snapshot secrets) and minimal (disabled SA/RBAC/CRDs/probes/leader-election). - opensandbox-server: gateway-enabled (renders the whole ingress-gateway block plus secure-access signing) and volumes-and-env (non-empty volumes/env). - opensandbox: umbrella value set enabling both sub-charts' optional branches. CustomResourceDefinition is skipped in kubeconform (static definitions, no CRD meta-schema in the default set); workload manifests stay strict. Also strips trailing whitespace from the controller/server values.yaml, which yamllint (run by ct) flags.
aad4499 to
f1ecd10
Compare
|
I don't think this is a regression worth this much investment. The referenced issues (#1233 #1235 #1236 #1239 #1240) are all small oversights from the same round of ingress-gateway / values.yaml cleanup — similar pattern, cheap to fix. It's a stretch to frame them as "a class of issues that keeps leaking through." Standing up chart-testing + kubeconform + a per-chart More importantly, the maintenance ownership of multiple near-duplicate value files is unclear: when Suggested minimal alternative: run |
Summary
Adds automated linting and template/schema validation for the Helm charts on every PR that touches a chart, closing the gap that let issues like #1233, #1235, #1236 and #1240 through.
Closes #1254
What it does
.github/workflows/chart-testing.ymlwith two jobs:ct lint—helm lint+yamllintover all three charts, run for the default values and eachci/*-values.yamlvalue set.kubeconform— renders every chart (default + eachci/value set) and validates the produced manifests against explicit, pinned Kubernetes schema versions (1.21.1,1.28.6,1.34.2) — the charts'kubeVersionfloor plus a mid and a recent release, mirroringkubernetes-test.yml.Values matrix (the important part)
A single default-values render misses the conditional branches — which is exactly where the referenced regressions lived. Each chart ships a
ci/value set so those branches are the ones being linted and validated:ci/gateway-enabled-values.yamlci/volumes-and-env-values.yamlserver.volumes/volumeMounts/env(#1240, non-empty side)ci/full-features-values.yamlci/minimal-values.yamlci/full-values.yamlNotes
CustomResourceDefinitionis skipped in kubeconform (the CRDs are static definitions and the default schema set carries no CRD meta-schema); the workload manifests stay-strict.--validate-maintainers=false/--check-version-increment=falseonct lint(team email, no per-PR version bump).opensandbox-controller/opensandbox-servervalues.yaml, whichyamllint(run byct) flags.Verified locally
ct lint— all charts green, incl. everyci/value set.kubeconform— green across all three Kubernetes versions × all charts × every value set.