chart_extender

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 32 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultSecretValuesFileName = "secret-values.yaml"
	SecretDirName               = "secret"
)

Variables

View Source
var ChartTemplateHelpers = `` /* 1352-byte string literal not displayed */

Functions

func AutosetChartMetadata

func AutosetChartMetadata(metadataIn *chart.Metadata, opts GetHelmChartMetadataOptions) *chart.Metadata

func GetChartDependenciesCacheDir

func GetChartDependenciesCacheDir(lockDigest string) string

func GetPreparedChartDependenciesDir

func GetPreparedChartDependenciesDir(ctx context.Context, lockDigest string, lockFileData []byte, chartFileData []byte, helmEnvSettings *cli.EnvSettings, buildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions) (string, error)

func GetSecretDirFiles

func GetSecretDirFiles(loadedChartFiles []*chart.ChartExtenderBufferedFile) []*chart.ChartExtenderBufferedFile

func GetSecretValuesFiles

func GetSecretValuesFiles(chartDir string, loadedChartFiles []*chart.ChartExtenderBufferedFile, opts SecretValuesFilesOptions) []*chart.ChartExtenderBufferedFile

func GetServiceValues

func GetServiceValues(ctx context.Context, projectName string, repo string, imageInfoGetters []*imagePkg.InfoGetter, opts ServiceValuesOptions) (map[string]interface{}, error)

func LoadChartDependencies

func LoadChartDependencies(ctx context.Context, loadedFiles []*chart.ChartExtenderBufferedFile, helmEnvSettings *cli.EnvSettings, buildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions) ([]*chart.ChartExtenderBufferedFile, error)

func LoadChartSecretDirFilesData

func LoadChartSecretDirFilesData(chartDir string, secretFiles []*chart.ChartExtenderBufferedFile, encoder *secret.YamlEncoder) (map[string]string, error)

func LoadChartSecretValueFiles

func LoadChartSecretValueFiles(chartDir string, secretDirFiles []*chart.ChartExtenderBufferedFile, encoder *secret.YamlEncoder) (map[string]interface{}, error)

func LoadMetadata

func LoadMetadata(files []*chart.ChartExtenderBufferedFile) (*chart.Metadata, error)

func SetupIncludeWrapperFuncs

func SetupIncludeWrapperFuncs(funcMap template.FuncMap)

func SetupWerfImageDeprecationFunc

func SetupWerfImageDeprecationFunc(ctx context.Context, funcMap template.FuncMap)

func WriteDockerConfigJsonValue

func WriteDockerConfigJsonValue(ctx context.Context, values map[string]interface{}, dockerConfigPath string) error

Types

type Bundle

type Bundle struct {
	Dir                        string
	HelmChart                  *chart.Chart
	HelmEnvSettings            *cli.EnvSettings
	BuildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions

	*ExtraValuesData
	*ChartExtenderContextData
}

* Bundle object is chart.ChartExtender compatible object * which could be used during helm install/upgrade process

func NewBundle

func NewBundle(ctx context.Context, dir string, helmEnvSettings *cli.EnvSettings, opts BundleOptions) *Bundle

func (*Bundle) ChartCreated

func (bundle *Bundle) ChartCreated(c *chart.Chart) error

ChartCreated method for the chart.Extender interface

func (*Bundle) ChartDependenciesLoaded

func (bundle *Bundle) ChartDependenciesLoaded() error

ChartDependenciesLoaded method for the chart.Extender interface

func (*Bundle) ChartLoaded

func (bundle *Bundle) ChartLoaded(files []*chart.ChartExtenderBufferedFile) error

ChartLoaded method for the chart.Extender interface

func (*Bundle) GetPostRenderer

func (bundle *Bundle) GetPostRenderer() (*helm.ExtraAnnotationsAndLabelsPostRenderer, error)

func (*Bundle) LoadDir

func (bundle *Bundle) LoadDir(dir string) (bool, []*chart.ChartExtenderBufferedFile, error)

LoadDir method for the chart.Extender interface

func (*Bundle) LocateChart

func (bundle *Bundle) LocateChart(name string, settings *cli.EnvSettings) (bool, string, error)

LocateChart method for the chart.Extender interface

func (*Bundle) MakeValues

func (bundle *Bundle) MakeValues(inputVals map[string]interface{}) (map[string]interface{}, error)

MakeValues method for the chart.Extender interface

func (*Bundle) ReadFile

