Documentation ¶
Index ¶
- Constants
- Variables
- func GenSchema() *jsonschema.Schema
- func NewBody(_ context.Context, file string, validate bool) (*planBody, error)
- func SyncRepositories(ctx context.Context, repositories repo.Configs) error
- type BuildOptions
- type Plan
- func (p *Plan) ApplyReport(releasesFails map[release.Config]error, monitorsFails map[monitor.Config]error) error
- func (p *Plan) Build(ctx context.Context, o BuildOptions) (err error)
- func (p *Plan) BuildGraphASCII(width int) string
- func (p *Plan) DiffLive(ctx context.Context, opts *diff.Options, threeWayMerge bool)
- func (p *Plan) DiffPlan(b *Plan, opts *diff.Options)
- func (p *Plan) Down(ctx context.Context) (err error)
- func (p *Plan) Export(ctx context.Context, skipUnchanged bool) error
- func (p *Plan) GetLive(ctx context.Context) (found map[uniqname.UniqName]*live.Release, notFound []uniqname.UniqName, ...)
- func (p *Plan) Import(ctx context.Context) 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(ctx context.Context, version int, dog *kubedog.Config) (err error)
- func (p *Plan) Status(names ...string) error
- func (p *Plan) Up(ctx context.Context, dog *kubedog.Config) (err error)
- func (p *Plan) ValidateValuesBuild() error
- func (p *Plan) ValidateValuesImport() error
Constants ¶
const ( // Dir is the default directory for generated files. Dir = ".helmwave/" // File is the default file name for planfile. File = "planfile" // Body is a default file name for the main config. Body = "helmwave.yml" // Manifest is the default directory under Dir for manifests. Manifest = "manifest/" // Values is default directory for values. Values = "values/" )
Variables ¶
var ( // ErrValidateFailed is returned for failed values validation. ErrValidateFailed = errors.New("validate failed") // ErrPlansAreTheSame is returned when trying to compare plan with itself. ErrPlansAreTheSame = errors.New("plan1 and plan2 are the same") ErrMultipleKubecontexts = errors.New("kubedog can't work with releases in multiple kubecontexts") // ErrManifestDirEmpty is an error for empty manifest dir. ErrManifestDirEmpty = fmt.Errorf("manifests dir %s is empty", Manifest) // ErrDeploy is returned when deploy is failed for whatever reason. ErrDeploy = errors.New("deploy failed") )
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 SkippedAnnotations = map[string][]string{ live.HookAnnotation: {string(live.HookTest), "test-success", "test-failure"}, helper.RootAnnoName + "skip-diff": {"true"}, }
SkippedAnnotations is a map with all annotations to be skipped by differ.
Functions ¶
func GenSchema ¶ added in v0.23.0
func GenSchema() *jsonschema.Schema
Types ¶
type BuildOptions ¶ added in v0.27.1
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 ¶
func (p *Plan) ApplyReport( releasesFails map[release.Config]error, monitorsFails map[monitor.Config]error, ) error
ApplyReport renders a table report for failed releases.
func (*Plan) Build ¶
func (p *Plan) Build(ctx context.Context, o BuildOptions) (err error)
Build plan with yml and tags/matchALL options.
func (*Plan) BuildGraphASCII ¶ added in v0.27.2
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) 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 a 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.