state

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 48 Imported by: 9

Documentation

Index

Constants

View Source
const (
	DefaultHelmBinary       = "helm"
	DefaultKustomizeBinary  = "kustomize"
	DefaultHCLFileExtension = ".hcl"
)
View Source
const (
	// EmptyTimeout represents the `--timeout` value passed to helm commands not being specified via helmfile flags.
	// This is used by an interim solution to make the urfave/cli command report to the helmfile internal about that the
	// --timeout flag is missingl
	EmptyTimeout = -1

	// Valid enum for updateStrategy values
	UpdateStrategyReinstallIfForbidden = "reinstallIfForbidden"
)
View Source
const DefaultEnv = "default"

DefaultEnv is the default environment to use for helm commands

View Source
const MissingFileHandlerDebug = "Debug"

MissingFileHandlerDebug is the debug returned when a file is missing

View Source
const MissingFileHandlerError = "Error"

MissingFileHandlerError is the error returned when a file is missing

View Source
const MissingFileHandlerInfo = "Info"

MissingFileHandlerInfo is the info returned when a file is missing

View Source
const MissingFileHandlerWarn = "Warn"

MissingFileHandlerWarn is the warning returned when a file is missing

View Source
const ReleaseErrorCodeFailure = 1

Variables

View Source
var DefaultFetchOutputDirTemplate = filepath.Join(
	"{{ .OutputDir }}{{ if .Release.Namespace }}",
	"{{ .Release.Namespace }}{{ end }}{{ if .Release.KubeContext }}",
	"{{ .Release.KubeContext }}{{ end }}",
	"{{ .Release.Name }}",
	"{{ .ChartName }}",
	"{{ or .Release.Version \"latest\" }}",
)
View Source
var ValidUpdateStrategyValues = []string{UpdateStrategyReinstallIfForbidden}

Functions

func ConditionEnabled

func ConditionEnabled(r ReleaseSpec, values map[string]any) (bool, error)

ConditionEnabled checks if a release condition is enabled based on the provided values. It takes a ReleaseSpec and a map of values as input. If the condition is not specified, it returns true. If the condition is specified but not in the form 'foo.enabled', it returns an error. If the condition is specified and the corresponding value is found in the values map, it checks if the 'enabled' field is set to true. If so, it returns true. Otherwise, it returns false. If the condition is specified but the corresponding value is not found in the values map, it returns an error.

func GroupReleasesByDependency

func GroupReleasesByDependency(releases []Release, opts PlanOptions) ([][]Release, error)

func HashObject

func HashObject(obj any) (string, error)

func Logs

func Logs(v bool) func(*TestOpts)

func NewChartDependencyManager

func NewChartDependencyManager(name string, logger *zap.SugaredLogger, lockFilePath string) *chartDependencyManager

func ReleaseToID

func ReleaseToID(r *ReleaseSpec) string

func SortedReleaseGroups

func SortedReleaseGroups(releases []Release, opts PlanOptions) ([][]Release, error)

Types

type AffectedReleases

type AffectedReleases struct {
	Upgraded     []*ReleaseSpec
	Reinstalled  []*ReleaseSpec
	Deleted      []*ReleaseSpec
	Failed       []*ReleaseSpec
	DeleteFailed []*ReleaseSpec
}

AffectedReleases hold the list of released that where updated, deleted, or in error

func (*AffectedReleases) DisplayAffectedReleases

func (ar *AffectedReleases) DisplayAffectedReleases(logger *zap.SugaredLogger)

DisplayAffectedReleases logs the upgraded, deleted and in error releases

type ChartCacheKey added in v1.1.8

type ChartCacheKey struct {
	Chart   string
	Version string
}

Chart cache for both OCI and non-OCI charts to avoid duplicate downloads

type ChartLockedRequirements

type ChartLockedRequirements struct {
	Version              string                    `yaml:"version"`
	ResolvedDependencies []ResolvedChartDependency `yaml:"dependencies"`
	Digest               string                    `yaml:"digest"`
	Generated            string                    `yaml:"generated"`
}

type ChartMeta

type ChartMeta struct {
	Name string `yaml:"name"`
}

type ChartPrepareOptions

type ChartPrepareOptions struct {
	ForceDownload bool
	SkipRepos     bool
	SkipDeps      bool
	SkipRefresh   bool
	SkipResolve   bool
	SkipCleanup   bool
	// Validate configures chartify to pass --validate to helm-template run by it.
	// It's required when one of your chart relies on Capabilities.APIVersions in a template
	Validate               bool
	IncludeCRDs            *bool
	Wait                   bool
	WaitRetries            int
	WaitForJobs            bool
	OutputDir              string
	OutputDirTemplate      string
	IncludeTransitiveNeeds bool
	Concurrency            int
	KubeVersion            string
	Set                    []string
	Values                 []string
	// Delete wait
	DeleteWait    bool
	DeleteTimeout int
	// HelmOCIPlainHTTP uses plain HTTP for OCI registries (required for local/insecure registries in Helm 4)
	HelmOCIPlainHTTP bool
}

type ChartRequirements

type ChartRequirements struct {
	UnresolvedDependencies []unresolvedChartDependency `yaml:"dependencies"`
}

type Chartify

type Chartify struct {
	Opts  *chartify.ChartifyOpts
	Clean func()
}

type CyclicReleaseTemplateInheritanceError added in v0.150.0

type CyclicReleaseTemplateInheritanceError struct {
	Message string
}

func (CyclicReleaseTemplateInheritanceError) Error added in v0.150.0

type Dependency

type Dependency struct {
	Chart   string `yaml:"chart"`
	Version string `yaml:"version"`
	Alias   string `yaml:"alias"`
}

type DependencyError added in v1.2.0

type DependencyError struct {
	Release    ReleaseSpec
	Dependency ReleaseSpec
}

DependencyError holds information about a release and its dependency that is not installed.

type DiffOpt

type DiffOpt interface{ Apply(*DiffOpts) }

type DiffOpts

type DiffOpts struct {
	Context int
	Output  string
	// Color forces the color output on helm-diff.
	// This takes effect only when NoColor is false.
	Color bool
	// NoColor forces disabling the color output on helm-diff.
	// If this is true, Color has no effect.
	NoColor                 bool
	Set                     []string
	SkipCleanup             bool
	SkipDiffOnInstall       bool
	DiffArgs                string
	ReuseValues             bool
	ResetValues             bool
	PostRenderer            string
	PostRendererArgs        []string
	SuppressOutputLineRegex []string
	SkipSchemaValidation    bool
	TakeOwnership           bool
	// DetectedKubeVersion is the Kubernetes version detected from the cluster.
	// This is used when kubeVersion is not specified in helmfile.yaml
	DetectedKubeVersion string
}

