Dagger
Search

helm-oci

A lightweight wrapper around Helm OCI.

Installation

dagger install github.com/purpleclay/daggerverse/helm-oci@v0.2.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@136ad709679404c74f4be30d24dbd8ac4c5f0d90 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@136ad709679404c74f4be30d24dbd8ac4c5f0d90 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@136ad709679404c74f4be30d24dbd8ac4c5f0d90 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@136ad709679404c74f4be30d24dbd8ac4c5f0d90 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@136ad709679404c74f4be30d24dbd8ac4c5f0d90 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)
}