nelm

package
v1.74.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// LabelPackageChecksum release label for storing checksum
	LabelPackageChecksum = "packageChecksum"
)

Variables

View Source
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

func New(logger *log.Logger, opts ...Option) *Client

New creates a new nelm client for the specified namespace It initializes the nelm logger and applies any provided options

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, namespace, releaseName string) error

Delete uninstalls a nelm release Returns nil if the release doesn't exist (idempotent)

func (*Client) GetChecksum

func (c *Client) GetChecksum(ctx context.Context, namespace, releaseName string) (string, error)

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

func (*Client) LastStatus

func (c *Client) LastStatus(ctx context.Context, namespace, releaseName string) (string, string, error)

LastStatus returns the revision number and status of the latest release Returns ("0", "", nil) if the release doesn't exist

func (*Client) Render

func (c *Client) Render(ctx context.Context, namespace, releaseName string, opts InstallOptions) (string, error)

Render renders a nelm chart to YAML manifests without installing it Returns the rendered manifests as a YAML string

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

func WithAnnotations(annotations map[string]string) Option

WithAnnotations sets annotations to be applied to all releases

func WithHistoryMax

func WithHistoryMax(historyMax int32) Option

WithHistoryMax sets the maximum number of release revisions to keep in history

func WithLabels

func WithLabels(labels map[string]string) Option

WithLabels sets labels to be applied to all releases

func WithTimeout

func WithTimeout(timeout time.Duration) Option

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

Jump to

Keyboard shortcuts

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