func (*DiffOpts) Apply

func (o *DiffOpts) Apply(opts *DiffOpts)

type EnvironmentSpec

type EnvironmentSpec struct {
	Values      []any    `yaml:"values,omitempty"`
	Secrets     []string `yaml:"secrets,omitempty"`
	KubeContext string   `yaml:"kubeContext,omitempty"`

	// MissingFileHandler instructs helmfile to fail when unable to find a environment values file listed
	// under `environments.NAME.values`.
	//
	// Possible values are  "Error", "Warn", "Info", "Debug". The default is "Error".
	//
	// Use "Warn", "Info", or "Debug" if you want helmfile to not fail when a values file is missing, while just leaving
	// a message about the missing file at the log-level.
	MissingFileHandler *string `yaml:"missingFileHandler,omitempty"`
	// MissingFileHandlerConfig is composed of various settings for the MissingFileHandler
	MissingFileHandlerConfig *MissingFileHandlerConfig `yaml:"missingFileHandlerConfig,omitempty"`
}

type EnvironmentTemplateData

type EnvironmentTemplateData struct {
	// Environment is accessible as `.Environment` from any template executed by the renderer
	Environment environment.Environment
	// Namespace is accessible as `.Namespace` from any non-values template executed by the renderer
	Namespace string
	// Values is accessible as `.Values` and it contains default state values overrode by environment values and override values.
	Values      map[string]any
	StateValues *map[string]any
}

EnvironmentTemplateData provides variables accessible while executing golang text/template expressions in helmfile and values YAML files

func NewEnvironmentTemplateData

func NewEnvironmentTemplateData(env environment.Environment, namespace string, values map[string]any) *EnvironmentTemplateData

type EnvironmentValuesLoader

type EnvironmentValuesLoader struct {
	// contains filtered or unexported fields
}

func NewEnvironmentValuesLoader

func NewEnvironmentValuesLoader(storage *Storage, fs *filesystem.FileSystem, logger *zap.SugaredLogger, remote *remote.Remote) *EnvironmentValuesLoader

func (*EnvironmentValuesLoader) LoadEnvironmentValues

func (ld *EnvironmentValuesLoader) LoadEnvironmentValues(missingFileHandler *string, valuesEntries []any, ctxEnv *environment.Environment, envName string) (map[string]any, error)

type HelmSpec

type HelmSpec struct {
	KubeContext string   `yaml:"kubeContext,omitempty"`
	Args        []string `yaml:"args,omitempty"`
	DiffArgs    []string `yaml:"diffArgs,omitempty"`
	SyncArgs    []string `yaml:"syncArgs,omitempty"`
	Verify      bool     `yaml:"verify"`
	Keyring     string   `yaml:"keyring,omitempty"`
	// EnableDNS, when set to true, enable DNS lookups when rendering templates
	EnableDNS bool `yaml:"enableDNS"`
	// Propagate '--skip-schema-validation' to helmv3 template and helm install
	SkipSchemaValidation *bool `yaml:"skipSchemaValidation,omitempty"`
	// Devel, when set to true, use development versions, too. Equivalent to version '>0.0.0-0'
	Devel bool `yaml:"devel"`
	// Wait, if set to true, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful
	Wait bool `yaml:"wait"`
	// WaitRetries, if set and --wait enabled, will retry any failed check on resource state, except if HTTP status code < 500 is received, subject to the specified number of retries
	// DEPRECATED: This field is ignored as the --wait-retries flag was removed from Helm. Preserved for backward compatibility.
	WaitRetries int `yaml:"waitRetries"`
	// WaitForJobs, if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. It will wait for as long as --timeout
	WaitForJobs bool `yaml:"waitForJobs"`
	// Timeout is the time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks, and waits on pod/pvc/svc/deployment readiness) (default 300)
	Timeout int `yaml:"timeout"`
	// RecreatePods, when set to true, instruct helmfile to perform pods restart for the resource if applicable
	RecreatePods bool `yaml:"recreatePods"`
	// Force, when set to true, forces resource update through delete/recreate if needed
	Force bool `yaml:"force"`
	// Atomic, when set to true, restore previous state in case of a failed install/upgrade attempt
	Atomic bool `yaml:"atomic"`
	// CleanupOnFail, when set to true, the --cleanup-on-fail helm flag is passed to the upgrade command
	CleanupOnFail bool `yaml:"cleanupOnFail,omitempty"`
	// HistoryMax, limit the maximum number of revisions saved per release. Use 0 for no limit (default 10)
	HistoryMax *int `yaml:"historyMax,omitempty"`
	// CreateNamespace, when set to true (default), --create-namespace is passed to helm on install/upgrade
	CreateNamespace *bool `yaml:"createNamespace,omitempty"`
	// SkipCRDs passes the --skip-crds flag to helm upgrade --install to ensure any CRDs contained in the crds/
	// subdirectory of a helm chart are not automatically applied with every helmfile sync or apply
	SkipCRDs bool `yaml:"skipCRDs,omitempty"`
	// SkipDeps disables running `helm dependency up` and `helm dependency build` on this release's chart.
	// This is relevant only when your release uses a local chart or a directory containing K8s manifests or a Kustomization
	// as a Helm chart.
	SkipDeps bool `yaml:"skipDeps"`
	// SkipRefresh disables running `helm dependency up`
	SkipRefresh bool `yaml:"skipRefresh"`
	// on helm upgrade/diff, reuse values currently set in the release and merge them with the ones defined within helmfile
	ReuseValues bool `yaml:"reuseValues"`
	// Propagate '--post-renderer' to helmv3 template and helm install
	PostRenderer *string `yaml:"postRenderer,omitempty"`
	// Propagate '--post-renderer-args' to helmv3 template and helm install
	PostRendererArgs []string `yaml:"postRendererArgs,omitempty"`
	// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
	Cascade *string `yaml:"cascade,omitempty"`
	// SuppressOutputLineRegex is a list of regexes to suppress output lines
	SuppressOutputLineRegex []string `yaml:"suppressOutputLineRegex,omitempty"`
	// DisableAutoDetectedKubeVersionForDiff controls whether auto-detected kubeVersion should be passed
	// to helm diff. When false (default), auto-detected kubeVersion is passed to fix issue #2275.
	// Set to true to only pass explicit kubeVersion from helmfile.yaml, preventing helm-diff from
	// normalizing server-side defaults which could hide real changes (e.g., ipFamilyPolicy, ipFamilies).
	DisableAutoDetectedKubeVersionForDiff *bool `yaml:"disableAutoDetectedKubeVersionForDiff,omitempty"`

	DisableValidation        *bool `yaml:"disableValidation,omitempty"`
	DisableOpenAPIValidation *bool `yaml:"disableOpenAPIValidation,omitempty"`
	// InsecureSkipTLSVerify is true if the TLS verification should be skipped when fetching remote chart
	InsecureSkipTLSVerify bool `yaml:"insecureSkipTLSVerify,omitempty"`
	// PlainHttp is true if the remote charte should be fetched using HTTP and not HTTPS
	PlainHttp bool `yaml:"plainHttp,omitempty"`
	// Wait, if set to true, will wait until all resources are deleted before mark delete command as successful
	DeleteWait bool `yaml:"deleteWait,omitempty"`
	// Timeout is the time in seconds to wait for helmfile delete command (default 300)
	DeleteTimeout int `yaml:"deleteTimeout,omitempty"`
	// SyncReleaseLabels is true if the release labels should be synced with the helmfile labels
	SyncReleaseLabels *bool `yaml:"syncReleaseLabels,omitempty"`
	// TakeOwnership is true if the helmfile should take ownership of the release
	TakeOwnership *bool `yaml:"takeOwnership,omitempty"`
	// TrackMode specifies whether to use 'helm' or 'kubedog' for tracking resources
	TrackMode string `yaml:"trackMode,omitempty"`
}

