helm
It includes functions to lint, render, package, and push Helm charts,making it easy to integrate chart validation and distribution into CI/CD workflows.
This module is designed to streamline Helm chart development and delivery,
ensuring charts are consistently validated, packaged, and distributed within automated builds.
Installation
dagger install github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129caEntrypoint
Return Type
Helm !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Helm chart host path |
| imageRegistry | String | "docker.io" | Helm image registry |
| imageRepository | String | "alpine/helm" | Helm image repositroy |
| imageTag | String | "3.18.6" | Helm image tag |
| userId | String | "65532" | Helm image user |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Helm {
return dag.
Helm(source)
}@function
def example(source: dagger.Directory, ) -> dagger.Helm:
return (
dag.helm(source)
)@func()
example(source: Directory, ): Helm {
return dag
.helm(source)
}Types
Helm 🔗
Dagger-ci helm module
container() 🔗
Creates container with configured helm
Return Type
Container ! Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH containerfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Helm(source).
Container()
}@function
def example(source: dagger.Directory, ) -> dagger.Container:
return (
dag.helm(source)
.container()
)@func()
example(source: Directory, ): Container {
return dag
.helm(source)
.container()
}getChartVersion() 🔗
Return chart metadata from helm show chart as YAML string
Return Type
String ! Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH get-chart-versionfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string {
return dag.
Helm(source).
GetChartVersion(ctx)
}@function
async def example(source: dagger.Directory, ) -> str:
return await (
dag.helm(source)
.get_chart_version()
)@func()
async example(source: Directory, ): Promise<string> {
return dag
.helm(source)
.getChartVersion()
}isAlreadyPublished() 🔗
Check if chart version exists in OCI registry
Return Type
Boolean !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ociChartUrl | String ! | - | Oci package address with chart name |
| version | String ! | - | Chart version to check |
| insecure | Boolean | false | Use insecure HTTP connections for the registry |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH is-already-published --oci-chart-url string --version stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, ociChartUrl string, version string) bool {
return dag.
Helm(source).
IsAlreadyPublished(ctx, ociChartUrl, version)
}@function
async def example(source: dagger.Directory, oci_chart_url: str, version: str) -> bool:
return await (
dag.helm(source)
.is_already_published(oci_chart_url, version)
)@func()
async example(source: Directory, ociChartUrl: string, version: string): Promise<boolean> {
return dag
.helm(source)
.isAlreadyPublished(ociChartUrl, version)
}lint() 🔗
Functions for helm chart linting
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| strict | Boolean | false | Fail on lint warnings |
| errorsOnly | Boolean | false | Print only warnings and errors |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH lintfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string {
return dag.
Helm(source).
Lint(ctx)
}@function
async def example(source: dagger.Directory, ) -> str:
return await (
dag.helm(source)
.lint()
)@func()
async example(source: Directory, ): Promise<string> {
return dag
.helm(source)
.lint()
}package() 🔗
Packages a chart into a versioned chart archive file
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| appVersion | String | "" | Set the appVersion on the chart to this version |
| version | String | "" | Set the version on the chart to this semver version |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH packagefunc (m *MyModule) Example(source *dagger.Directory) *dagger.File {
return dag.
Helm(source).
Package()
}@function
def example(source: dagger.Directory, ) -> dagger.File:
return (
dag.helm(source)
.package()
)@func()
example(source: Directory, ): File {
return dag
.helm(source)
.package()
}push() 🔗
Function for helm chart publishing
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ociUrl | String ! | - | Oci package address without package name and url |
| version | String | "" | Set the version on the chart to this semver version |
| insecure | Boolean | false | Use insecure HTTP connections for the chart upload |
| appVersion | String | "" | Set the appVersion on the chart to this version |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH push --oci-url stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, ociUrl string) string {
return dag.
Helm(source).
Push(ctx, ociUrl)
}@function
async def example(source: dagger.Directory, oci_url: str) -> str:
return await (
dag.helm(source)
.push(oci_url)
)@func()
async example(source: Directory, ociUrl: string): Promise<string> {
return dag
.helm(source)
.push(ociUrl)
}template() 🔗
Templates helm chart
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| values | File | null | Values.yaml file |
| releaseName | String ! | "ci-release" | Release name |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH template --release-name stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, releaseName string) string {
return dag.
Helm(source).
Template(ctxreleaseName)
}@function
async def example(source: dagger.Directory, release_name: str) -> str:
return await (
dag.helm(source)
.template(release_name)
)@func()
async example(source: Directory, releaseName: string): Promise<string> {
return dag
.helm(source)
.template(releaseName)
}withContainer() 🔗
Return Helm configured to use a custom container.
Return Type
Helm !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | Custom Helm container |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH with-container --container IMAGE:TAGfunc (m *MyModule) Example(source *dagger.Directory, container *dagger.Container) *dagger.Helm {
return dag.
Helm(source).
WithContainer(container)
}@function
def example(source: dagger.Directory, container: dagger.Container) -> dagger.Helm:
return (
dag.helm(source)
.with_container(container)
)@func()
example(source: Directory, container: Container): Helm {
return dag
.helm(source)
.withContainer(container)
}withDependencyUpdate() 🔗
Functions which runs helm dependency update
Return Type
Helm ! Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH with-dependency-updatefunc (m *MyModule) Example(source *dagger.Directory) *dagger.Helm {
return dag.
Helm(source).
WithDependencyUpdate()
}@function
def example(source: dagger.Directory, ) -> dagger.Helm:
return (
dag.helm(source)
.with_dependency_update()
)@func()
example(source: Directory, ): Helm {
return dag
.helm(source)
.withDependencyUpdate()
}withRegistryLogin() 🔗
Function for helm registry authentication
Return Type
Helm !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| username | String ! | - | Registry username |
| password | Secret ! | - | Registry password |
| address | String | "docker.io" | Registry host |
Example
dagger -m github.com/riftonix/daggerverse/modules/helm@875bc512cdced2a013cfbbe891ea858f710129ca call \
--source DIR_PATH with-registry-login --username string --password env:MYSECRETfunc (m *MyModule) Example(source *dagger.Directory, username string, password *dagger.Secret) *dagger.Helm {
return dag.
Helm(source).
WithRegistryLogin(username, password)
}@function
def example(source: dagger.Directory, username: str, password: dagger.Secret) -> dagger.Helm:
return (
dag.helm(source)
.with_registry_login(username, password)
)@func()
example(source: Directory, username: string, password: Secret): Helm {
return dag
.helm(source)
.withRegistryLogin(username, password)
}