Skip to content

Commit 47549d9

Browse files
committed
feat: add skip-schema-validation feature
Signed-off-by: yxxhero <aiopsclub@163.com>
1 parent 8294164 commit 47549d9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cmd/helm3.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ func (d *diffCmd) template(isUpgrade bool) ([]byte, error) {
198198
flags = append(flags, "--enable-dns")
199199
}
200200

201+
if d.SkipSchemaValidation {
202+
flags = append(flags, "--skip-schema-validation")
203+
}
204+
201205
var (
202206
subcmd string
203207
filter func([]byte) []byte

cmd/upgrade.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type diffCmd struct {
4747
disableValidation bool
4848
disableOpenAPIValidation bool
4949
enableDNS bool
50+
SkipSchemaValidation bool
5051
namespace string // namespace to assume the release to be installed into. Defaults to the current kube config namespace.
5152
valueFiles valueFiles
5253
values []string
@@ -253,6 +254,7 @@ func newChartCommand() *cobra.Command {
253254
" --dry-run=server enables the cluster access with helm-get and the lookup template function.")
254255
f.Lookup("dry-run").NoOptDefVal = dryRunNoOptDefVal
255256
f.BoolVar(&diff.enableDNS, "enable-dns", false, "enable DNS lookups when rendering templates")
257+
f.BoolVar(&diff.SkipSchemaValidation, "skip-schema-validation", false, "skip validation of the rendered manifests against the Kubernetes OpenAPI schema")
256258
f.StringVar(&diff.postRenderer, "post-renderer", "", "the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path")
257259
f.StringArrayVar(&diff.postRendererArgs, "post-renderer-args", []string{}, "an argument to the post-renderer (can specify multiple)")
258260
f.BoolVar(&diff.insecureSkipTLSVerify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")

0 commit comments

Comments
 (0)