Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultBody() string
- func DefaultTpl() string
- func GenSchema() *jsonschema.Schema
- func NewBody(_ context.Context, file string, validate bool) (*planBody, error)
- func ParallelLimit(ctx context.Context, releases release.Configs) int
- 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) Graph() *dependency.Graph[uniqname.UniqName, release.Config]
- 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) Manifests() map[uniqname.UniqName]string
- func (p *Plan) ParallelLimiter(ctx context.Context) int
- 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 = ".helmtide/" // File is the default file name for planfile. File = "planfile" // Body is a default file name for the main config. Body = "helmtide.yml" // LegacyBody is the config file name of helmwave, which helmtide was forked // from. It is still accepted so an existing repository works unchanged. LegacyBody = "helmwave.yml" // Tpl is the default template for the main config. Tpl = "helmtide.yml.tpl" // LegacyTpl is the template name inherited from helmwave, still accepted. LegacyTpl = "helmwave.yml.tpl" // 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") // ErrUnsafePlanDir is returned when the plan directory resolves to a path // that must never be wiped on export (empty, ".", "..", the filesystem // root, the current working directory or the shared temp root). ErrUnsafePlanDir = errors.New("unsafe plan directory") )
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 DefaultBody ¶
func DefaultBody() string
DefaultBody returns the config file to use when none was given.
helmtide reads helmtide.yml, but it was forked from helmwave and an existing repository has a helmwave.yml instead. Rather than making everyone rename a file to try this out, the old name is accepted when the new one is absent. A directory holding both is answered with the new name, so a migration can be done by adding helmtide.yml and deleting helmwave.yml afterwards.
func DefaultTpl ¶
func DefaultTpl() string
DefaultTpl does the same for the template of the main config.
func GenSchema ¶
func GenSchema() *jsonschema.Schema
Types ¶
type BuildOptions ¶
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
Plan contains full helmwave state.
func NewAndImport ¶
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 ¶
func (*Plan) GetLive ¶
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 ¶
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 ¶
ValidateValuesImport checks whether all values files exist.