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@ed0f40e321ab495bec9ca8fbb1e01236a5854d3e
Entrypoint
Return Type
Helm
Example
dagger -m github.com/puzzle/dagger-module-helm/helm@ed0f40e321ab495bec9ca8fbb1e01236a5854d3e 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
Name | Type | Default Value | Description |
---|---|---|---|
directory | Directory ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
directory | Directory ! | - | directory that contains the Helm Chart |
registry | String ! | - | URL of the registry |
repository | String ! | - | name of the repository |
username | String ! | - | registry login username |
password | Secret ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
directory | Directory ! | - | 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