GithubHelp home page GithubHelp logo

franckrst / helm-values-validator Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 232 KB

This tool allows you to validate the format of your Helm values using a JSONSchema with the Helm pre-install & pre-upgrade hooks. ๐Ÿ‘Œ (for helm hook exemple)

Dockerfile 15.98% JavaScript 84.02%
distroless helms jsonschema

helm-values-validator's Introduction

๐Ÿ‘Œ Helm Values Validator (for hook exemple)

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. Like helm Schema Files

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.
  4. (Optional) Convert your values.yaml file to JSONSchema on jsonformater.org

๐Ÿ“ Logs

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

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

# Error messages
kubectl get pod release-name-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

Thx

helm-values-validator's People

Contributors

franckrst avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.