Dagger
Search

helm

The main focus is to publish new Helm Chart versions on registries.

For accomplishing this the https://helm.sh/ tool is used.

Installation

dagger install github.com/puzzle/dagger-module-helm/helm@v0.9.1

Entrypoint

Return Type
Helm
Example
func (m *myModule) example() *Helm  {
	return dag.
			Helm()
}
@function
def example() -> dag.Helm:
	return (
		dag.helm()
	)
@func()
example(): Helm {
	return dag
		.helm()
}

Types

Helm

version()

Get and display the version of the Helm Chart located inside the given directory.

Example usage: dagger call version –directory ./mychart/

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-directory that contains the Helm Chart
Example
dagger -m github.com/puzzle/dagger-module-helm/helm@53673aec35b859f8b67d9f903f388976145e5fd7 call \
 version --directory DIR_PATH
func (m *myModule) example(ctx context.Context, directory *Directory) string  {
	return dag.
			Helm().
			Version(ctx, directory)
}
@function
async def example(directory: dagger.Directory) -> str:
	return await (
		dag.helm()
		.version(directory)
	)
@func()
async example(directory: Directory): Promise<string> {
	return dag
		.helm()
		.version(directory)
}

packagePush()

Packages and pushes a Helm chart to a specified OCI-compatible registry with authentication.

Returns true if the chart was successfully pushed, or false if the chart already exists, with error handling for push failures.

Example usage:

dagger call package-push \
  --registry registry.puzzle.ch \
  --repository helm \
  --username REGISTRY_HELM_USER \
  --password REGISTRY_HELM_PASSWORD \
  --directory ./mychart/
Return Type
Boolean !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-directory that contains the Helm Chart
registryString !-URL of the registry
repositoryString !-name of the repository
usernameString !-registry login username
passwordString !-registry login password
Example
dagger -m github.com/puzzle/dagger-module-helm/helm@53673aec35b859f8b67d9f903f388976145e5fd7 call \
 package-push --directory DIR_PATH --registry string --repository string --username string --password string
func (m *myModule) example(ctx context.Context, directory *Directory, registry string, repository string, username string, password string) bool  {
	return dag.
			Helm().
			PackagePush(ctx, directory, registry, repository, username, password)
}
@function
async def example(directory: dagger.Directory, registry: str, repository: str, username: str, password: str) -> bool:
	return await (
		dag.helm()
		.package_push(directory, registry, repository, username, password)
	)
@func()
async example(directory: Directory, registry: string, repository: string, username: string, password: string): Promise<boolean> {
	return dag
		.helm()
		.packagePush(directory, registry, repository, username, password)
}

test()

Run Helm unittests with the given directory and files.

Provide the helm chart directory with pointing to it with the --directory flag. Add the directory location with "." as --args parameter to tell helm unittest where to find the helm chart with the tests.

Example usage: dagger call test –directory ./mychart/ –args “.”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-directory that contains the Helm Chart
args[String ! ] !-Helm Unittest arguments
Example
dagger -m github.com/puzzle/dagger-module-helm/helm@53673aec35b859f8b67d9f903f388976145e5fd7 call \
 test --directory DIR_PATH --args string1 --args string2
func (m *myModule) example(ctx context.Context, directory *Directory, args []string) string  {
	return dag.
			Helm().
			Test(ctx, directory, args)
}
@function
async def example(directory: dagger.Directory, args: List[str]) -> str:
	return await (
		dag.helm()
		.test(directory, args)
	)
@func()
async example(directory: Directory, args: string[]): Promise<string> {
	return dag
		.helm()
		.test(directory, args)
}