Dagger
Search

helm-oci

A lightweight wrapper around Helm OCI.

Installation

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

Entrypoint

Return Type
HelmOci !
Arguments
NameTypeDescription
baseContainer a custom base image containing an installation of helm
Example
dagger -m github.com/purpleclay/daggerverse/helm-oci@d7438770bfab8844a89c2923b9e2942e78de5239 call \
func (m *myModule) example() *HelmOci  {
	return dag.
			HelmOci()
}
@function
def example() -> dag.HelmOci:
	return (
		dag.helm_oci()
	)
@func()
example(): HelmOci {
	return dag
		.helmOci()
}

Types

HelmOci 🔗

Helm OCI dagger module

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
dagger -m github.com/purpleclay/daggerverse/helm-oci@d7438770bfab8844a89c2923b9e2942e78de5239 call \
 package --dir DIR_PATH
func (m *myModule) example(dir *Directory) *File  {
	return dag.
			HelmOci().
			Package(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.File:
	return (
		dag.helm_oci()
		.package(dir)
	)
@func()
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
dagger -m github.com/purpleclay/daggerverse/helm-oci@d7438770bfab8844a89c2923b9e2942e78de5239 call \
 push --pkg file:path --registry string
func (m *myModule) example(ctx context.Context, pkg *File, registry string) string  {
	return dag.
			HelmOci().
			Push(ctx, pkg, registry)
}
@function
async def example(pkg: dagger.File, registry: str) -> str:
	return await (
		dag.helm_oci()
		.push(pkg, registry)
	)
@func()
async example(pkg: File, registry: string): Promise<string> {
	return dag
		.helmOci()
		.push(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
dagger -m github.com/purpleclay/daggerverse/helm-oci@d7438770bfab8844a89c2923b9e2942e78de5239 call \
 package-push --dir DIR_PATH --registry string
func (m *myModule) example(ctx context.Context, dir *Directory, registry string) string  {
	return dag.
			HelmOci().
			PackagePush(ctx, dir, registry)
}
@function
async def example(dir: dagger.Directory, registry: str) -> str:
	return await (
		dag.helm_oci()
		.package_push(dir, registry)
	)
@func()
async example(dir: Directory, registry: string): Promise<string> {
	return dag
		.helmOci()
		.packagePush(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
dagger -m github.com/purpleclay/daggerverse/helm-oci@d7438770bfab8844a89c2923b9e2942e78de5239 call \
 lint --dir DIR_PATH
func (m *myModule) example(ctx context.Context, dir *Directory) string  {
	return dag.
			HelmOci().
			Lint(ctx, dir)
}
@function
async def example(dir: dagger.Directory) -> str:
	return await (
		dag.helm_oci()
		.lint(dir)
	)
@func()
async example(dir: Directory): Promise<string> {
	return dag
		.helmOci()
		.lint(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
dagger -m github.com/purpleclay/daggerverse/helm-oci@d7438770bfab8844a89c2923b9e2942e78de5239 call \
 template --dir DIR_PATH
func (m *myModule) example(dir *Directory) *File  {
	return dag.
			HelmOci().
			Template(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.File:
	return (
		dag.helm_oci()
		.template(dir)
	)
@func()
example(dir: Directory): File {
	return dag
		.helmOci()
		.template(dir)
}