Skip to content

[Task]: Add CI to validate Kubernetes manifest templates #3592

Description

@tw4l

Description

We should check that the Kubernetes YAML manifests in chart/templates and chart/app-templates are valid, make any changes and necessary, and add CI tests to check their validity on an ongoing basis.

kubeconform is well suited to this task.

The contents of chart/app-templates are jinja2 templates that will need to be rendered with some data before being passed to kubeconform, e.g.:

# install dependencies
brew install kubeconform
python -m pip install jinja2-cli

# render jinja2 template and pass to kubeconform
jinja2 chart/app-templates/background_job.yaml -D id="testid" -D job_type="example" -D oid="37b9f9f5-e922-4732-88f3-899dad70a3a9-dclzb" -D collection_id="19638c35-ee92-49ac-b7ee-b7689c500575" -D scale=2 -D crawl_type="manual" -D crawl_id="crawl-123" -D larger_resources=True -D backend_image="docker.io/webrecorder/browsertrix-crawler:latest" -D pull_policy="IfNotPresent" | kubeconform -strict

Context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions