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@v1.0.1

Entrypoint

Return Type
Helm
Example
dagger -m github.com/puzzle/dagger-module-helm/helm@8d514cd963be35c655a7642b51d791272c5a125c call \
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 ./examples/testdata/mychart/

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-directory that contains the Helm Chart
Example
dagger -m github.com/puzzle/dagger-module-helm/helm@8d514cd963be35c655a7642b51d791272c5a125c 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 env:REGISTRY_HELM_PASSWORD \
  --directory ./examples/testdata/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
passwordSecret !-registry login password
Example
dagger -m github.com/puzzle/dagger-module-helm/helm@8d514cd963be35c655a7642b51d791272c5a125c call \
 package-push --directory DIR_PATH --registry string --repository string --username string --password env:MYSECRET
func (m *myModule) example(ctx context.Context, directory *Directory, registry string, repository string, username string, password *Secret) 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: dagger.Secret) -> bool:
	return await (
		dag.helm()
		.package_push(directory, registry, repository, username, password)
	)
@func()
async example(directory: Directory, registry: string, repository: string, username: string, password: Secret): 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 ./examples/testdata/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@8d514cd963be35c655a7642b51d791272c5a125c 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)
}