HelmSpec to defines helmDefault values

type HelmState

type HelmState struct {
	FilePath string

	ReleaseSetSpec `yaml:",inline"`

	// RenderedValues is the helmfile-wide values that is `.Values`
	// which is accessible from within the whole helmfile go template.
	// Note that this is usually computed by DesiredStateLoader from ReleaseSetSpec.Env
	RenderedValues map[string]any
	// contains filtered or unexported fields
}

HelmState structure for the helmfile

func (*HelmState) ApplyOverrides

func (st *HelmState) ApplyOverrides(spec *ReleaseSpec)

func (*HelmState) Clean

func (st *HelmState) Clean() []error

Clean will remove any generated secrets

func (*HelmState) DeleteReleases

func (st *HelmState) DeleteReleases(affectedReleases *AffectedReleases, helm helmexec.Interface, concurrency int, purge bool, cascade string) []error

DeleteReleases wrapper for executing helm delete on the releases

func (*HelmState) DeleteReleasesForSync

func (st *HelmState) DeleteReleasesForSync(affectedReleases *AffectedReleases, helm helmexec.Interface, workerLimit int, cascade string) []error

DeleteReleasesForSync deletes releases that are marked for deletion

func (*HelmState) DetectReleasesToBeDeleted

func (st *HelmState) DetectReleasesToBeDeleted(helm helmexec.Interface, releases []ReleaseSpec) ([]ReleaseSpec, error)

func (*HelmState) DetectReleasesToBeDeletedForSync

func (st *HelmState) DetectReleasesToBeDeletedForSync(helm helmexec.Interface, releases []ReleaseSpec) ([]ReleaseSpec, error)

func (*HelmState) DiffReleases

func (st *HelmState) DiffReleases(helm helmexec.Interface, additionalValues []string, workerLimit int, detailedExitCode bool, stripTrailingCR bool, includeTests bool, suppress []string, suppressSecrets, showSecrets, noHooks bool, suppressDiff, triggerCleanupEvents bool, opt ...DiffOpt) ([]ReleaseSpec, []error)

DiffReleases wrapper for executing helm diff on the releases It returns releases that had any changes, and errors if any.

This function has responsibility to stabilize the order of writes to stdout from multiple concurrent helm-diff runs. It's required to use the stdout from helmfile-diff to detect if there was another change(s) between 2 points in time. For example, terraform-provider-helmfile runs a helmfile-diff on `terraform plan` and another on `terraform apply`. `terraform`, by design, fails when helmfile-diff outputs were not equivalent. Stabilized helmfile-diff output rescues that.

func (*HelmState) ExecuteTemplates

func (st *HelmState) ExecuteTemplates() (*HelmState, error)

func (*HelmState) ExpandedHelmfiles

func (st *HelmState) ExpandedHelmfiles() ([]SubHelmfileSpec, error)

func (*HelmState) FilterReleases

func (st *HelmState) FilterReleases(includeTransitiveNeeds bool) error

FilterReleases allows for the execution of helm commands against a subset of the releases in the helmfile.

func (*HelmState) FullFilePath added in v0.148.0

func (st *HelmState) FullFilePath() (string, error)

func (*HelmState) GenerateOutputDir

func (st *HelmState) GenerateOutputDir(outputDir string, release *ReleaseSpec, outputDirTemplate string) (string, error)

func (*HelmState) GenerateOutputFilePath

func (st *HelmState) GenerateOutputFilePath(release *ReleaseSpec, outputFileTemplate string) (string, error)

func (*HelmState) GetReleasesWithLabels added in v1.0.0

func (st *HelmState) GetReleasesWithLabels() []ReleaseSpec

func (*HelmState) GetReleasesWithOverrides

func (st *HelmState) GetReleasesWithOverrides() ([]ReleaseSpec, error)

func (*HelmState) GetRepositoryAndNameFromChartName

func (st *HelmState) GetRepositoryAndNameFromChartName(chartName string) (*RepositorySpec, string)

func (*HelmState) GetSelectedReleases added in v0.148.1

func (st *HelmState) GetSelectedReleases(includeTransitiveNeeds bool) ([]ReleaseSpec, error)

func (*HelmState) HasTransitiveDependencyWithInstalledFalse added in v1.2.0

func (st *HelmState) HasTransitiveDependencyWithInstalledFalse(release ReleaseSpec, visited map[string]bool) *DependencyError

hasTransitiveDependencyWithInstallFalse checks if a release has a transitive dependency with Install set to false.

func (*HelmState) IsOCIChart added in v0.168.0

func (st *HelmState) IsOCIChart(chart string) bool

IsOCIChart returns true if the chart is an OCI chart

func (*HelmState) LintReleases

func (st *HelmState) LintReleases(helm helmexec.Interface, additionalValues []string, args []string, workerLimit int, opt ...LintOpt) []error

LintReleases wrapper for executing helm lint on the releases

func (*HelmState) LoadYAMLForEmbedding

func (st *HelmState) LoadYAMLForEmbedding(release *ReleaseSpec, entries []any, missingFileHandler *string, pathPrefix string) ([]any, error)

func (*HelmState) NeedsRepoUpdate added in v1.3.2

