helm

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndexFileLoaderModule = fx.Provide(FunctionLoader{LoadFunc: repo.LoadIndexFile})

Functions

func ConditionMet

func ConditionMet(condition string, values map[string]any) bool

traverse helm chart values to determine if condition is met

func VersionsInRange added in v0.1.18

func VersionsInRange(r semver.Range, c Chart) ([]string, error)

Types

type Chart

type Chart struct {
	Name            string     `json:"name"`
	Version         string     `json:"version"`
	ValuesFilePath  string     `json:"valuesFilePath"`
	Repo            repo.Entry `json:"repo"`
	Parent          *Chart
	Images          *Images `json:"images"`
	PlainHTTP       bool    `json:"plainHTTP"`
	DepsCount       int
	RegistryClient  RegistryClient
	IndexFileLoader IndexFileLoader
}

func DependencyToChart added in v0.1.21

func DependencyToChart(d *chart.Dependency, p *Chart) *Chart

func (*Chart) ChartRef added in v0.2.0

func (c *Chart) ChartRef(settings *cli.EnvSettings) (*chart.Chart, error)

func (Chart) CountDependencies added in v0.1.8

func (c Chart) CountDependencies(settings *cli.EnvSettings) (int, error)

func (Chart) LatestVersion

func (c Chart) LatestVersion(settings *cli.EnvSettings) (string, error)

func (Chart) Locate

func (c Chart) Locate(settings *cli.EnvSettings) (string, error)

func (Chart) Pull

func (c Chart) Pull(settings *cli.EnvSettings) (string, error)

func (Chart) Push

func (c Chart) Push(settings *cli.EnvSettings, registry string, insecure bool, plainHTTP bool) (string, error)

func (Chart) PushAndModify added in v0.1.8

func (c Chart) PushAndModify(settings *cli.EnvSettings, registry string, insecure bool, plainHTTP bool, prefixSource bool) (string, error)

func (*Chart) Read

func (c *Chart) Read(settings *cli.EnvSettings, update bool) (string, *chart.Chart, map[string]any, error)

func (Chart) ResolveVersion

func (c Chart) ResolveVersion(settings *cli.EnvSettings) (string, error)

func (Chart) ResolveVersions added in v0.1.5

func (c Chart) ResolveVersions(settings *cli.EnvSettings) ([]string, error)

func (Chart) Values

func (c Chart) Values(settings *cli.EnvSettings) (map[string]any, error)

type ChartCollection

type ChartCollection struct {
	Charts []*Chart `json:"charts"`
}

func (ChartCollection) SetupHelm

func (collection ChartCollection) SetupHelm(settings *cli.EnvSettings, setters ...Option) (*ChartCollection, error)

configures helm and pulls charts to local fs

type ChartData

type ChartData map[Chart]map[*image.Image][]string

type ChartImportOption

type ChartImportOption struct {
	Data           RegistryChartStatus
	All            bool
	ModifyRegistry bool

	Settings *cli.EnvSettings
}

func (ChartImportOption) Run

func (opt ChartImportOption) Run(ctx context.Context, setters ...Option) error

type ChartOption

type ChartOption struct {
	ChartCollection *ChartCollection
	IdentifyImages  bool
	UseCustomValues bool

	Mirrors []Mirror
	Images  []image.Image

	ChartTable *report.Table
	ValueTable *report.Table

	Settings *cli.EnvSettings
}

func (*ChartOption) Run

func (co *ChartOption) Run(ctx context.Context, setters ...Option) (ChartData, error)

type DefaultIndexFileLoader added in v0.2.0

type DefaultIndexFileLoader struct{}

func (*DefaultIndexFileLoader) LoadIndexFile added in v0.2.0

func (d *DefaultIndexFileLoader) LoadIndexFile(indexFilePath string) (*repo.IndexFile, error)

type FunctionLoader added in v0.2.0

type FunctionLoader struct {
	LoadFunc func(indexFilePath string) (*repo.IndexFile, error)
}

func (*FunctionLoader) LoadIndexFile added in v0.2.0

func (fl *FunctionLoader) LoadIndexFile(indexFilePath string) (*repo.IndexFile, error)

type IdentifyImportOption added in v0.2.0

type IdentifyImportOption struct {
	Registries          []*registry.Registry
	ChartImageValuesMap ChartData

	All           bool
	ImportEnabled bool

	ChartsOverview *report.Table
	ImagesOverview *report.Table
}

func (*IdentifyImportOption) Run added in v0.2.0

Converts data structure to pipeline parameters

type Images added in v0.1.6

type Images struct {
	Exclude []struct {
		Ref string `json:"ref"`
	} `json:"exclude"`
	ExcludeCopacetic []struct {
		Ref string `json:"ref"`
	} `json:"excludeCopacetic"`
	Modify []struct {
		From          string `json:"from"`
		FromValuePath string `json:"fromValuePath"`
		To            string `json:"to"`
	} `json:"modify"`
}

type IndexFileLoader added in v0.2.0

type IndexFileLoader interface {
	LoadIndexFile(indexFilePath string) (*repo.IndexFile, error)
}

type Mirror added in v0.2.0

type Mirror struct {
	Registry string `yaml:"registry"`
	Mirror   string `yaml:"mirror"`
}

type OCIRegistryClient added in v0.2.0

type OCIRegistryClient struct {
	PlainHTTP bool
	// contains filtered or unexported fields
}

func NewOCIRegistryClient added in v0.2.0

func NewOCIRegistryClient(client RegistryClient, plainHTTP bool) *OCIRegistryClient

func (*OCIRegistryClient) Pull added in v0.2.0

func (*OCIRegistryClient) Push added in v0.2.0

func (c *OCIRegistryClient) Push(chart []byte, destination string, opts ...helm_registry.PushOption) (*helm_registry.PushResult, error)

func (*OCIRegistryClient) Tags added in v0.2.0

func (c *OCIRegistryClient) Tags(ref string) ([]string, error)

type Option

type Option func(*Options)

func K8SVersion

func K8SVersion(v string) Option

func Update

func Update(b bool) Option

func Verbose

func Verbose(b bool) Option

type Options

type Options struct {
	Verbose    bool
	Update     bool
	K8SVersion string
}

type RegistryChartStatus added in v0.2.0

type RegistryChartStatus map[*registry.Registry]map[*Chart]bool

type RegistryClient added in v0.2.0

type RegistryClient interface {
	Pull(ref string, opts ...helm_registry.PullOption) (*helm_registry.PullResult, error)
	Push(chart []byte, destination string, opts ...helm_registry.PushOption) (*helm_registry.PushResult, error)
	Tags(ref string) ([]string, error)
}

Define the interface for the registry client

func NewDefaultRegistryClient added in v0.2.0

func NewDefaultRegistryClient() (RegistryClient, error)

Default registry client provider

func NewRegistryClient added in v0.2.0

func NewRegistryClient(plainHTTP, debug bool) (RegistryClient, error)

type RegistryImageStatus added in v0.2.0

type RegistryImageStatus map[*registry.Registry]map[*image.Image]bool

Jump to

Keyboard shortcuts

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