func (bundle *Bundle) ReadFile(filePath string) (bool, []byte, error)

ReadFile method for the chart.Extender interface

func (*Bundle) SetupTemplateFuncs

func (bundle *Bundle) SetupTemplateFuncs(t *template.Template, funcMap template.FuncMap)

SetupTemplateFuncs method for the chart.Extender interface

type BundleOptions

type BundleOptions struct {
	BuildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions
}

type ChartExtenderContextData

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

func NewChartExtenderContextData

func NewChartExtenderContextData(ctx context.Context) *ChartExtenderContextData

type ExtraValuesData

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

func NewExtraValuesData

func NewExtraValuesData() *ExtraValuesData

func (*ExtraValuesData) GetExtraValues

func (d *ExtraValuesData) GetExtraValues() map[string]interface{}

type GetHelmChartMetadataOptions

type GetHelmChartMetadataOptions struct {
	OverrideName   string
	DefaultName    string
	DefaultVersion string
}

type SecretValuesFilesOptions

type SecretValuesFilesOptions struct {
	CustomFiles []string
}

type ServiceValuesOptions

type ServiceValuesOptions struct {
	Namespace     string
	Env           string
	IsStub        bool
	CustomTagFunc func(string) string
}

type WerfChart

type WerfChart struct {
	HelmChart *chart.Chart

	ChartDir                   string
	SecretValueFiles           []string
	HelmEnvSettings            *cli.EnvSettings
	BuildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions
	DisableSecrets             bool

	GiterminismManager giterminism_manager.Interface
	SecretsManager     *secrets_manager.SecretsManager

	*ExtraValuesData
	*ChartExtenderContextData
	// contains filtered or unexported fields
}

func NewWerfChart

func NewWerfChart(ctx context.Context, giterminismManager giterminism_manager.Interface, secretsManager *secrets_manager.SecretsManager, chartDir string, helmEnvSettings *cli.EnvSettings, opts WerfChartOptions) *WerfChart

func (*WerfChart) ChartCreated

func (wc *WerfChart) ChartCreated(c *chart.Chart) error

ChartCreated method for the chart.Extender interface

func (*WerfChart) ChartDependenciesLoaded

func (wc *WerfChart) ChartDependenciesLoaded() error

ChartDependenciesLoaded method for the chart.Extender interface

func (*WerfChart) ChartLoaded

func (wc *WerfChart) ChartLoaded(files []*chart.ChartExtenderBufferedFile) error

ChartLoaded method for the chart.Extender interface

func (*WerfChart) CreateNewBundle

func (wc *WerfChart) CreateNewBundle(ctx context.Context, destDir string, inputVals map[string]interface{}) (*Bundle, error)

* CreateNewBundle creates new Bundle object with werf chart extensions taken into account. * inputVals could contain any custom values, which should be stored in the bundle.

func (*WerfChart) GetPostRenderer

func (wc *WerfChart) GetPostRenderer() (postrender.PostRenderer, error)

func (*WerfChart) LoadDir

func (wc *WerfChart) LoadDir(dir string) (bool, []*chart.ChartExtenderBufferedFile, error)

LoadDir method for the chart.Extender interface

func (*WerfChart) LocateChart

func (wc *WerfChart) LocateChart(name string, settings *cli.EnvSettings) (bool, string, error)

LocateChart method for the chart.Extender interface

func (*WerfChart) MakeValues

func (wc *WerfChart) MakeValues(inputVals map[string]interface{}) (map[string]interface{}, error)

MakeValues method for the chart.Extender interface

func (*WerfChart) ReadFile

func (wc *WerfChart) ReadFile(filePath string) (bool, []byte, error)

ReadFile method for the chart.Extender interface

func (*WerfChart) SetEnv

func (wc *WerfChart) SetEnv(env string) error

func (*WerfChart) SetServiceValues

func (wc *WerfChart) SetServiceValues(vals map[string]interface{}) error

func (*WerfChart) SetWerfConfig

func (wc *WerfChart) SetWerfConfig(werfConfig *config.WerfConfig) error

func (*WerfChart) SetupTemplateFuncs

func (wc *WerfChart) SetupTemplateFuncs(t *template.Template, funcMap template.FuncMap)

SetupTemplateFuncs method for the chart.Extender interface

type WerfChartOptions

type WerfChartOptions struct {
	SecretValueFiles           []string
	ExtraAnnotations           map[string]string
	ExtraLabels                map[string]string
	BuildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions
	DisableSecrets             bool
}