func (st *HelmState) NeedsRepoUpdate() bool

NeedsRepoUpdate returns true if there are any repositories that require `helm repo update`. OCI repositories don't need `helm repo update` as they use `helm registry login` instead.

func (*HelmState) PlanReleases

func (st *HelmState) PlanReleases(opts PlanOptions) ([][]Release, error)

func (*HelmState) PrepareChartify

func (st *HelmState) PrepareChartify(helm helmexec.Interface, release *ReleaseSpec, chart string, workerIndex int) (*Chartify, func(), error)

func (*HelmState) PrepareCharts

func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurrency int, helmfileCommand string, opts ChartPrepareOptions) (map[PrepareChartKey]string, []error)

PrepareCharts downloads and prepares all charts for the selected releases. Returns the chart paths and any errors encountered.

Note: OCI chart locks are acquired and released during chart download within this function. The tempDir cleanup is deferred until after helm operations complete in the caller, so charts remain available during helm commands even though locks are released.

func (*HelmState) ReleaseStatuses

func (st *HelmState) ReleaseStatuses(helm helmexec.Interface, workerLimit int) []error

func (*HelmState) RenderReleaseValuesFileToBytes

func (st *HelmState) RenderReleaseValuesFileToBytes(release *ReleaseSpec, path string) ([]byte, error)

func (*HelmState) ResolveDeps

func (st *HelmState) ResolveDeps() (*HelmState, error)

ResolveDeps returns a copy of this helmfile state with the concrete chart version numbers filled in for remote chart dependencies

func (*HelmState) Reverse

func (st *HelmState) Reverse()

func (*HelmState) SelectReleases added in v0.148.1

func (st *HelmState) SelectReleases(includeTransitiveNeeds bool) ([]Release, error)

func (*HelmState) SetKubeconfig added in v1.4.0

func (st *HelmState) SetKubeconfig(kubeconfig string)

func (*HelmState) SyncReleases

func (st *HelmState) SyncReleases(affectedReleases *AffectedReleases, helm helmexec.Interface, additionalValues []string, workerLimit int, opt ...SyncOpt) []error

SyncReleases wrapper for executing helm upgrade on the releases

func (*HelmState) SyncRepos

func (st *HelmState) SyncRepos(helm RepoUpdater, shouldSkip map[string]bool) ([]string, error)

func (*HelmState) TemplateReleases

func (st *HelmState) TemplateReleases(helm helmexec.Interface, outputDir string, additionalValues []string, args []string, workerLimit int,
	validate bool, opt ...TemplateOpt) []error

TemplateReleases wrapper for executing helm template on the releases

func (*HelmState) TestReleases

func (st *HelmState) TestReleases(helm helmexec.Interface, cleanup bool, timeout int, concurrency int, options ...TestOption) []error

TestReleases wrapper for executing helm test on the releases

func (*HelmState) ToYaml

func (st *HelmState) ToYaml() (string, error)

func (*HelmState) TriggerCleanupEvent

func (st *HelmState) TriggerCleanupEvent(r *ReleaseSpec, helmfileCommand string) (bool, error)

func (*HelmState) TriggerGlobalCleanupEvent

func (st *HelmState) TriggerGlobalCleanupEvent(helmfileCommand string) (bool, error)

func (*HelmState) TriggerGlobalPrepareEvent

func (st *HelmState) TriggerGlobalPrepareEvent(helmfileCommand string) (bool, error)

func (*HelmState) TriggerPreapplyEvent added in v0.146.0

func (st *HelmState) TriggerPreapplyEvent(r *ReleaseSpec, helmfileCommand string) (bool, error)

func (*HelmState) UnittestReleases added in v1.3.0

func (st *HelmState) UnittestReleases(helm helmexec.Interface, additionalValues []string, args []string, _ int, opt ...UnittestOpt) []error

UnittestReleases runs helm unittest on each release that has unitTests defined. The workerLimit parameter is currently unused but kept for API consistency with similar methods (e.g., LintReleases).

func (*HelmState) UnmarshalYAML added in v0.150.0

func (hs *HelmState) UnmarshalYAML(unmarshal func(any) error) error

func (*HelmState) UpdateDeps

func (st *HelmState) UpdateDeps(helm helmexec.Interface, includeTransitiveNeeds bool) []error

UpdateDeps wrapper for updating dependencies on the releases

func (*HelmState) Values

func (st *HelmState) Values() map[string]any

func (*HelmState) WriteReleasesValues

func (st *HelmState) WriteReleasesValues(helm helmexec.Interface, additionalValues []string, opt ...WriteValuesOpt) []error

WriteReleasesValues writes values files for releases

type Inherit added in v0.150.0

type Inherit struct {
	Template string   `yaml:"template,omitempty"`
	Except   []string `yaml:"except,omitempty"`
}

type Inherits added in v0.151.0

type Inherits []Inherit

func (*Inherits) UnmarshalYAML added in v0.151.0

func (r *Inherits) UnmarshalYAML(unmarshal func(any) error) error

type InvalidUpdateStrategyError added in v1.1.9

type InvalidUpdateStrategyError struct {
	UpdateStrategy string
}

func (*InvalidUpdateStrategyError) Error added in v1.1.9

type LabelFilter

type LabelFilter struct {
	// contains filtered or unexported fields
}

LabelFilter matches a release with the given positive lables. Negative labels invert the match for cases such as tier!=backend

func ParseLabels

func ParseLabels(l string) (LabelFilter, error)

ParseLabels takes a label in the form foo=bar,baz!=bat and returns a LabelFilter that will match the labels

func (LabelFilter) Match

func (l LabelFilter) Match(r ReleaseSpec) bool

Match will match a release that has the same labels as the filter

type LintOpt

type LintOpt interface{ Apply(*LintOpts) }

type LintOpts

type LintOpts struct {
	Set         []string
	SkipCleanup bool
}

func (*LintOpts) Apply

func (o *LintOpts) Apply(opts *LintOpts)

type MissingFileHandlerConfig added in v0.151.0

type MissingFileHandlerConfig struct {
	// IgnoreMissingGitBranch is set to true in order to let the missing file handler
	// treat missing git branch errors like `pathspec 'develop' did not match any file(s) known to git` safe
	// and ignored when the handler is set to Warn or Info.
	IgnoreMissingGitBranch bool `yaml:"ignoreMissingGitBranch,omitempty"`
}

type PlanOptions

type PlanOptions struct {
	Purpose                string
	Reverse                bool
	IncludeNeeds           bool
	IncludeTransitiveNeeds bool
	SkipNeeds              bool
	SelectedReleases       []ReleaseSpec
}

