resolver

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartRelease

type ChartRelease struct {
	Name    string
	Repo    string
	Version string
}

type Mode

type Mode int

Mode is an enum type referring to the two types of releases supported by terra-helmfile.

const (
	Development Mode = iota // Development mode: prefer source copies of charts
	Deploy                  // Deploy mode: prefer released versions of charts (in versions/ directories)
)

type Options

type Options struct {
	Mode       Mode   // development / deploy
	SourceDir  string // path to chart source directory
	CacheDir   string // path where downloaded charts should be cached
	ScratchDir string // scratch directory where temporary files should be created
}

type ResolutionType

type ResolutionType int
const (
	Local  ResolutionType = iota // Indicates matching chart was found on local filesystem
	Remote                       // Indicates matching chart was found in Helm repo
)

func (ResolutionType) IsLocal

func (t ResolutionType) IsLocal() bool

func (ResolutionType) String

func (t ResolutionType) String() string

type ResolvedChart

type ResolvedChart interface {
	// Returns path where the resolved chart can be found on disk
	Path() string
	// Returns version of the resolved chart.
	Version() string
	// Returns a succinct description of where the chart was found.
	// If local, this will be path on disk relative to current working directory. (eg. "./charts/agora")
	// If repo, this will be the name of the Helm repo. (eg. "terra-helm")
	SourceDescription() string
}

ResolvedChart represents the outcome of a successful resolution of a chart release.

func NewResolvedChart

func NewResolvedChart(path string, chartVersion string, _type ResolutionType, release ChartRelease) ResolvedChart

type Resolver

type Resolver interface {
	// If in "development" mode, download and unpack the published chart from the Helm repository.
	// If in "deployment" mode, run "helm dependency update" on the local working/source copy of the chart.
	// Under some conditions, "development" mode falls back to downloading published chart and vice versa.
	Resolve(chart ChartRelease) (ResolvedChart, error)
}

func NewResolver

func NewResolver(runner shell.Runner, options Options) Resolver

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL