Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add parameter for chart version #32

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ is as follows:

```text
$ ./scripts/plugin_wrapper.py --help
usage: plugin_wrapper.py [-h] [--cache] [--cache-dir DIR] [--config FILE]
[--values-dir DIR] [--values-pattern PATTERN] [-d] [--stdout]
[--errors-only] [--fail-fast] [--skip-refresh] [--verify]
[-f FILE] [-n NAME] [-r NAME] [--ignore-missing-schemas]
[--insecure-skip-tls-verify] [--kubernetes-version VERSION]
[--goroutines NUMBER] [--output {json,junit,tap,text}]
[--reject LIST] [--schema-location LOCATION] [--skip LIST]
[--strict] [--summary] [--verbose]
usage: plugin_wrapper.py [-h] [--cache] [--cache-dir DIR] [--config FILE] [--values-dir DIR]
[--values-pattern PATTERN] [-d] [--stdout] [--errors-only]
[--fail-fast] [--skip-refresh] [--verify] [-v VERSION] [-f FILE]
[-n NAME] [--chart-version CHART_VERSION] [-r NAME]
[--ignore-missing-schemas] [--insecure-skip-tls-verify]
[--kubernetes-version VERSION] [--goroutines NUMBER]
[--output {json,junit,tap,text}] [--reject LIST]
[--schema-location LOCATION] [--skip LIST] [--strict] [--summary]
[--verbose]
CHART

Wrapper to run kubeconform for a Helm chart.
Expand Down Expand Up @@ -96,10 +97,15 @@ helm build:
helm template:
Options passed to the 'helm template' command

-v VERSION, --kube-version VERSION
Kubernetes version to generate for (default: same as --kubernetes-
version)
-f FILE, --values FILE
values YAML file or URL (can specified multiple)
-n NAME, --namespace NAME
namespace
--chart-version CHART_VERSION
chart version
-r NAME, --release NAME
release name
CHART chart path (e.g. '.')
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kubeconform
version: 0.1.17
version: 0.1.18
usage: Kubernetes manifest validation tool for Helm charts
description: Kubernetes manifest validation tool for Helm charts
ignoreFlags: false
Expand Down
7 changes: 7 additions & 0 deletions scripts/plugin_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ def parse_args(
metavar="NAME",
help="namespace",
)
group_helm_tmpl.add_argument(
"--chart-version",
help="chart version",
)
group_helm_tmpl.add_argument(
"-r",
"--release",
Expand Down Expand Up @@ -270,6 +274,9 @@ def parse_args(
if a.namespace is not None:
args["helm_tmpl"] += ["--namespace", a.namespace]

if a.chart_version is not None:
args["helm_tmpl"] += ["--version", a.chart_version]

if a.release is not None:
args["helm_tmpl"] += [a.release]

Expand Down