type PrepareChartKey

type PrepareChartKey struct {
	Namespace, Name, KubeContext string
}

type Release

type Release struct {
	ReleaseSpec

	Filtered bool
}

type ReleaseError

type ReleaseError struct {
	*ReleaseSpec

	Code int
	// contains filtered or unexported fields
}

func NewReleaseError

func NewReleaseError(release *ReleaseSpec, err error, code int) *ReleaseError

func (*ReleaseError) Error

func (e *ReleaseError) Error() string

type ReleaseFilter

type ReleaseFilter interface {
	// Match returns true if the ReleaseSpec matches the Filter
	Match(r ReleaseSpec) bool
}

ReleaseFilter is used to determine if a given release should be used during helmfile execution

type ReleaseSetSpec

type ReleaseSetSpec struct {
	DefaultHelmBinary      string `yaml:"helmBinary,omitempty"`
	DefaultKustomizeBinary string `yaml:"kustomizeBinary,omitempty"`

	// DefaultValues is the default values to be overrode by environment values and command-line overrides
	DefaultValues []any `yaml:"values,omitempty"`

	Environments map[string]EnvironmentSpec `yaml:"environments,omitempty"`

	Bases        []string          `yaml:"bases,omitempty"`
	HelmDefaults HelmSpec          `yaml:"helmDefaults,omitempty"`
	Helmfiles    []SubHelmfileSpec `yaml:"helmfiles,omitempty"`

	OverrideKubeContext string            `yaml:"kubeContext,omitempty"`
	OverrideNamespace   string            `yaml:"namespace,omitempty"`
	OverrideChart       string            `yaml:"chart,omitempty"`
	Repositories        []RepositorySpec  `yaml:"repositories,omitempty"`
	CommonLabels        map[string]string `yaml:"commonLabels,omitempty"`
	Releases            []ReleaseSpec     `yaml:"releases,omitempty"`
	OrginReleases       []ReleaseSpec     `yaml:"-"`
	Selectors           []string          `yaml:"-"`

	// Capabilities.APIVersions
	ApiVersions []string `yaml:"apiVersions,omitempty"`

	// Capabilities.KubeVersion
	KubeVersion string `yaml:"kubeVersion,omitempty"`

	// Hooks is a list of extension points paired with operations, that are executed in specific points of the lifecycle of releases defined in helmfile
	Hooks []event.Hook `yaml:"hooks,omitempty"`

	Templates map[string]TemplateSpec `yaml:"templates"`

	Env environment.Environment `yaml:"-"`

	// If set to "Error", return an error when a subhelmfile points to a
	// non-existent path. The default behavior is to print a warning. Note the
	// differing default compared to other MissingFileHandlers.
	MissingFileHandler *string `yaml:"missingFileHandler,omitempty"`
	// MissingFileHandlerConfig is composed of various settings for the MissingFileHandler
	MissingFileHandlerConfig *MissingFileHandlerConfig `yaml:"missingFileHandlerConfig,omitempty"`

	LockFile string `yaml:"lockFilePath,omitempty"`
}

ReleaseSetSpec is release set spec

type ReleaseSpec

