Dagger
Search

helm-oci

A lightweight wrapper around Helm OCI.

Installation

dagger install github.com/purpleclay/daggerverse/helm-oci@723df11baa358c8ca700cd6f4636319f811b729c

Entrypoint

Return Type
HelmOci !
Arguments
NameTypeDefault ValueDescription
baseContainer -a custom base image containing an installation of helm
Example
dagger -m github.com/purpleclay/daggerverse/helm-oci@723df11baa358c8ca700cd6f4636319f811b729c 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

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
gitlabBoolean -ensure generated dotenv file is compatible with gitlab
prefixString "CHART"a custom prefix for all environment variables e.g. CHART_NAME
Example
dagger -m github.com/purpleclay/daggerverse/helm-oci@723df11baa358c8ca700cd6f4636319f811b729c call \
 dotenv --dir DIR_PATH
func (m *myModule) example(dir *Directory) *File  {
	return dag.
			HelmOci().
			Dotenv(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.File:
	return (
		dag.helm_oci()
		.dotenv(dir)
	)
@func()
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
dagger -m github.com/purpleclay/daggerverse/helm-oci@723df11baa358c8ca700cd6f4636319f811b729c 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@723df11baa358c8ca700cd6f4636319f811b729c 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@723df11baa358c8ca700cd6f4636319f811b729c 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@723df11baa358c8ca700cd6f4636319f811b729c 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@723df11baa358c8ca700cd6f4636319f811b729c 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)
}