feat: add skip json schema validation during the install /upgrade of a Chart (#1737)

* open PR for --skip-schema-validation flag

Signed-off-by: zhaque44 <haque.zubair@gmail.com>
This commit is contained in:
Zubair Haque
2024-10-24 20:53:18 +08:00
committed by GitHub
parent 32409acc61
commit d1416ec7b4
15 changed files with 123 additions and 37 deletions
+7
View File
@@ -52,6 +52,8 @@ type ApplyOptions struct {
Wait bool
// WaitForJobs is true if the helm command should wait for the jobs to be completed
WaitForJobs bool
// Propagate '--skipSchemaValidation' to helmv3 template and helm install
SkipSchemaValidation bool
// ReuseValues is true if the helm command should reuse the values
ReuseValues bool
// ResetValues is true if helm command should reset values to charts' default
@@ -235,6 +237,11 @@ func (a *ApplyImpl) PostRendererArgs() []string {
return a.ApplyOptions.PostRendererArgs
}
// SkipSchemaValidation returns the SkipSchemaValidation.
func (a *ApplyImpl) SkipSchemaValidation() bool {
return a.ApplyOptions.SkipSchemaValidation
}
// Cascade returns cascade flag
func (a *ApplyImpl) Cascade() string {
return a.ApplyOptions.Cascade
+5
View File
@@ -48,6 +48,7 @@ type DiffOptions struct {
DiffArgs string
// SuppressOutputLineRegex is a list of regexes to suppress output lines
SuppressOutputLineRegex []string
SkipSchemaValidation bool
}
// NewDiffOptions creates a new Apply
@@ -199,3 +200,7 @@ func (t *DiffImpl) PostRendererArgs() []string {
func (t *DiffImpl) SuppressOutputLineRegex() []string {
return t.DiffOptions.SuppressOutputLineRegex
}
func (t *DiffImpl) SkipSchemaValidation() bool {
return t.DiffOptions.SkipSchemaValidation
}
+7
View File
@@ -30,6 +30,8 @@ type SyncOptions struct {
PostRenderer string
// Propagate '--post-renderer-args' to helmv3 template and helm install
PostRendererArgs []string
// Propagate '--skipSchemaValidation' to helmv3 template and helm install
SkipSchemaValidation bool
// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
Cascade string
// SyncArgs is the list of arguments to pass to the helm upgrade command.
@@ -132,6 +134,11 @@ func (t *SyncImpl) PostRendererArgs() []string {
return t.SyncOptions.PostRendererArgs
}
// SkipSchemaValidation returns the SkipSchemaValidation.
func (t *SyncImpl) SkipSchemaValidation() bool {
return t.SyncOptions.SkipSchemaValidation
}
// Cascade returns cascade flag
func (t *SyncImpl) Cascade() string {
return t.SyncOptions.Cascade
+7
View File
@@ -36,6 +36,8 @@ type TemplateOptions struct {
PostRenderer string
// Propagate '--post-renderer-args' to helmv3 template and helm install
PostRendererArgs []string
// Propagate '--skipSchemaValidation' to helmv3 template and helm install
SkipSchemaValidation bool
// KubeVersion is the kube-version flag
KubeVersion string
// Propagate '--show-only` to helm template
@@ -135,6 +137,11 @@ func (t *TemplateImpl) PostRendererArgs() []string {
return t.TemplateOptions.PostRendererArgs
}
// SkipSchemaValidation returns the SkipSchemaValidation.
func (t *TemplateImpl) SkipSchemaValidation() bool {
return t.TemplateOptions.SkipSchemaValidation
}
// KubeVersion returns the the KubeVersion.
func (t *TemplateImpl) KubeVersion() string {
return t.TemplateOptions.KubeVersion