Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeHelmValues ¶
func MergeHelmValues(baseValues, userValues, vendorValues string, preserveComments bool) (string, error)
MergeHelmValues merges user edited values from state file and vendor values from upstream Helm repo. base is the original config from state user is the modified config from state vendor is the new config from current chart Value priorities: user, vendor, base
Types ¶
type ChartFetcher ¶
type ChartFetcher interface { FetchChart( ctx context.Context, asset api.HelmAsset, meta api.ReleaseMetadata, configGroups []libyaml.ConfigGroup, templateContext map[string]interface{}, ) (string, error) }
ChartFetcher fetches a chart based on an asset. it returns the location that the chart was unpacked to, usually a temporary directory
func NewFetcher ¶
func NewFetcher( logger log.Logger, github github.Renderer, fs afero.Afero, helmCommands Commands, ) ChartFetcher
NewFetcher makes a new chart fetcher
type ClientFetcher ¶
type ClientFetcher struct { Logger log.Logger GitHub github.Renderer FS afero.Afero HelmCommands Commands }
ClientFetcher is a ChartFetcher that does all the pulling/cloning client side
func (*ClientFetcher) FetchChart ¶
func (f *ClientFetcher) FetchChart( ctx context.Context, asset api.HelmAsset, meta api.ReleaseMetadata, configGroups []libyaml.ConfigGroup, templateContext map[string]interface{}, ) (string, error)
type Commands ¶
type Commands interface { Init() error MaybeDependencyUpdate(chartRoot string, requirements chartutil.Requirements) error Template(chartName string, args []string) error Fetch(chartRef, repoURL, version, dest, home string) error RepoAdd(name, url, home string) error }
Commands are Helm commands that are available to the Ship binary.
type LocalRenderer ¶
type LocalRenderer struct { Templater Templater Fetcher ChartFetcher GitHub github.Renderer }
LocalRenderer can add a helm step to the plan, the step will fetch the chart to a temporary location and then run a local operation to run the helm templating
func (*LocalRenderer) Execute ¶
func (r *LocalRenderer) Execute( rootFs root.Fs, asset api.HelmAsset, meta api.ReleaseMetadata, templateContext map[string]interface{}, configGroups []libyaml.ConfigGroup, ) func(ctx context.Context) error
type LocalTemplater ¶
type LocalTemplater struct { Commands Commands Logger log.Logger FS afero.Afero BuilderBuilder *templates.BuilderBuilder Viper *viper.Viper StateManager state.Manager // contains filtered or unexported fields }
LocalTemplater implements Templater by using the Commands interface from pkg/helm and creating the chart in place
func (*LocalTemplater) Template ¶
func (f *LocalTemplater) Template( chartRoot string, rootFs root.Fs, asset api.HelmAsset, meta api.ReleaseMetadata, configGroups []libyaml.ConfigGroup, templateContext map[string]interface{}, ) error
type Renderer ¶
type Renderer interface { Execute( rootFs root.Fs, asset api.HelmAsset, meta api.ReleaseMetadata, templateContext map[string]interface{}, configGroups []libyaml.ConfigGroup, ) func(ctx context.Context) error }
Renderer is something that can render a helm asset as part of a planner.Plan
func NewRenderer ¶
func NewRenderer(cloner ChartFetcher, templater Templater, github github.Renderer) Renderer
NewRenderer makes a new renderer
type Templater ¶
type Templater interface { Template( chartRoot string, rootFs root.Fs, asset api.HelmAsset, meta api.ReleaseMetadata, configGroups []libyaml.ConfigGroup, templateContext map[string]interface{}, ) error }
Templater is something that can consume and render a helm chart pulled by ship. the chart should already be present at the specified path.