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 ¶
- Variables
- type EventAdded
- type EventDone
- type EventInit
- type EventSetChartTotal
- type EventUpdatedChart
- type EventUpdatingChart
- type KCLPackage
- func (c *KCLPackage) AddChart(key string, chart *kclchart.ChartConfig) error
- func (c *KCLPackage) AddRepo(repo *kclhelm.ChartRepo) error
- func (c *KCLPackage) Init() (bool, error)
- func (c *KCLPackage) Set(chart, keyValueOverrides string) error
- func (c *KCLPackage) Subscribe(f func(any))
- func (c *KCLPackage) Update(charts ...string) error
- type KCLPackageOpts
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.
Functions ¶
This section is empty.
Types ¶
type EventUpdatedChart ¶
Sent when a chart has been updated, or when a fatal error occurs during an update.
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) 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
Click to show internal directories.
Click to hide internal directories.