Dagger
Search

helm-oci

A lightweight wrapper around Helm OCI.

Installation

dagger install github.com/purpleclay/daggerverse/helm-oci@v0.5.0

Entrypoint

Return Type
HelmOci !
Arguments
NameTypeDefault ValueDescription
baseContainer -a custom base image containing an installation of helm
Example
func (m *myModule) example() *HelmOci  {
	return dag.
			HelmOci()
}

Types

HelmOci 🔗

Helm OCI dagger module

dotenv() 🔗

Generates a dotenv file based on the core identifying metadata within a charts Chart.yaml file (Name, Version, AppVersion, and KubeVersion).

Return Type
File !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-a path to the directory containing the Chart.yaml file
prefixString "CHART"a custom prefix for all environment variables e.g. CHART_NAME
Example
func (m *myModule) example(dir *Directory) *File  {
	return dag.
			HelmOci().
			Dotenv(dir)
}

package() 🔗

Packages a chart into a versioned chart archive file using metadata defined within the Chart.yaml file. Metadata can be overridden directly with the required flags.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-a path to the directory containing the Chart.yaml file
appVersionString -override the semantic version of the application this chart deploys
versionString -override the semantic version of the chart
Example
func (m *myModule) example(dir *Directory) *File  {
	return dag.
			HelmOci().
			Package(dir)
}

push() 🔗

Push a packaged chart to a chart registry

Return Type
String !
Arguments
NameTypeDefault ValueDescription
pkgFile !-the packaged helm chart
registryString !-the OCI registry to publish the chart to, should include full path without chart name
usernameString -the username for authenticating with the registry
passwordSecret -the password for authenticating with the registry
Example
func (m *myModule) example(ctx context.Context, pkg *File, registry string) string  {
	return dag.
			HelmOci().
			Push(ctx, pkg, registry)
}

packagePush() 🔗

Packages a Helm chart and publishes it to an OCI registry. Semantic versioning for the chart is obtained directly from the Chart.yaml file

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-a path to the directory containing the Chart.yaml file
appVersionString -override the semantic version of the application this chart deploys
versionString -override the semantic version of the chart
registryString !-the OCI registry to publish the chart to, should include full path without chart name
usernameString -the username for authenticating with the registry
passwordSecret -the password for authenticating with the registry
Example
func (m *myModule) example(ctx context.Context, dir *Directory, registry string) string  {
	return dag.
			HelmOci().
			PackagePush(ctx, dir, registry)
}

lint() 🔗

Lints a Helm chart

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-a path to the directory containing the Chart.yaml file
strictBoolean -fail on any linting errors by returning a non zero exit code
quietBoolean -print only warnings and errors
Example
func (m *myModule) example(ctx context.Context, dir *Directory) string  {
	return dag.
			HelmOci().
			Lint(ctx, dir)
}

template() 🔗

Renders a chart and captures output to a YAML file. Any values that would be looked up within a Kubernetes cluster are faked. When overriding values, the priority will always be given to the last (right-most) provided value

Return Type
File !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-a path to the directory containing the Chart.yaml file and all templates
set[String ! ] -set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
setFile[String ! ] -set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
setJson[String ! ] -set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2)
setLiteral[String ! ] -set a literal STRING value on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
setString[String ! ] -set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
values[String ! ] -specify values in a YAML file bundled within the chart directory (can specify multiple)
valuesExt[File ! ] -specify values in external YAML files loaded from the file system (can specify multiple). These have a higher precedence over other values files
Example
func (m *myModule) example(dir *Directory) *File  {
	return dag.
			HelmOci().
			Template(dir)
}