commit | e7b362b61041aed0a02b2d4605459a15083f57d8 | [log] [tgz] |
---|---|---|
author | Tomasz Wrobel <tomasz.wrobel@nokia.com> | Mon Feb 14 12:05:20 2022 +0100 |
committer | Tomasz Wrobel <tomasz.wrobel@nokia.com> | Mon Feb 14 12:05:20 2022 +0100 |
tree | adbd88b10f7eb2f6cec127072cb9bc83054bf622 | |
parent | 92a587b1a642798af05a746e0d2d091372251040 [diff] |
Remove Vulnerabilities - Top up Spring to 2.5.9 - Top up spring-doc to 1.6.6 Issue-ID: SDC-3879 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: I0d75e93ff2f5f4de88982d860d25909be72a4d0b
Docker container with Spring-Boot application for validating helm charts.
To build image use:
make build-docker
or
make build-docker-local
To modify helm versions:
Dockerfile
, add desired version in line:ENV HELM_SUPPORTED_VERSIONS=3.5.2,3.4.1,3.3.4,2.17.0,2.14.3
Makefile
and add desired version in lines:build-docker-local: export HELM_SUPPORTED_VERSIONS=3.5.2,3.4.1,3.3.4,2.17.0
If you want to clean downloaded files run: make clean-local-files
In order to run docker container locally use:
make run-docker
Example charts are located in the following directory:
./dev-resources/sample-charts
To change log level by system environment add to dockerfile following code:
ENV LOG_LEVEL=<expected level e.g. DEBUG>
or run container with LOG_LEVEL ENV
docker run -p 8080:8080 -e LOG_LEVEL=INFO onap/org.onap.sdc.sdc-helm-validator:latest
Swagger UI is available on endpoint: /docs. OpenAPI.yaml in the main directory contains OpenAPI 3.0.1 definition.
Chart validation:
http://localhost:[PORT]/validate
This should be a POST with multipart/form-data
encoding with the following fields:
"versionDesired": [String] - helm version, which will be used for validation. If param not provided then version will be taken from apiVersion "file": [FILE] - helm chart to be validated packed in .txz format "isLinted": ["true"/"false"] - if false, there will be an attempt to render the chart without linting it first "isStrictLinted": ["true"/"false"] - linting should be strict or not
It is possible to provide helm version in three ways:
apiVersion: v1 -> the latest available helm 3 apiVersion: v2 -> the latest available helm 3
Json with the following fields:
"valid": ["true"/"false"] - passed linting without errors "deployable": ["true"/"false"] - passed template rendering without errors "lintErrors": [ARRAY OF STRINGS] - linting errors "lintWarnings": [ARRAY OF STRINGS] - linting warnings "renderErrors": [ARRAY OF STRINGS] - rendering errors
Supported versions [GET]
http://localhost:[PORT]/versions
Following Json:
[ARRAY OF STRINGS] - supported helm versions
Swagger UI [GET]