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@12aa1da7fa97116fae168d7c3347de064da4812c

Entrypoint

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

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-directory that contains the Helm Chart
Example
no available example in current language
// Example on how to call the Version method.
// 
// Get and display the version of the Helm Chart located inside the directory referenced by the directory parameter.
//
// Return: The Helm Chart version as string.
func (m *Examples) HelmVersion(
	// method call context
	ctx context.Context,
	// directory that contains the Helm Chart, e.g. "./helm/examples/testdata/mychart/"
	chart *dagger.Directory,
) (string, error) {
	return dag.
			Helm().
			Version(ctx, chart)
}
no available example in current language
no available example in current language

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
no available example in current language
// Example on how to call the PackagePush method.
// Packages and pushes a Helm chart to a specified OCI-compatible registry with authentication.
//
// Return: true if the chart was successfully pushed, or false if the chart already exists, with error handling for push failures.
func (h *Examples) HelmPackagepush(
	// method call context
	ctx context.Context,
	// directory that contains the Helm Chart
	directory *dagger.Directory,
	// URL of the registry
	registry string,
	// name of the repository
	repository string,
	// registry login username
	username string,
	// registry login password
	password *dagger.Secret,
) (bool, error) {
	return dag.
			Helm().
			PackagePush(ctx, directory, registry, repository, username, password)
}
no available example in current language
no available example in current language

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 ./helm/examples/testdata/mychart/ –args “.”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-directory that contains the Helm Chart
args[String ! ] !-Helm Unittest arguments
Example
no available example in current language
// Example on how to call the Test method.
//
// Run the unit tests for the Helm Chart located inside the directory referenced by the directory parameter.
// Add the directory location with `"."` as `--args` parameter to tell helm unittest where to find the tests inside the passed directory.
//
// Return: The Helm unit test output as string.
func (h *Examples) HelmTest(
	// method call context
	ctx context.Context,
	// directory that contains the Helm Chart, e.g. "./helm/examples/testdata/mychart/"
	directory *dagger.Directory,
	// Helm Unittest arguments, e.g. "." to reference the Helm Chart root directory inside the passed directory.
	args []string,
) (string, error) {
	return dag.
			Helm().
			Test(ctx, directory, args)
}
no available example in current language
no available example in current language

lint() 🔗

Run Helm lint with the given directory.

Provide the helm chart directory with pointing to it with the --directory flag. Use --args parameter to pass alternative chart locations or additional options to Helm lint - see https://helm.sh/docs/helm/helm_lint/#options

Example usage: dagger call lint –directory ./helm/examples/testdata/mychart/ –args “–quiet”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-directory that contains the Helm Chart
args[String ! ] -Helm lint arguments
Example
no available example in current language
// Example on how to call the Lint method.
//
// Run helm lint for the Helm Chart located inside the directory referenced by the directory parameter.
// Use `--args` parameter to pass alternative chart locations or additional options to Helm lint - see https://helm.sh/docs/helm/helm_lint/#options
//
// Return: The Helm lint output as string.
func (h *Examples) HelmLint(
	// method call context
	ctx context.Context,
	// directory that contains the Helm Chart, e.g. "./helm/examples/testdata/mychart/"
	directory *dagger.Directory,
    // Helm lint arguments
    // +optional
	args []string,
) (string, error) {
	return dag.
			Helm().
			Lint(ctx, directory)
}
no available example in current language
no available example in current language