Feat add cascade support (#860)

* feat: add cascade support for helm v3.12.0

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-05-15 13:49:33 +08:00
committed by GitHub
parent 8e036e19dc
commit 00dace9b63
19 changed files with 188 additions and 20 deletions
+7
View File
@@ -56,6 +56,8 @@ type ApplyOptions struct {
ResetValues bool
// Propagate '--post-renderer' to helmv3 template and helm install
PostRenderer string
// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
Cascade string
}
// NewApply creates a new Apply
@@ -212,3 +214,8 @@ func (a *ApplyImpl) ResetValues() bool {
func (a *ApplyImpl) PostRenderer() string {
return a.ApplyOptions.PostRenderer
}
// Cascade returns cascade flag
func (a *ApplyImpl) Cascade() string {
return a.ApplyOptions.Cascade
}
+7
View File
@@ -9,6 +9,8 @@ type DeleteOptions struct {
Purge bool
// SkipCharts makes Delete skip `withPreparedCharts`
SkipCharts bool
// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
Cascade string
}
// NewDeleteOptions creates a new Apply
@@ -44,3 +46,8 @@ func (c *DeleteImpl) Purge() bool {
func (c *DeleteImpl) SkipCharts() bool {
return c.DeleteOptions.SkipCharts
}
// Cascade returns cascade flag
func (c *DeleteImpl) Cascade() string {
return c.DeleteOptions.Cascade
}
+7
View File
@@ -6,6 +6,8 @@ type DestroyOptions struct {
Concurrency int
// SkipCharts makes Destroy skip `withPreparedCharts`
SkipCharts bool
// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
Cascade string
}
// NewDestroyOptions creates a new Apply
@@ -36,3 +38,8 @@ func (c *DestroyImpl) Concurrency() int {
func (c *DestroyImpl) SkipCharts() bool {
return c.DestroyOptions.SkipCharts
}
// Cascade returns cascade flag
func (c *DestroyImpl) Cascade() string {
return c.DestroyOptions.Cascade
}
+7
View File
@@ -28,6 +28,8 @@ type SyncOptions struct {
ResetValues bool
// Propagate '--post-renderer' to helmv3 template and helm install
PostRenderer string
// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
Cascade string
}
// NewSyncOptions creates a new Apply
@@ -118,3 +120,8 @@ func (t *SyncImpl) ResetValues() bool {
func (t *SyncImpl) PostRenderer() string {
return t.SyncOptions.PostRenderer
}
// Cascade returns cascade flag
func (t *SyncImpl) Cascade() string {
return t.SyncOptions.Cascade
}