type ReleaseSpec struct {
	// Chart is the name of the chart being installed to create this release
	Chart string `yaml:"chart,omitempty"`

	// ChartPath is the downloaded and modified version of the remote Chart specified by the Chart field.
	// This field is empty when the release is going to use the remote chart as-is, without any modifications(e.g. chartify).
	ChartPath string `yaml:"chartPath,omitempty"`

	// Directory is an alias to Chart which may be of more fit when you want to use a local/remote directory containing
	// K8s manifests or Kustomization as a chart
	Directory string `yaml:"directory,omitempty"`
	// Version is the semver version or version constraint for the chart
	Version string `yaml:"version,omitempty"`
	// Verify enables signature verification on fetched chart.
	// Beware some (or many?) chart repositories and charts don't seem to support it.
	Verify  *bool  `yaml:"verify,omitempty"`
	Keyring string `yaml:"keyring,omitempty"`
	// EnableDNS, when set to true, enable DNS lookups when rendering templates
	EnableDNS *bool `yaml:"enableDNS,omitempty"`
	// Devel, when set to true, use development versions, too. Equivalent to version '>0.0.0-0'
	Devel *bool `yaml:"devel,omitempty"`
	// Wait, if set to true, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful
	Wait *bool `yaml:"wait,omitempty"`
	// WaitRetries, if set and --wait enabled, will retry any failed check on resource state, except if HTTP status code < 500 is received, subject to the specified number of retries
	// DEPRECATED: This field is ignored as the --wait-retries flag was removed from Helm. Preserved for backward compatibility.
	WaitRetries *int `yaml:"waitRetries,omitempty"`
	// WaitForJobs, if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. It will wait for as long as --timeout
	WaitForJobs *bool `yaml:"waitForJobs,omitempty"`
	// Timeout is the time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks, and waits on pod/pvc/svc/deployment readiness) (default 300)
	Timeout *int `yaml:"timeout,omitempty"`
	// RecreatePods, when set to true, instruct helmfile to perform pods restart for the resource if applicable
	RecreatePods *bool `yaml:"recreatePods,omitempty"`
	// Force, when set to true, forces resource update through delete/recreate if needed
	Force *bool `yaml:"force,omitempty"`
	// Installed, when set to true, `delete --purge` the release
	Installed *bool `yaml:"installed,omitempty"`
	// UpdateStrategy, when set, indicate the strategy to use to update the release
	UpdateStrategy string `yaml:"updateStrategy,omitempty"`
	// Atomic, when set to true, restore previous state in case of a failed install/upgrade attempt
	Atomic *bool `yaml:"atomic,omitempty"`
	// CleanupOnFail, when set to true, the --cleanup-on-fail helm flag is passed to the upgrade command
	CleanupOnFail *bool `yaml:"cleanupOnFail,omitempty"`
	// HistoryMax, limit the maximum number of revisions saved per release. Use 0 for no limit (default 10)
	HistoryMax *int `yaml:"historyMax,omitempty"`
	// Condition, when set, evaluate the mapping specified in this string to a boolean which decides whether or not to process the release
	Condition string `yaml:"condition,omitempty"`
	// CreateNamespace, when set to true (default), --create-namespace is passed to helm on install
	CreateNamespace *bool `yaml:"createNamespace,omitempty"`
	// ReuseValues, on helm upgrade/diff, reuse values currently set in the release and merge them with the ones defined within helmfile
	ReuseValues *bool `yaml:"reuseValues,omitempty"`

	// DisableOpenAPIValidation is rarely used to bypass OpenAPI validations only that is used for e.g.
	// work-around against broken CRs
	// See also:
	// - https://github.com/helm/helm/pull/6819
	// - https://github.com/roboll/helmfile/issues/1167
	DisableOpenAPIValidation *bool `yaml:"disableOpenAPIValidation,omitempty"`

	// DisableValidation is rarely used to bypass the whole validation of manifests against the Kubernetes cluster
	// so that `helm diff` can be run containing a chart that installs both CRD and CRs on first install.
	// FYI, such diff without `--disable-validation` fails on first install because the K8s cluster doesn't have CRDs registered yet.
	DisableValidation *bool `yaml:"disableValidation,omitempty"`

	// DisableValidationOnInstall disables the K8s API validation while running helm-diff on the release being newly installed on helmfile-apply.
	// It is useful when any release contains custom resources for CRDs that is not yet installed onto the cluster.
	DisableValidationOnInstall *bool `yaml:"disableValidationOnInstall,omitempty"`

	// MissingFileHandler is set to either "Error" or "Warn". "Error" instructs helmfile to fail when unable to find a values or secrets file. When "Warn", it prints the file and continues.
	// The default value for MissingFileHandler is "Error".
	MissingFileHandler *string `yaml:"missingFileHandler,omitempty"`

	// MissingFileHandlerConfig is composed of various settings for the MissingFileHandler
	MissingFileHandlerConfig *MissingFileHandlerConfig `yaml:"missingFileHandlerConfig,omitempty"`

	// Needs is the [KUBECONTEXT/][NS/]NAME representations of releases that this release depends on.
	Needs []string `yaml:"needs,omitempty"`

	// Hooks is a list of extension points paired with operations, that are executed in specific points of the lifecycle of releases defined in helmfile
	Hooks []event.Hook `yaml:"hooks,omitempty"`

	// UnitTests is a list of test file or directory paths for helm-unittest integration.
	// When specified, `helmfile unittest` will run `helm unittest` with the merged values and these test paths.
	UnitTests []string `yaml:"unitTests,omitempty"`

	// Name is the name of this release
	Name            string            `yaml:"name,omitempty"`
	Namespace       string            `yaml:"namespace,omitempty"`
	Labels          map[string]string `yaml:"labels,omitempty"`
	Values          []any             `yaml:"values,omitempty"`
	Secrets         []any             `yaml:"secrets,omitempty"`
	SetValues       []SetValue        `yaml:"set,omitempty"`
	SetStringValues []SetValue        `yaml:"setString,omitempty"`

	ValuesTemplate    []any      `yaml:"valuesTemplate,omitempty"`
	SetValuesTemplate []SetValue `yaml:"setTemplate,omitempty"`

	// Capabilities.APIVersions
	ApiVersions []string `yaml:"apiVersions,omitempty"`

	// Capabilities.KubeVersion
	KubeVersion string `yaml:"kubeVersion,omitempty"`

	// The 'env' section is not really necessary any longer, as 'set' would now provide the same functionality
	EnvValues []SetValue `yaml:"env,omitempty"`

	ValuesPathPrefix string `yaml:"valuesPathPrefix,omitempty"`

	KubeContext string `yaml:"kubeContext,omitempty"`

	// InsecureSkipTLSVerify is true if the TLS verification should be skipped when fetching remote chart.
	InsecureSkipTLSVerify bool `yaml:"insecureSkipTLSVerify,omitempty"`

	// PlainHttp is true if the remote charte should be fetched using HTTP and not HTTPS
	PlainHttp bool `yaml:"plainHttp,omitempty"`

	// These values are used in templating
	VerifyTemplate    *string `yaml:"verifyTemplate,omitempty"`
	WaitTemplate      *string `yaml:"waitTemplate,omitempty"`
	InstalledTemplate *string `yaml:"installedTemplate,omitempty"`

	// These settings requires helm-x integration to work
	Dependencies          []Dependency `yaml:"dependencies,omitempty"`
	JSONPatches           []any        `yaml:"jsonPatches,omitempty"`
	StrategicMergePatches []any        `yaml:"strategicMergePatches,omitempty"`

	// Transformers is the list of Kustomize transformers
	//
	// Each item can be a path to a YAML or go template file, or an embedded transformer declaration as a YAML hash.
	// It's often used to add common labels and annotations to your resources.
	// See https://github.com/kubernetes-sigs/kustomize/blob/master/examples/configureBuiltinPlugin.md#configuring-the-builtin-plugins-instead for more information.
	Transformers []any    `yaml:"transformers,omitempty"`
	Adopt        []string `yaml:"adopt,omitempty"`

	// ForceGoGetter forces the use of go-getter for fetching remote directory as maniefsts/chart/kustomization
	// by parsing the url from `chart` field of the release.
	// This is handy when getting the go-getter url parsing error when it doesn't work as expected.
	// Without this, any error in url parsing result in silently falling-back to normal process of treating `chart:` as the regular
	// helm chart name.
	ForceGoGetter bool `yaml:"forceGoGetter,omitempty"`

	// ForceNamespace is an experimental feature to set metadata.namespace in every K8s resource rendered by the chart,
	// regardless of the template, even when it doesn't have `namespace: {{ .Namespace | quote }}`.
	// This is only needed when you can't FIX your chart to have `namespace: {{ .Namespace }}` AND you're using `helmfile template`.
	// In standard use-cases, `Namespace` should be sufficient.
	// Use this only when you know what you want to do!
	ForceNamespace string `yaml:"forceNamespace,omitempty"`

	// SkipDeps disables running `helm dependency up` and `helm dependency build` on this release's chart.
	// This is relevant only when your release uses a local chart or a directory containing K8s manifests or a Kustomization
	// as a Helm chart.
	SkipDeps *bool `yaml:"skipDeps,omitempty"`

	// SkipRefresh disables running `helm dependency up`
	SkipRefresh *bool `yaml:"skipRefresh,omitempty"`

	// Propagate '--post-renderer' to helmv3 template and helm install
	PostRenderer *string `yaml:"postRenderer,omitempty"`

	// Propagate '--skip-schema-validation' to helmv3 template and helm install
	SkipSchemaValidation *bool `yaml:"skipSchemaValidation,omitempty"`

	// Propagate '--post-renderer-args' to helmv3 template and helm install
	PostRendererArgs []string `yaml:"postRendererArgs,omitempty"`

	// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
	Cascade *string `yaml:"cascade,omitempty"`

	// SuppressOutputLineRegex is a list of regexes to suppress output lines
	SuppressOutputLineRegex []string `yaml:"suppressOutputLineRegex,omitempty"`
	// DisableAutoDetectedKubeVersionForDiff controls whether auto-detected kubeVersion should be passed
	// to helm diff for this release. See HelmSpec.DisableAutoDetectedKubeVersionForDiff for details.
	DisableAutoDetectedKubeVersionForDiff *bool `yaml:"disableAutoDetectedKubeVersionForDiff,omitempty"`

	// Inherit is used to inherit a release template from a release or another release template
	Inherit Inherits `yaml:"inherit,omitempty"`

	// SuppressDiff skip the helm diff output. Useful for charts which produces large not helpful diff.
	SuppressDiff *bool `yaml:"suppressDiff,omitempty"`

	// --wait flag for destroy/delete, if set to true, will wait until all resources are deleted before mark delete command as successful
	DeleteWait *bool `yaml:"deleteWait,omitempty"`
	// Timeout is the time in seconds to wait for helmfile delete command (default 300)
	DeleteTimeout *int `yaml:"deleteTimeout,omitempty"`
	// SyncReleaseLabels is true if the release labels should be synced with the helmfile labels
	SyncReleaseLabels *bool `yaml:"syncReleaseLabels,omitempty"`
	// TakeOwnership is true if release should take ownership of resources
	TakeOwnership *bool `yaml:"takeOwnership,omitempty"`
	// TrackMode specifies whether to use 'helm' or 'kubedog' for tracking resources
	TrackMode string `yaml:"trackMode,omitempty"`
	// TrackTimeout specifies timeout for kubedog tracking (in seconds)
	TrackTimeout *int `yaml:"trackTimeout,omitempty"`
	// TrackLogs enables log streaming with kubedog
	TrackLogs *bool `yaml:"trackLogs,omitempty"`
	// TrackKinds is a whitelist of resource kinds to track
	TrackKinds []string `yaml:"trackKinds,omitempty"`
	// SkipKinds is a blacklist of resource kinds to skip tracking
	SkipKinds []string `yaml:"skipKinds,omitempty"`
	// TrackResources is a whitelist of specific resources to track
	TrackResources []TrackResourceSpec `yaml:"trackResources,omitempty"`
	// KubedogQPS specifies the QPS (queries per second) for kubedog kubernetes client
	KubedogQPS *float32 `yaml:"kubedogQPS,omitempty"`
	// KubedogBurst specifies the burst for kubedog kubernetes client
	KubedogBurst *int `yaml:"kubedogBurst,omitempty"`
	// contains filtered or unexported fields
}

