Sign inSign up

franckrst/helm-values-validator

By franckrst

Updated over 2 years ago

Image
0

1.2K

franckrst/helm-values-validator repository overview

👌 Helm Values Validator

Helm values format validation tool

This tool allows you to validate the format of your Helm values using a JSONSchema with the Helm pre-install & `pre-upgrade hooks.

helm-3.14.0 jsonschema-1.4.2 distroless~60mo linux/amd64,linux/arm64,linux/arm/v7

French Readme - English Readme

Features

  • Helm values format validation
  • Display error messages in case of problems
  • Manual execution possible

Terminal demo


🚀 Installation

  1. Copy the example/templates/tests/helm-values-validator.yaml file to your Helm stack.
  2. Add your schema.json to the root of your Helm chart (same level as the values.yaml).
  3. Install the Helm chart with the helm install command.

📝 Logs

To see the validation error messages, you can use the following commands:

# Logs
kubectl logs helm-values-validator-release-name

# Error messages
kubectl get pod -n demo-test test-demo-helm-values-validator -o go-template="{{range .status.containerStatuses}}{{.state.terminated.message}}{{end}}"

🧑‍🔧 Manual execution

If you want to run the validation without installing Helm, you can run the container with the files and variables as in the following command:

docker run -it -v $(pwd)/values.json:/values.json -v $(pwd)/schema.json:/schema.json -e SCHEMA_FILE=/schema.json -e VALUES_FILE=/values.json franckrst/helm-values-validator:0.0.0-alpha

📐 Architecture

A simple Helm pre-install and pre-upgrade hook that deploys:

  • A ConfigMap containing the schema.json file and a values.json file that contains the .Values variable.
  • A Pod that launches the validation container in which the ConfigMap is mounted.

License

MIT

Tag summary

Content type

Image

Digest

sha256:60dc59ab1

Size

60.1 MB

Last updated

over 2 years ago

docker pull franckrst/helm-values-validator