Giter Site home page Giter Site logo

redhat-certification / chart-verifier Goto Github PK

View Code? Open in Web Editor NEW
51.0 5.0 50.0 1.46 MB

A rules-based tool to certify Helm Charts.

License: Apache License 2.0

Dockerfile 0.07% Go 85.21% PowerShell 0.01% Shell 0.17% Makefile 1.21% Smarty 1.50% Python 11.05% Gherkin 0.78%

chart-verifier's Introduction

chart-verifier: Rules based tool to certify Helm charts

The chart-verifier CLI tool allows you to validate the Helm chart against a configurable list of checks. The tool ensures that the Helm charts include the associated metadata and formatting, and are distribution ready.

The tool allows users to validate a Helm chart URL and provides a report where each check has a positive or negative result. A negative result from a check indicates a problem with the chart, which needs correction. It ensures that the Helm chart works seamlessly on Red Hat OpenShift and can be submitted as a certified Helm chart in the OpenShift Helm Repository.

The input is provided through the command-line interface, with the only required input parameter being the uri option. The output is represented through a YAML format with descriptions added in a human-readable format. The report should be submitted with a full set of checks thus validating the Helm chart.

The tool provides the following features:

  • Helm chart verification: Verifies if a Helm chart is compliant with a certain set of independent checks with no particular execution order.
  • Red Hat OpenShift Certified chart validation: Verifies the Helm chart's readiness for being certified and submitted in the OpenShift Helm Repository.
  • Report generation: Generates a verification report in a YAML format.
  • Customizable checks: Defines the checks you wish to execute during the verification process.

For more information see:

For developer specific information, see:

chart-verifier's People

Contributors

acornett21 avatar baijum avatar dcurran90 avatar dperaza4dustbit avatar ethinx avatar fenech avatar harshcasper avatar iamrajiv avatar imdad000 avatar isutton avatar itsmitul9 avatar kartikey-star avatar komish avatar mgoerens avatar mmulholla avatar mrizzi avatar ochienged avatar pataknight avatar rdavid avatar rhrivero avatar sebrandon1 avatar srivaralakshmi avatar tisutisu avatar trgeiger avatar vikasmulaje avatar zvigrinberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chart-verifier's Issues

Non zero code should be returned for failed verifications

Currently, as long as a chart undergoes verification, regardless of the outcome, a return code of zero is recorded.

Failed verifications should return a non-zero code so that the tool can be more easily integrated into an automation process (eg: CI/CD)

chart-verifier tool does not work for online charts

If you try using the tool to download a chart from the web you get an error from the helm loader:

gzip: invalid header

This is because we are using loadArchive which expects a gzip file.

I suspect we need to download the chart first and then run the verifier, so for a client who wants to keep their chart private the only way to generate a report will be in premise.

Enable users to run checks against the charts

Enable partners to run checks against a Helm Chart

Checks:

  • Helm Chart Checks #47

Features:

  • Ability to integrate with other Helm Chart Check providers #36 (ie. Stackrox, IBM cv)
  • Ability to define which checks are mandatory, optional, experimental

Outcome of the check:

  • Digest of Helm Chart content (not sha of tarball) #42
  • OCP version used for performing the checks #43
  • Outcome of all performed checks (passed/failed)

Feature: Verify existence of external resources

A Chart.yaml may contain external referenceable material. Examples include:

  • home
  • sources
  • maintainers.url
  • icon

Verify fields are properly formatted and/or confirm that they are reachable

README update for GA

readme needs updating for GA, including (in no particular order):

  • purpose of the tool
  • tool errors : cause and actions,
  • what to do with the report (editing, signing, including in a PR).
  • details of report content.
  • how to download and run the docker container.
  • Verification with an OCP cluster.
  • How to submit issues and suggestions

Helm Chart Checks

Note rough sizings in person days are included

Required High (GA 5/10 mandatory)

  • (Martin) (2 pd) Deployed container images scanned and verified by Red Hat #38 (https://issues.redhat.com/browse/HELM-53)

  • (Igor) (10 pd) Run test and include OCP version used for performing the checks #43

    • enable value overrides
  • (Martin) (5 pd) Add annotations to report #67

    • Tool generated annotations
      • OCP version #43
      • timestamp, digest #42
    • Annotations from chart #71
  • (Martin) (2pd) Report output to console for collection by partner #65

    • Create Report schema #64
  • (Martin) (5 pd) Ability to define which checks are mandatory, optional, experimental (need to categorize current checks)

Required manual checks

  • Chart README.md includes pull secret instructions for private registries if required - will be a manual review of the PR at least for GA.

Required Medium (GA 5/10 nice to have)

Required not prioritized (pots GA 5/10)

Recommended

Have a user focused top-level README

The top-level readme focuses a lot on how to clone repo, build binary and execute the same on helm charts. We must move the dev docs into a different folder and link from the top-level readme.

How will new rules be versioned?

This is kind of in-line with my other issue #32 in that this project doesn't have any tags or releases yet. The Docker images are also only tagged with "latest" and "main" which will obviously keep rolling forward with new changes.

I fear that if I add this as a check to my chart's CI workflow and fix all the issues, then my workflow may suddenly start failing if a new default check is added to this project.

How will the verification rules be versioned to prevent this from happening? Are they built into the binary, or fetched at runtime?

Propagate user options to checks

It is a fair assumption that users might want to parametrize checks in different situations; one particular example is a check asserting whether the Helm chart is compatible with a given version of OpenShift, which needs the user's input to specify which one.

The --set flag should be added to the verify command; its value has the KEY=VALUE format, where KEY is the path to a particular configuration field, and VALUE is its value. For example verify --set compat.version=openshift-4.6 would overwrite the field compat.version if defined in the configuration file. The flag should also be accepted multiple times.

 

readme-contains-values-schema check not implemented

Documentation via the README.md indicate that the readme-contains-values-schema has been implemented, however this is not the case.

In addition, how was this check planned to validate the README of the chart?

Generate Chart index entry

Generate Chart index entry

Includes:
Mandatory:

  • Chart Url

Optional:

  • Authentication mechanism (eg Client certificate)

Review cli options

Review and adjust cli options, considering oc and kubectl options prior art.

  • -o and --output should be used to specify the output format.
  • A mandatory argument instead of an option should be used to specify the chart URL.
  • --only and --except should work as expected: only a subset of all checks or all checks except the informed list.

Another option could be to introduce the --checks option expecting a []string representing all checks to be executed, being all registered checks set by default.

Publish docker image

As part of the release process we need to publish the verifier tool docker image and ensure the readme provides instruction of where to get it form and how to use it.

For docs see: #59

Provide a schema for the report

Schema would be useful for verifying a submitted report is a valid report and make it easier to read. Also maybe useful is vendor could run the check toos o they can validate prior to submission.

Create schema and check for Partner annotations

To capture partner annotations details create a schema to define expected values and a check to verify that the chart contains the requested data.

As of Apr 9, 2021:
helm-chart.openshift.io/provider | name of chart provider (e.g. Red Hat), ready to be displayed in UI
helm-chart.openshift.io/name | human readable chart name, ready to be displayed in UI
helm-chart.openshift.io/supportURL | how users can contact support
helm-chart.openshift.io/archs | comma separated list of supported architectures (e.g. x86_64, s390x,...)

Alternate ways to install and run

Hi, I would love to see a more fleshed out Install section for this project. Right now the instructions only seem to mention running through the Docker image.

I would like to see instructions for installing with go get -u so I can install the CLI directly.

Likewise, a tagged GitHub release with binaries for each supported platform and a changelog would be great.

Looking forward to seeing where this goes.

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.