type WerfChartStub

type WerfChartStub struct {
	HelmChart        *chart.Chart
	SecretsManager   *secrets_manager.SecretsManager
	SecretValueFiles []string

	*ChartExtenderContextData
	// contains filtered or unexported fields
}

func NewWerfChartStub

func NewWerfChartStub(ctx context.Context) *WerfChartStub

func (*WerfChartStub) AddExtraAnnotationsAndLabels

func (wc *WerfChartStub) AddExtraAnnotationsAndLabels(extraAnnotations, extraLabels map[string]string)

func (*WerfChartStub) ChartCreated

func (wc *WerfChartStub) ChartCreated(c *chart.Chart) error

ChartCreated method for the chart.Extender interface

func (*WerfChartStub) ChartDependenciesLoaded

func (wc *WerfChartStub) ChartDependenciesLoaded() error

ChartDependenciesLoaded method for the chart.Extender interface

func (*WerfChartStub) ChartLoaded

func (wc *WerfChartStub) ChartLoaded(files []*chart.ChartExtenderBufferedFile) error

ChartLoaded method for the chart.Extender interface

func (*WerfChartStub) GetPostRenderer

func (wc *WerfChartStub) GetPostRenderer() (postrender.PostRenderer, error)

func (*WerfChartStub) LoadDir

LoadDir method for the chart.Extender interface

func (*WerfChartStub) LocateChart

func (wc *WerfChartStub) LocateChart(name string, settings *cli.EnvSettings) (bool, string, error)

LocateChart method for the chart.Extender interface

func (*WerfChartStub) MakeValues

func (wc *WerfChartStub) MakeValues(inputVals map[string]interface{}) (map[string]interface{}, error)

MakeValues method for the chart.Extender interface

func (*WerfChartStub) ReadFile

func (wc *WerfChartStub) ReadFile(filePath string) (bool, []byte, error)

ReadFile method for the chart.Extender interface

func (*WerfChartStub) SetStubServiceValues

func (wc *WerfChartStub) SetStubServiceValues(vals map[string]interface{})

func (*WerfChartStub) SetupSecretValueFiles

func (wc *WerfChartStub) SetupSecretValueFiles(secretValueFiles []string)

func (*WerfChartStub) SetupSecretsManager

func (wc *WerfChartStub) SetupSecretsManager(manager *secrets_manager.SecretsManager)

func (*WerfChartStub) SetupTemplateFuncs

func (wc *WerfChartStub) SetupTemplateFuncs(t *template.Template, funcMap template.FuncMap)

SetupTemplateFuncs method for the chart.Extender interface

type WerfSubchart

type WerfSubchart struct {
	HelmChart *chart.Chart
}

func NewWerfSubchart

func NewWerfSubchart() *WerfSubchart

func (*WerfSubchart) ChartCreated

func (wc *WerfSubchart) ChartCreated(c *chart.Chart) error

ChartCreated method for the chart.Extender interface

func (*WerfSubchart) ChartDependenciesLoaded

func (wc *WerfSubchart) ChartDependenciesLoaded() error

ChartDependenciesLoaded method for the chart.Extender interface

func (*WerfSubchart) ChartLoaded

func (wc *WerfSubchart) ChartLoaded(files []*chart.ChartExtenderBufferedFile) error

ChartLoaded method for the chart.Extender interface

func (*WerfSubchart) LoadDir

func (wc *WerfSubchart) LoadDir(dir string) (bool, []*chart.ChartExtenderBufferedFile, error)

LoadDir method for the chart.Extender interface

func (*WerfSubchart) LocateChart

func (wc *WerfSubchart) LocateChart(name string, settings *cli.EnvSettings) (bool, string, error)

LocateChart method for the chart.Extender interface

func (*WerfSubchart) MakeValues

func (wc *WerfSubchart) MakeValues(inputVals map[string]interface{}) (map[string]interface{}, error)

MakeValues method for the chart.Extender interface

func (*WerfSubchart) ReadFile

func (wc *WerfSubchart) ReadFile(filePath string) (bool, []byte, error)

ReadFile method for the chart.Extender interface

func (*WerfSubchart) SetupTemplateFuncs

func (wc *WerfSubchart) SetupTemplateFuncs(t *template.Template, funcMap template.FuncMap)

SetupTemplateFuncs method for the chart.Extender interface

Jump to

Keyboard shortcuts

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