Documentation
¶
Index ¶
- Constants
- Variables
- func NewBody(file string) (*planBody, error)
- func SyncRepositories(ctx context.Context, repositories repo.Configs) error
- type Plan
- func (p *Plan) Apply(ctx context.Context) (err error)
- func (p *Plan) ApplyReport(fails map[release.Config]error) error
- func (p *Plan) ApplyWithKubedog(ctx context.Context, kubedogConfig *kubedog.Config) (err error)
- func (p *Plan) Build(ctx context.Context, yml string, tags []string, matchAll bool, ...) error
- func (p *Plan) Destroy(ctx context.Context) error
- func (p *Plan) DiffLive(ctx context.Context, showSecret bool, diffWide int)
- func (p *Plan) DiffPlan(b *Plan, showSecret bool, diffWide int)
- func (p *Plan) Export() error
- func (p *Plan) GetLive(ctx context.Context) (found map[uniqname.UniqName]*live.Release, notFound []uniqname.UniqName, ...)
- func (p *Plan) GetLiveOf(name uniqname.UniqName) (*live.Release, error)
- func (p *Plan) Import() error
- func (p *Plan) IsExist() bool
- func (p *Plan) IsManifestExist() bool
- func (p *Plan) List() error
- func (p *Plan) Logger() *log.Entry
- func (p *Plan) Rollback(version int) error
- func (p *Plan) Status(names ...string) error
- func (p *Plan) ValidateValuesBuild() error
- func (p *Plan) ValidateValuesImport() error
Constants ¶
const ( // Dir is default directory for generated files. Dir = ".helmwave/" // File is default file name for planfile. File = "planfile" // Body is default file name for main config. Body = "helmwave.yml" // Manifest is default directory under Dir for manifests. Manifest = "manifest/" // Values is default directory for values. Values = "values/" )
Variables ¶
var ( // ErrPlansAreTheSame is returned when trying to compare plan with itself. ErrPlansAreTheSame = errors.New("plan1 and plan2 are the same") // SkippedAnnotations is a map with all annotations to be skipped by differ. //nolint:gochecknoglobals // cannot make this const SkippedAnnotations = map[string][]string{ live.HookAnnotation: {string(live.HookTest), "test-success", "test-failure"}, helper.RootAnnoName + "skip-diff": {"true"}, } )
var ( // FailStatusColor is tablewriter color for failed releases. FailStatusColor = tablewriter.Color(tablewriter.Bold, tablewriter.BgRedColor) // SuccessStatusColor is tablewriter color for succeeded releases. SuccessStatusColor = tablewriter.Color(tablewriter.Bold, tablewriter.BgRedColor) )
var ( // ErrManifestDirNotFound is an error for nonexistent manifest dir. ErrManifestDirNotFound = errors.New(Manifest + " dir not found") // ErrManifestDirEmpty is an error for empty manifest dir. ErrManifestDirEmpty = errors.New(Manifest + " is empty") )
var ErrDeploy = errors.New("deploy failed")
ErrDeploy is returned when deploy is failed for whatever reason.
var ErrValidateFailed = errors.New("validate failed")
ErrValidateFailed is returned for failed values validation.
Functions ¶
Types ¶
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
Plan contains full helmwave state.
func NewAndImport ¶ added in v0.19.1
NewAndImport wrapper for New and Import in one.
func (*Plan) ApplyReport ¶
ApplyReport renders table report for failed releases.
func (*Plan) ApplyWithKubedog ¶
ApplyWithKubedog runs kubedog in goroutine and syncs repositories and releases.
func (*Plan) Build ¶
func (p *Plan) Build(ctx context.Context, yml string, tags []string, matchAll bool, templater string) error
Build plan with yml and tags/matchALL options.
func (*Plan) DiffLive ¶ added in v0.16.0
DiffLive show diff with production releases in k8s-cluster.
func (*Plan) GetLive ¶ added in v0.16.0
func (p *Plan) GetLive( ctx context.Context, ) (found map[uniqname.UniqName]*live.Release, notFound []uniqname.UniqName, err error)
GetLive returns maps of releases in a k8s-cluster.
func (*Plan) GetLiveOf ¶ added in v0.16.0
GetLiveOf returns instance of deployed helm release by name.
func (*Plan) IsManifestExist ¶
IsManifestExist returns true if planfile exists.
func (*Plan) List ¶
List renders releases status table and writes it to stdout. Listed only releases that exist in plan.
func (*Plan) ValidateValuesBuild ¶ added in v0.20.2
ValidateValuesBuild Dst now is public method. Dst needs to marshal for export. Also, dst needs to unmarshal for import from plan.
func (*Plan) ValidateValuesImport ¶ added in v0.20.2
ValidateValuesImport checks whether all values files exist.