Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Delete(ctx context.Context, namespace, releaseName string) error
- func (c *Client) GetChecksum(ctx context.Context, namespace, releaseName string) (string, error)
- func (c *Client) Install(ctx context.Context, namespace, releaseName string, opts InstallOptions) error
- func (c *Client) LastStatus(ctx context.Context, namespace, releaseName string) (string, string, error)
- func (c *Client) Render(ctx context.Context, namespace, releaseName string, opts InstallOptions) (string, error)
- type InstallOptions
- type Option
- type Options
Constants ¶
const (
// LabelPackageChecksum release label for storing checksum
LabelPackageChecksum = "packageChecksum"
)
Variables ¶
var ( // ErrReleaseNotFound is returned when a nelm release doesn't exist ErrReleaseNotFound = errors.New("release not found") // ErrLabelNotFound is returned when a requested label is not present in the release ErrLabelNotFound = errors.New("label not found") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper around nelm operations that provides a simplified interface
func New ¶
New creates a new nelm client for the specified namespace It initializes the nelm logger and applies any provided options
func (*Client) Delete ¶
Delete uninstalls a nelm release Returns nil if the release doesn't exist (idempotent)
func (*Client) GetChecksum ¶
GetChecksum retrieves the module checksum for a release It checks the storage label "packageChecksum"
func (*Client) Install ¶
func (c *Client) Install(ctx context.Context, namespace, releaseName string, opts InstallOptions) error
Install installs a Helm chart as a release
type InstallOptions ¶
type InstallOptions struct {
Path string // Path to the chart directory
ValuesPaths []string // Paths to values files
ExtraValues string // Extra values in json format
ReleaseLabels map[string]string // Labels to apply to the release
}
InstallOptions contains options for installing a Helm chart
type Option ¶
type Option func(*Options)
Option is a functional option for configuring the nelm client
func WithAnnotations ¶
WithAnnotations sets annotations to be applied to all releases
func WithHistoryMax ¶
WithHistoryMax sets the maximum number of release revisions to keep in history
func WithLabels ¶
WithLabels sets labels to be applied to all releases
func WithTimeout ¶
WithTimeout sets the timeout duration for nelm operations
type Options ¶
type Options struct {
// HistoryMax defines the maximum number of release revisions to keep
HistoryMax int32
// Timeout for Helm operations
Timeout time.Duration
// Labels to apply to Kubernetes resources
Labels map[string]string
// Annotations to apply to Kubernetes resources
Annotations map[string]string
}
Options contains configuration for the nelm client