ReleaseSpec defines the configuration for a Helm release managed by helmfile.

func (ReleaseSpec) ChartPathOrName

func (r ReleaseSpec) ChartPathOrName() string

ChartPathOrName returns ChartPath if it is non-empty, and returns Chart otherwise. This is useful to redirect helm commands like `helm template`, `helm dependency update`, `helm diff`, and `helm upgrade --install` to our modified version of the chart, in case the user configured Helmfile to do modify the chart before being passed to Helm.

func (ReleaseSpec) Clone

func (r ReleaseSpec) Clone() (*ReleaseSpec, error)

func (ReleaseSpec) Desired

func (r ReleaseSpec) Desired() bool

func (ReleaseSpec) ExecuteTemplateExpressions

func (r ReleaseSpec) ExecuteTemplateExpressions(renderer *tmpl.FileRenderer) (*ReleaseSpec, error)

type RepoUpdater

type RepoUpdater interface {
	IsHelm3() bool
	IsHelm4() bool
	AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials, skipTLSVerify bool) error
	UpdateRepo() error
	RegistryLogin(name, username, password, caFile, certFile, keyFile string, skipTLSVerify bool) error
}

type RepositorySpec

type RepositorySpec struct {
	Name            string `yaml:"name,omitempty"`
	URL             string `yaml:"url,omitempty"`
	CaFile          string `yaml:"caFile,omitempty"`
	CertFile        string `yaml:"certFile,omitempty"`
	KeyFile         string `yaml:"keyFile,omitempty"`
	Username        string `yaml:"username,omitempty"`
	Password        string `yaml:"password,omitempty"`
	RegistryConfig  string `yaml:"registryConfig,omitempty"`
	Managed         string `yaml:"managed,omitempty"`
	OCI             bool   `yaml:"oci,omitempty"`
	Verify          bool   `yaml:"verify,omitempty"`
	Keyring         string `yaml:"keyring,omitempty"`
	PassCredentials bool   `yaml:"passCredentials,omitempty"`
	SkipTLSVerify   bool   `yaml:"skipTLSVerify,omitempty"`
	PlainHttp       bool   `yaml:"plainHttp,omitempty"`
}

RepositorySpec that defines values for a helm repo

type ResolvedChartDependency

type ResolvedChartDependency struct {
	// ChartName identifies the dependant chart. In Helmfile, ChartName for `chart: stable/envoy` would be just `envoy`.
	// It can't be collided with other charts referenced in the same helmfile spec.
	// That is, collocating `chart: incubator/foo` and `chart: stable/foo` isn't allowed. Name them differently for a work-around.
	ChartName string `yaml:"name"`
	// Repository contains the URL for the helm chart repository that hosts the chart identified by ChartName
	Repository string `yaml:"repository"`
	// Version is the version number of the dependent chart.
	// In the context of helmfile this can be omitted. When omitted, it is considered `*` which results helm/helmfile fetching the latest version.
	Version string `yaml:"version"`
}

type ResolvedDependencies

type ResolvedDependencies struct {
	// contains filtered or unexported fields
}

func (*ResolvedDependencies) Get

func (d *ResolvedDependencies) Get(chart, versionConstraint string) (string, error)

type SetValue

type SetValue struct {
	Name   string   `yaml:"name,omitempty"`
	Value  string   `yaml:"value,omitempty"`
	File   string   `yaml:"file,omitempty"`
	Values []string `yaml:"values,omitempty"`
}

SetValue are the key values to set on a helm release

type StateCreator

type StateCreator struct {
	Strict bool

	LoadFile func(inheritedEnv, overrodeEnv *environment.Environment, baseDir, file string, evaluateBases bool) (*HelmState, error)
	// contains filtered or unexported fields
}

func NewCreator

func NewCreator(logger *zap.SugaredLogger, fs *filesystem.FileSystem, valsRuntime vals.Evaluator, getHelm func(*HelmState) (helmexec.Interface, error), overrideHelmBinary string, overrideKustomizeBinary string, remote *remote.Remote, enableLiveOutput bool, lockFile string) *StateCreator

func (*StateCreator) ApplyDefaultsAndOverrides added in v1.3.1

