Files
helmfile/pkg/config/destroy.go
T
yxxhero 1664edd0b9 add --skip-charts for destroy for disable prepare charts (#637)
* add --skip-charts for destroy for disable prepare charts

Signed-off-by: yxxhero <aiopsclub@163.com>

* add --skip-charts for delete subcmd

Signed-off-by: yxxhero <aiopsclub@163.com>

* add docs and e2e test

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2023-01-21 11:54:59 +09:00

46 lines
1.1 KiB
Go

package config
// DestroyOptions is the options for the build command
type DestroyOptions struct {
// Concurrency is the maximum number of concurrent helm processes to run, 0 is unlimited
Concurrency int
// SkipDeps is the skip deps flag
SkipDeps bool
// SkipCharts makes Destroy skip `withPreparedCharts`
SkipCharts bool
}
// NewDestroyOptions creates a new Apply
func NewDestroyOptions() *DestroyOptions {
return &DestroyOptions{}
}
// DestroyImpl is impl for applyOptions
type DestroyImpl struct {
*GlobalImpl
*DestroyOptions
}
// NewDestroyImpl creates a new DestroyImpl
func NewDestroyImpl(g *GlobalImpl, b *DestroyOptions) *DestroyImpl {
return &DestroyImpl{
GlobalImpl: g,
DestroyOptions: b,
}
}
// Concurrency returns the concurrency
func (c *DestroyImpl) Concurrency() int {
return c.DestroyOptions.Concurrency
}
// SkipDeps returns the skip deps
func (c *DestroyImpl) SkipDeps() bool {
return c.DestroyOptions.SkipDeps
}
// SkipCharts returns skipCharts flag
func (c *DestroyImpl) SkipCharts() bool {
return c.DestroyOptions.SkipCharts
}