chartresolver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSizeInByteDefault          = 100 * 1000 * 1000
	RemoveOutdatedDurationDefault = time.Hour * 24
)

Variables

View Source
var NoChartDefinedError = errors.New("no chart was provided") //nolint:staticcheck

NoChartDefinedError is the error that is returned if no Helm chart was provided

Functions

func GetChart

func GetChart(ctx context.Context,
	chartConfig *helmv1alpha1.Chart,
	lsClient client.Client,
	contextObj *lsv1alpha1.Context,
	registryPullSecrets []corev1.Secret,
	ociConfig *config.OCIConfiguration,
	useChartCache bool) (*chart.Chart, error)

GetChart resolves the chart based on a chart access configuration.

func MarshalChart

func MarshalChart(chart *chart.Chart) ([]byte, error)

func UnmarshalChart

func UnmarshalChart(bytes []byte) (*chart.Chart, error)

Types

type ChartTree

type ChartTree struct {
	Chart    *chart.Chart `json:"chart,omitempty"`
	SubTrees []*ChartTree `json:"subTrees,omitempty"`
}

ChartTree is a tree containing a chart and its subcharts (recursively), both in public fields so that they are respected during marshaling.

type HelmChartCache

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

func GetHelmChartCache

func GetHelmChartCache(initMaxSizeInByte int64, initRemoveOutdatedDuration time.Duration) *HelmChartCache

func (*HelmChartCache) Clear

func (c *HelmChartCache) Clear()

func (*HelmChartCache) GetEntries

func (c *HelmChartCache) GetEntries() (map[string]*cacheEntry, int64, time.Time)

func (*HelmChartCache) HasKey

func (c *HelmChartCache) HasKey(ociRef string, helmRepo *helmv1alpha1.HelmChartRepo, ocmKey string) (bool, error)

func (*HelmChartCache) SetLastCleanup

func (c *HelmChartCache) SetLastCleanup(lastCleanup time.Time)

func (*HelmChartCache) SetMaxSizeInByte

func (c *HelmChartCache) SetMaxSizeInByte(maxSizeInByte int64)

func (*HelmChartCache) SetOutdatedDuration

func (c *HelmChartCache) SetOutdatedDuration(removeOutdatedDuration time.Duration)

Jump to

Keyboard shortcuts

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