func (c *StateCreator) ApplyDefaultsAndOverrides(state *HelmState)

ApplyDefaultsAndOverrides applies default binary paths and command-line overrides. This is an exported version of applyDefaultsAndOverrides for use by the app package.

func (*StateCreator) LoadEnvValues

func (c *StateCreator) LoadEnvValues(target *HelmState, env string, failOnMissingEnv bool, ctxEnv, overrode *environment.Environment) (*HelmState, error)

LoadEnvValues loads environment values files relative to the `baseDir`

func (*StateCreator) Parse

func (c *StateCreator) Parse(content []byte, baseDir, file string) (*HelmState, error)

Parse parses YAML into HelmState

func (*StateCreator) ParseAndLoad

func (c *StateCreator) ParseAndLoad(content []byte, baseDir, file string, envName string, failOnMissingEnv, evaluateBases, applyDefaults bool, envValues, overrode *environment.Environment) (*HelmState, error)

Parses YAML into HelmState, while loading environment values files relative to the `baseDir` evaluateBases=true means that this is NOT a base helmfile applyDefaults=true means that applyDefaultsAndOverrides should be called

type StateLoadError

type StateLoadError struct {
	Msg   string
	Cause error
}

func (*StateLoadError) Error

func (e *StateLoadError) Error() string

type Storage

type Storage struct {
	FilePath string
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(forFile string, logger *zap.SugaredLogger, fs *filesystem.FileSystem) *Storage

func (*Storage) ExpandPaths

func (st *Storage) ExpandPaths(globPattern string) ([]string, error)

func (*Storage) JoinBase

func (st *Storage) JoinBase(relPath string) string

JoinBase returns an absolute path in the form basePath/relative Helm's setFiles command does not support unescaped filepath separators (\) on Windows. Instead, it requires double backslashes (\\) as filepath separators. See https://github.com/helm/helm/issues/9537

type SubHelmfileSpec

type SubHelmfileSpec struct {
	//path or glob pattern for the sub helmfiles
	Path string `yaml:"path,omitempty"`
	//chosen selectors for the sub helmfiles
	Selectors []string `yaml:"selectors,omitempty"`
	//do the sub helmfiles inherits from parent selectors
	SelectorsInherited bool `yaml:"selectorsInherited,omitempty"`

	Environment SubhelmfileEnvironmentSpec
}

SubHelmfileSpec defines the subhelmfile path and options

func (SubHelmfileSpec) MarshalYAML

func (p SubHelmfileSpec) MarshalYAML() (any, error)

MarshalYAML will ensure we correctly marshal SubHelmfileSpec structure correctly so it can be unmarshalled at some future time

func (*SubHelmfileSpec) UnmarshalYAML

func (hf *SubHelmfileSpec) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML will unmarshal the helmfile yaml section and fill the SubHelmfileSpec structure this is required go-yto keep allowing string scalar for defining helmfile

type SubhelmfileEnvironmentSpec

type SubhelmfileEnvironmentSpec struct {
	OverrideValues []any `yaml:"values,omitempty"`
}

SubhelmfileEnvironmentSpec is the environment spec for a subhelmfile

type SyncOpt

type SyncOpt interface{ Apply(*SyncOpts) }

type SyncOpts

type SyncOpts struct {
	Set                  []string
	SkipCleanup          bool
	SkipCRDs             bool
	Wait                 bool
	WaitRetries          int
	WaitForJobs          bool
	Timeout              int
	SyncReleaseLabels    bool
	ReuseValues          bool
	ResetValues          bool
	PostRenderer         string
	SkipSchemaValidation bool
	PostRendererArgs     []string
	SyncArgs             string
	HideNotes            bool
	TakeOwnership        bool
	TrackMode            string
	TrackTimeout         int
	TrackLogs            bool
}

func (*SyncOpts) Apply

func (o *SyncOpts) Apply(opts *SyncOpts)

type TemplateOpt

type TemplateOpt interface{ Apply(*TemplateOpts) }

type TemplateOpts

type TemplateOpts struct {
	Set               []string
	SkipCleanup       bool
	OutputDirTemplate string
	IncludeCRDs       bool
	NoHooks           bool
	SkipTests         bool
	PostRenderer      string
	PostRendererArgs  []string
	KubeVersion       string
	ShowOnly          []string
	// Propagate '--skip-schema-validation' to helmv3 template and helm install
	SkipSchemaValidation bool
}

func (*TemplateOpts) Apply

func (o *TemplateOpts) Apply(opts *TemplateOpts)

type TemplateSpec

type TemplateSpec struct {
	ReleaseSpec `yaml:",inline"`
}

TemplateSpec defines the structure of a reusable and composable template for helm releases.

type TestOption

type TestOption func(*TestOpts)

type TestOpts

type TestOpts struct {
	Logs bool
}

type TrackResourceSpec added in v1.4.0

type TrackResourceSpec struct {
	Kind      string `yaml:"kind,omitempty"`
	Name      string `yaml:"name,omitempty"`
	Namespace string `yaml:"namespace,omitempty"`
}

TrackResourceSpec specifies a resource to track

type UndefinedEnvError

type UndefinedEnvError struct {
	Env string
}

func (*UndefinedEnvError) Error

func (e *UndefinedEnvError) Error() string

type UnittestOpt added in v1.3.0

type UnittestOpt interface {
	Apply(*UnittestOpts)
}

UnittestOpt is a functional option for UnittestOpts

type UnittestOpts added in v1.3.0

type UnittestOpts struct {
	Set         []string
	SkipCleanup bool
	FailFast    bool
	Color       bool
	DebugPlugin bool
}

UnittestOpts is the options for the unittest command

func (*UnittestOpts) Apply added in v1.3.0

func (o *UnittestOpts) Apply(opts *UnittestOpts)

Apply implements UnittestOpt

type UnresolvedDependencies

type UnresolvedDependencies struct {
	// contains filtered or unexported fields
}

func (*UnresolvedDependencies) Add

func (d *UnresolvedDependencies) Add(chart, url, versionConstraint, alias string)

func (*UnresolvedDependencies) ToChartRequirements

func (d *UnresolvedDependencies) ToChartRequirements() *ChartRequirements

type WriteValuesOpt

type WriteValuesOpt interface{ Apply(*WriteValuesOpts) }

type WriteValuesOpts

type WriteValuesOpts struct {
	Set                []string
	OutputFileTemplate string
	SkipCleanup        bool
}

func (*WriteValuesOpts) Apply

func (o *WriteValuesOpts) Apply(opts *WriteValuesOpts)

Jump to

Keyboard shortcuts

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