Lightweight docker container that validates Helm charts using the kubeconform-helm plugin and the kubeconform schema validation tool. It ensures that your Kubernetes manifests generated from Helm charts conform to Kubernetes schema standards.
- Helm Plugin Integration: Uses the kubeconform-helm plugin for Helm chart validation
- Custom Values Support: Validates charts with multiple values files, merged in the order specified
- Remote Chart Support: Validate charts directly from Helm repositories without manual downloads
- Verbose Reporting: Provides detailed output with --verbose and --summary flags
- Configurable: Supports .kubeconform files for custom validation settings
- Docker installed on your system
- Values files ready for validation
docker build -t helm-validator .The validator supports two modes of operation: local chart validation and remote chart validation. Values files are merged in the order they are mounted.
docker run --rm \
-v /path/to/chart:/chart \
-v /path/to/base.yaml:/values-0 \
-v /path/to/env.yaml:/values-1 \
-v /path/to/overrides.yaml:/values-2 \
helm-validator --local /chartdocker run --rm \
-v /path/to/base.yaml:/values-0 \
-v /path/to/env.yaml:/values-1 \
-v /path/to/overrides.yaml:/values-2 \
helm-validator --remote <repo-name> <repo-url> <chart-name>Values files are merged in the order specified by their mount points (/values-0, /values-1, etc.), with later files taking precedence.
Adding Helm repository 'argo' from https://argoproj.github.io/argo-helm...
Updating Helm repositories...
Pulling chart 'argo/argo-workflows'...
Chart extracted to: /tmp/helm-charts/argo-workflows
Values files (in merge order):
- 00-values.yaml (from /values-0)
- 01-values.yaml (from /values-1)
- 02-values.yaml (from /values-2)
Validating Helm chart...
Validation Output:
stdin - ServiceAccount argo is valid
stdin - ConfigMap argo-workflows-config is valid
[...]
Summary: 22 resources found parsing stdin - Valid: 22, Invalid: 0, Errors: 0, Skipped: 0
Validation completed successfully!
docker run --rm \
-v ./base.yaml:/values-0 \
-v ./prod.yaml:/values-1 \
helm-validator --remote argo https://argoproj.github.io/argo-helm argo-workflowsdocker run --rm \
-v ./defaults.yaml:/values-0 \
-v ./storage.yaml:/values-1 \
-v ./alerts.yaml:/values-2 \
helm-validator --remote prometheus-community https://prometheus-community.github.io/helm-charts kube-prometheus-stackdocker run --rm \
-v ./base.yaml:/values-0 \
-v ./cluster-issuers.yaml:/values-1 \
helm-validator --remote jetstack https://charts.jetstack.io cert-managerYou can include a .kubeconform file in your Helm chart directory to customize validation. Example:
schema-location:
- default
- https://my-schema-store/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json
summary: true
verbose: true
strict: trueThis file is automatically used by the tool during validation.
MIT License.