bundles

package
v5.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChildValues added in v5.3.0

func ChildValues(bundleAppName string, child ChildOverride, overrideType AppNameOverrideType) (string, error)

ChildValues returns the values layer that makes a bundle install the described child.

The layer is returned rather than applied so that both install paths can share it: the App CR path merges it into the bundle App's values, the Flux path into the parent HelmRelease's values. bundleAppName is only used to pick the naming convention, and only when overrideType is AppNameOverrideAuto. An empty layer is returned for AppNameOverrideNone.

func OverrideChild added in v5.3.0

func OverrideChild(bundleApp *application.Application, child ChildOverride, overrideType AppNameOverrideType) (*application.Application, error)

OverrideChild sets the values of the bundle app so that it installs the described child. The overrideType specifies the naming convention for the child app. If set to AppNameOverrideAuto, it will attempt to auto-detect based on the bundle app name.

func OverrideChildApp

func OverrideChildApp(bundleApp *application.Application, childApp *application.Application, overrideType AppNameOverrideType) (*application.Application, error)

OverrideChildApp takes two apps, a bundle app and a child app, and attempts to correctly set the values of the bundle app to have it install the desired version of the child app. The overrideType specifies the naming convention for the child app. If set to AppNameOverrideAuto, it will attempt to auto-detect based on the bundle app name.

The child's chart name is assumed to match its app name. Use OverrideChild for a child whose chart is published under a different name.

Types

type AppNameOverrideType

type AppNameOverrideType int

AppNameOverrideType specifies how the child app name should be formatted in bundle values

const (
	// AppNameOverrideAuto automatically detects the naming convention based on the bundle app name
	AppNameOverrideAuto AppNameOverrideType = iota
	// AppNameOverrideCamelCase converts the app name to camelCase (e.g., "my-app" -> "myApp")
	AppNameOverrideCamelCase
	// AppNameOverrideHyphen keeps the app name with hyphens (e.g., "my-app" stays "my-app")
	AppNameOverrideHyphen
	// AppNameOverrideNone skips setting any override values, returning the bundle app unchanged
	AppNameOverrideNone
)

type ChildOverride added in v5.3.0

type ChildOverride struct {
	// AppName is the child's app name, which also drives the key it is written under.
	AppName string
	// ChartName is the name the child's chart is published under, which is not always
	// AppName (`cluster-autoscaler-app` for the app named `cluster-autoscaler`).
	// Defaults to AppName when empty.
	ChartName string
	// Catalog is the catalog to install the child from. Ignored by bundle charts that
	// render their children as HelmReleases, and left to the chart's default when empty.
	Catalog string
	// Version is the child's chart version.
	Version string
	// Namespace is the namespace to install the child into. Left to the chart's default
	// when empty.
	Namespace string
}

ChildOverride describes the child app a bundle should install, independently of how the child itself is deployed. The App CR path and the Flux path need the same values layer, so it is expressed in the terms the bundle chart reads rather than in terms of an App CR.

Jump to

Keyboard shortcuts

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