client

package
v3.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateValuesSecret added in v3.3.0

func CreateValuesSecret(ctx context.Context, name, namespace, values string)

CreateValuesSecret creates a Secret containing chart values for a HelmRelease. It ensures the target namespace exists before creating the Secret.

func DeleteHelmRelease added in v3.3.0

func DeleteHelmRelease(ctx context.Context, name, namespace string) error

DeleteHelmRelease deletes a HelmRelease CR and its associated values Secret if present.

func InstallApp

func InstallApp(ctx context.Context, app *application.Application)

InstallApp installs the given App then waits for it to be marked as installed. Timeout can be controlled via the provided context

func InstallHelmRelease added in v3.3.0

func InstallHelmRelease(ctx context.Context, cfg HelmReleaseConfig)

InstallHelmRelease creates a HelmRelease CR and waits for it to become ready. It also ensures that the target and storage namespaces exist before creating the HelmRelease. Timeout can be controlled via the provided context.

func IsHelmReleaseReady added in v3.3.0

func IsHelmReleaseReady(ctx context.Context, name, namespace string) (bool, error)

IsHelmReleaseReady checks if a HelmRelease has the Ready condition set to True.

func IsHelmReleaseVersion added in v3.3.0

func IsHelmReleaseVersion(ctx context.Context, name, namespace, version string) (bool, error)

IsHelmReleaseVersion checks if a HelmRelease has the expected chart version in its status history.

func UpdateHelmReleaseVersion added in v3.3.0

func UpdateHelmReleaseVersion(ctx context.Context, name, namespace, version string)

UpdateHelmReleaseVersion updates the chart version of an existing HelmRelease. For HelmRepository sources, it updates spec.chart.spec.version. For OCIRepository sources, the version is controlled by the OCIRepository itself, so this is a no-op and the caller should update the OCIRepository instead.

Types

type HelmReleaseConfig added in v3.3.0

type HelmReleaseConfig struct {
	// Name is the name of the HelmRelease resource.
	Name string
	// Namespace is the namespace where the HelmRelease CR will be created.
	Namespace string
	// TargetNamespace is the namespace where the Helm chart will be installed.
	TargetNamespace string
	// StorageNamespace is the namespace used for Helm storage.
	// If empty, defaults to the HelmRelease namespace.
	StorageNamespace string
	// ReleaseName is the Helm release name. If empty, defaults to the HelmRelease name.
	ReleaseName string
	// ChartName is the name of the chart in the source.
	ChartName string
	// ChartVersion is the version of the chart to install.
	ChartVersion string
	// SourceKind specifies the kind of source reference.
	// Defaults to SourceKindOCIRepository if not set.
	SourceKind SourceKind
	// SourceName is the name of the source reference (HelmRepository or OCIRepository).
	SourceName string
	// SourceNamespace is the namespace of the source reference.
	// If empty, defaults to the HelmRelease namespace.
	SourceNamespace string
	// Values is the raw values YAML to pass to the chart.
	Values string
	// Interval is the reconciliation interval. Defaults to 5m.
	Interval time.Duration
	// Timeout is the time to wait for Helm operations. Defaults to 5m.
	Timeout time.Duration
	// Retries is the number of retries for install/upgrade remediation. Defaults to 10.
	Retries *int
	// ServiceAccountName is the Kubernetes service account to impersonate when reconciling.
	// Required by clusters with the flux-multi-tenancy Kyverno policy.
	ServiceAccountName string
}

HelmReleaseConfig holds the configuration needed to create a HelmRelease CR.

type SourceKind added in v3.3.0

type SourceKind string

SourceKind represents the kind of source reference used by a HelmRelease.

const (
	// SourceKindHelmRepository uses spec.chart with a HelmRepository sourceRef.
	SourceKindHelmRepository SourceKind = "HelmRepository"
	// SourceKindOCIRepository uses spec.chartRef with an OCIRepository reference.
	SourceKindOCIRepository SourceKind = "OCIRepository"
)

Jump to

Keyboard shortcuts

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