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.0

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 at the directory given by the --directory flag.

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@5f119abab48c46aa0da6aabf46e47fda6e6cdc42 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() 🔗

Package and push an Helm Chart into a registry

return true && nil, chart was pushed successfully return false && nil, chart was not pushed. The specified version already exists return true/false && error, an error occurred

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@5f119abab48c46aa0da6aabf46e47fda6e6cdc42 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@5f119abab48c46aa0da6aabf46e47fda6e6cdc42 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)
}