chartcmd

package
v0.16.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package chartcmd provides functionality for managing Helm charts in KCL.

This package provides functionality for managing Helm charts in KCL. It serves as the core implementation for the `kcl chart` command, allowing users to manage Helm charts and their schemas in a KCL-native way.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfig     = errors.New("invalid chart configuration")
	ErrInitFailed        = errors.New("failed to initialize")
	ErrPathResolution    = errors.New("path resolution failed")
	ErrDirectoryCreation = errors.New("directory creation failed")
	ErrRepoOperation     = errors.New("repository operation failed")
	ErrChartOperation    = errors.New("chart operation failed")
	ErrSchemaGeneration  = errors.New("schema generation failed")
	ErrCRDGeneration     = errors.New("CRD generation failed")
	ErrFileWrite         = errors.New("file write failed")
	ErrKCLOperation      = errors.New("KCL operation failed")
)

Common error variables for chart operations.

View Source
var (
	ErrUpdateWorkerFailed = errors.New("update worker failed")
	ErrChartUpdateFailed  = errors.New("chart update failed")
	ErrKCLExecutionFailed = errors.New("kcl execution failed")
)

Functions

This section is empty.

Types

type EventAdded

type EventAdded struct {
	Err error
}

Sent when an item has been added.

type EventDone

type EventDone struct {
	Err error
}

Sent when all work has completed.

type EventInit

type EventInit struct {
	Err error
}

Sent when initialization has completed.

type EventSetChartTotal

type EventSetChartTotal int

Sent to update the total chart count.

type EventUpdatedChart

type EventUpdatedChart struct {
	Err   error
	Chart string
}

Sent when a chart has been updated, or when a fatal error occurs during an update.

type EventUpdatingChart

type EventUpdatingChart string

Sent when a chart update has started.

type KCLPackage

type KCLPackage struct {
	Client         helm.ChartClient
	MaxExtractSize *resource.Quantity
	BasePath       string

	Timeout time.Duration

	Vendor   bool
	FastEval bool
	// contains filtered or unexported fields
}

func NewKCLPackage

func NewKCLPackage(basePath string, client helm.ChartClient, opts ...KCLPackageOpts) (*KCLPackage, error)

func (*KCLPackage) AddChart

func (c *KCLPackage) AddChart(key string, chart *kclchart.ChartConfig) error

AddChart adds a new chart to the chart package.

func (*KCLPackage) AddRepo

func (c *KCLPackage) AddRepo(repo *kclhelm.ChartRepo) error

func (*KCLPackage) Init

func (c *KCLPackage) Init() (bool, error)

func (*KCLPackage) Set

func (c *KCLPackage) Set(chart, keyValueOverrides string) error

func (*KCLPackage) Subscribe

func (c *KCLPackage) Subscribe(f func(any))

func (*KCLPackage) Update

func (c *KCLPackage) Update(charts ...string) error

Update loads the chart configurations defined in charts.k and calls Add to generate all required chart packages.

type KCLPackageOpts

type KCLPackageOpts func(*KCLPackage)

func WithFastEval

func WithFastEval(fastEval bool) KCLPackageOpts

func WithMaxExtractSize

func WithMaxExtractSize(size *resource.Quantity) KCLPackageOpts

func WithTimeout

func WithTimeout(timeout time.Duration) KCLPackageOpts

func WithVendor

func WithVendor(vendor bool) KCLPackageOpts

Jump to

Keyboard shortcuts

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