helm-check is a github action tool which allows to prevalidate helm chart template before its deployment; executes helm template command and confirms it compiles based on the provided value(s) files.
Dockerfile
: contains docker image configurationentrypoint.sh
: contains executable script for helm templates validation
CHART_LOCATION
: chart folder; required field forhelm template
executionCHART_VALUES
: custom values file for specific kubernetes environment; required field forhelm template
execution. Can daisy chain multiple files by addind-f value.yaml
after the initial yaml file. EX:values.yaml -f some.yaml -f other.yaml
name: Template Check
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
template-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: helm-check
uses: ZSuiteTech/helm-check-action@0.2.1
env:
CHART_LOCATION: ./dir
CHART_VALUES: ./dir/dev.values.yaml -f ./dir/beta-dev.values.yaml
You can test script locally, but make sure you have all needed tools (helm at least); next steps describe how to test action on Linux system:
-
Clone action repository
-
Make sure entrypoint.sh is executable, otherwise execute next command in terminal:
user@localhost:~/dev/helm-check-action$ chmod +x ./entrypoint.sh
-
Move to your repository and execute next command in terminal:
user@localhost:~/dev/my-local-repository$ /path/to/entrypoint.sh /path/to/chart "/path/to/values/values.yaml"
or
user@localhost:~/dev/my-local-repository$ /path/to/entrypoint.sh /path/to/chart "/path/to/values/values.yaml -f /path/to/some/other/values.yaml"