Skip to content

ci: render charts with their ci/*-values.yaml fixtures in lint and kubeconform#29

Merged
andrey-embarklabs merged 1 commit into
NrgXnat:mainfrom
andrey-embarklabs:plt/ci-lint-ci-fixtures
Jun 15, 2026
Merged

ci: render charts with their ci/*-values.yaml fixtures in lint and kubeconform#29
andrey-embarklabs merged 1 commit into
NrgXnat:mainfrom
andrey-embarklabs:plt/ci-lint-ci-fixtures

Conversation

@andrey-embarklabs

Copy link
Copy Markdown
Contributor

The helm template + kubeconform step renders each chart with no values file (helm template ci "${chart}"). That works until a chart adds a render-time required guard on a credential. PR #21 adds exactly such a guard (cnpg.cluster.credentials.password is required) and ships helm/xnat/ci/default-values.yaml to satisfy it, but the workflow never loads that fixture, so the render fails:

Error: execution error at (xnat/templates/statefulset.yaml:23:28):
cnpg.cluster.credentials.password is required: ...

(helm lint passes because it does not hard-fail on required; only the kubeconform render does.)

This loads each chart's ci/*-values.yaml fixtures (the chart-testing convention) in both the lint and template/kubeconform steps, falling back to default values when a chart has no fixture. Charts without a fixture render exactly as before.

Verified with the CI-pinned toolchain (helm, kubeconform v0.7.0, actionlint 1.7.7 + shellcheck --severity=error):

  • feat(chart): security and credential hardening #21's chart (guard + fixture): renders and validates across Kubernetes 1.27 / 1.29 / 1.31 / 1.33 (27 valid, 0 invalid).
  • A chart with no fixture: still renders defaults, exit 0.
  • actionlint on the workflow: clean.

Note on ordering: merge this before #21. Once #21's guard is on main, the chart-lint push run on main needs this fixture-loading to stay green.

…beconform

The template + kubeconform step renders each chart with no values file, so
a chart that adds a required-credential guard (e.g. a required database
password) fails to render even though it ships a ci/ fixture that satisfies
the guard. Load each chart's ci/*-values.yaml fixtures (chart-testing
convention) in both the lint and template steps, falling back to defaults
when a chart has none.

@kathrynalpert kathrynalpert left a comment

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.

Fixtures are matched by ci/*-values.yaml, would this be true for all relevant files, or do we need to document the expectation?

@andrey-embarklabs andrey-embarklabs merged commit 9106182 into NrgXnat:main Jun 15, 2026
4 checks passed
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