chart_extender

package
v1.2.129 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChartDependenciesCacheDir

func GetChartDependenciesCacheDir(lockChecksum string) string

func GetPreparedChartDependenciesDir

func GetPreparedChartDependenciesDir(ctx context.Context, metadataFile, metadataLockFile *chart.ChartExtenderBufferedFile, helmEnvSettings *cli.EnvSettings, registryClient *registry.Client, buildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions) (string, error)

func HashReq added in v1.2.14

func HashReq(req, lock []*chart.Dependency) (string, error)

func LoadChartDependencies

func LoadChartDependencies(ctx context.Context, loadChartDirFunc func(ctx context.Context, dir string) ([]*chart.ChartExtenderBufferedFile, error), chartDir string, loadedChartFiles []*chart.ChartExtenderBufferedFile, helmEnvSettings *cli.EnvSettings, registryClient *registry.Client, buildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions) ([]*chart.ChartExtenderBufferedFile, error)

func LoadMetadata

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

Types

type Bundle

type Bundle struct {
	Dir                        string
	SecretValueFiles           []string
	HelmChart                  *chart.Chart
	HelmEnvSettings            *cli.EnvSettings
	RegistryClient             *registry.Client
	BuildChartDependenciesOpts command_helpers.BuildChartDependenciesOptions

	*secrets.SecretsRuntimeData
	*helpers.ChartExtenderServiceValuesData
	*helpers.ChartExtenderContextData
	// contains filtered or unexported fields
}

* 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, registryClient *registry.Client, secretsManager *secrets_manager.SecretsManager, opts BundleOptions) (*Bundle, error)

func (*Bundle) ChainPostRenderer added in v1.2.37

func (bundle *Bundle) ChainPostRenderer(postRenderer postrender.PostRenderer) postrender.PostRenderer

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) 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 {
	SecretValueFiles                  []string
	BuildChartDependenciesOpts        command_helpers.BuildChartDependenciesOptions
	ExtraAnnotations                  map[string]string
	ExtraLabels                       map[string]string
	IgnoreInvalidAnnotationsAndLabels bool
}

type ChartDependenciesConfiguration added in v1.2.10

type ChartDependenciesConfiguration struct {
	ChartMetadata     *chart.Metadata
	ChartMetadataLock *chart.Lock
}

func NewChartDependenciesConfiguration added in v1.2.14

func NewChartDependenciesConfiguration(chartMetadata *chart.Metadata, chartMetadataLock *chart.Lock) *ChartDependenciesConfiguration

func (*ChartDependenciesConfiguration) GetExternalDependenciesFiles added in v1.2.14

type WerfChart

type WerfChart struct {
	HelmChart *chart.Chart

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

	GiterminismManager giterminism_manager.Interface
	SecretsManager     *secrets_manager.SecretsManager

	*secrets.SecretsRuntimeData
	*helpers.ChartExtenderServiceValuesData
	*helpers.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, registryClient *registry.Client, opts WerfChartOptions) *WerfChart

func (*WerfChart) ChainPostRenderer added in v1.2.37

func (wc *WerfChart) ChainPostRenderer(postRenderer postrender.PostRenderer) postrender.PostRenderer

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, chartVersion 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) 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) MakeBundleValues added in v1.2.10

func (wc *WerfChart) MakeBundleValues(chrt *chart.Chart, inputVals map[string]interface{}) (map[string]interface{}, error)

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) 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
	IgnoreInvalidAnnotationsAndLabels bool
}

type WerfChartRuntimeData added in v1.2.7

type WerfChartRuntimeData struct {
	DecodedSecretValues    map[string]interface{}
	DecodedSecretFilesData map[string]string
	SecretValuesToMask     []string
}

type WerfChartStub

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

	*secrets.SecretsRuntimeData
	*helpers.ChartExtenderContextData
	// contains filtered or unexported fields
}

func NewWerfChartStub

func NewWerfChartStub(ctx context.Context, ignoreInvalidAnnotationsAndLabels bool) *WerfChartStub

func (*WerfChartStub) AddExtraAnnotationsAndLabels

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

func (*WerfChartStub) ChainPostRenderer added in v1.2.37

func (wc *WerfChartStub) ChainPostRenderer(postRenderer postrender.PostRenderer) postrender.PostRenderer

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) 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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