Dagger
Search

helm

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854

Entrypoint

Return Type
Helm !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The helm source
baseHelmContainerContainer -base helm container It need contain helm
baseGeneratorContainerContainer -Base generator container It need contain readme-generator-for-helm
baseYqContainerContainer -Base YQ container It need contain yq
Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.Helm  {
	return dag.
			Helm(src)
}
@function
def example(src: dagger.Directory, ) -> dagger.Helm:
	return (
		dag.helm(src)
	)
@func()
example(src: Directory, ): Helm {
	return dag
		.helm(src)
}

Types

Helm 🔗

helmContainer() 🔗

Return Type
Container !
Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH helm-container
func (m *MyModule) Example(src *dagger.Directory) *dagger.Container  {
	return dag.
			Helm(src).
			HelmContainer()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
	return (
		dag.helm(src)
		.helm_container()
	)
@func()
example(src: Directory, ): Container {
	return dag
		.helm(src)
		.helmContainer()
}

generatorContainer() 🔗

Return Type
Container !
Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH generator-container
func (m *MyModule) Example(src *dagger.Directory) *dagger.Container  {
	return dag.
			Helm(src).
			GeneratorContainer()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
	return (
		dag.helm(src)
		.generator_container()
	)
@func()
example(src: Directory, ): Container {
	return dag
		.helm(src)
		.generatorContainer()
}

yqContainer() 🔗

Return Type
Container !
Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH yq-container
func (m *MyModule) Example(src *dagger.Directory) *dagger.Container  {
	return dag.
			Helm(src).
			YqContainer()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
	return (
		dag.helm(src)
		.yq_container()
	)
@func()
example(src: Directory, ): Container {
	return dag
		.helm(src)
		.yqContainer()
}

updateChart() 🔗

Update Chart.yaml file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
keyString !-

The key to update on yaml file

valueString !-

The new value to put

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH update-chart --key string --value string
func (m *MyModule) Example(src *dagger.Directory, key string, value string) *dagger.File  {
	return dag.
			Helm(src).
			UpdateChart(key, value)
}
@function
def example(src: dagger.Directory, key: str, value: str) -> dagger.File:
	return (
		dag.helm(src)
		.update_chart(key, value)
	)
@func()
example(src: Directory, key: string, value: string): File {
	return dag
		.helm(src)
		.updateChart(key, value)
}

updateValues() 🔗

Update values.yaml file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
keyString !-

The key to update on yaml file

valueString !-

The new value to put

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH update-values --key string --value string
func (m *MyModule) Example(src *dagger.Directory, key string, value string) *dagger.File  {
	return dag.
			Helm(src).
			UpdateValues(key, value)
}
@function
def example(src: dagger.Directory, key: str, value: str) -> dagger.File:
	return (
		dag.helm(src)
		.update_values(key, value)
	)
@func()
example(src: Directory, key: string, value: string): File {
	return dag
		.helm(src)
		.updateValues(key, value)
}

lint() 🔗

Lint permit to lint helm chart

Return Type
String !
Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH lint
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string  {
	return dag.
			Helm(src).
			Lint(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
	return await (
		dag.helm(src)
		.lint()
	)
@func()
async example(src: Directory, ): Promise<string> {
	return dag
		.helm(src)
		.lint()
}

ci() 🔗

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
registryString -

The registry You need to provide it if run from CI

repositoryString -

The repository inside the registry You need to provide it if run from CI

helmPaths[String ! ] ["."]

The helm paths

ciString -

If you are on CI, provide the CI type to set the right stuff when commit to ovoid loop for ever

versionString -

The image version to publish You need to provide it if run from CI

registryUsernameSecret -

The registry username You need to provide it if run from CI

registryPasswordSecret -

The registry password You need to provide it if run from CI

gitTokenSecret -

The git token You need to provide it if run from CI

gitRepoUrlString -

The git repo URL You need to provide it when you are on PullRequest

gitBranchString -

The git branch where you should to push You need to provide it when you are on PullRequest or on Tag

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH ci
func (m *MyModule) Example(src *dagger.Directory) *dagger.Directory  {
	return dag.
			Helm(src).
			Ci()
}
@function
def example(src: dagger.Directory, ) -> dagger.Directory:
	return (
		dag.helm(src)
		.ci()
	)
@func()
example(src: Directory, ): Directory {
	return dag
		.helm(src)
		.ci()
}

generateCi() 🔗

GenerateCi permit to generate CI file

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
ciString !-

The CI runner

branches[String ! ] !["main"]

The branch from CI

helmPaths[String ! ] ["."]

The helm paths

daggerVersionString -

The dagger version to use Only used with Github Default use the current dagger version

registryString -

The registry where to push helm chart Push to ghcr.io by default when you are on github CI

repositoryString -

The repository Push to current repository by default when you are on github CI

defaultBranchString "main"

The default branch name It’s needed to commit change from a tag

registryCredentialString -

The registry credential name Only used when Jenkins pipeline

registryUsernameKeyString -

The credential name for registry username Only used when Github pipeline Default it use the current user

registryPasswordKeyString -

The credential name for registry password Only used when Github pipeline Default it use the current git token

gitTokenCredentialString -

The credential name for git token Only used for Jenkins pipeline

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH generate-ci --ci string --branches string1 --branches string2
func (m *MyModule) Example(src *dagger.Directory, ci string, branches []string) *dagger.Directory  {
	return dag.
			Helm(src).
			GenerateCi(ci, branches)
}
@function
def example(src: dagger.Directory, ci: str, branches: List[str]) -> dagger.Directory:
	return (
		dag.helm(src)
		.generate_ci(ci, branches)
	)
@func()
example(src: Directory, ci: string, branches: string[]): Directory {
	return dag
		.helm(src)
		.generateCi(ci, branches)
}

push() 🔗

Push helm chart on registry (OCI format only) It will return the updated Chart.yaml file with the expected version

Return Type
File !
Arguments
NameTypeDefault ValueDescription
registryUrlString !-

The registry url

repositoryNameString !-

The repository name

versionString !-

The version

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH push --registry-url string --repository-name string --version string
func (m *MyModule) Example(src *dagger.Directory, registryUrl string, repositoryName string, version string) *dagger.File  {
	return dag.
			Helm(src).
			Push(registryUrl, repositoryName, version)
}
@function
def example(src: dagger.Directory, registry_url: str, repository_name: str, version: str) -> dagger.File:
	return (
		dag.helm(src)
		.push(registry_url, repository_name, version)
	)
@func()
example(src: Directory, registryUrl: string, repositoryName: string, version: string): File {
	return dag
		.helm(src)
		.push(registryUrl, repositoryName, version)
}

generateDocumentation() 🔗

GenerateDocumentation permit to generate helm documentation It will return the readme file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
targetFileString "README.md"

The target file

configFileString -

Config file for readme-generator

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH generate-documentation
func (m *MyModule) Example(src *dagger.Directory) *dagger.File  {
	return dag.
			Helm(src).
			GenerateDocumentation()
}
@function
def example(src: dagger.Directory, ) -> dagger.File:
	return (
		dag.helm(src)
		.generate_documentation()
	)
@func()
example(src: Directory, ): File {
	return dag
		.helm(src)
		.generateDocumentation()
}

generateSchema() 🔗

GenerateSchema permit to generate helm schema It will return the values.schema.json file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
targetFileString "values.schema.json"

The target file

configFileString -

Config file for readme-generator

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH generate-schema
func (m *MyModule) Example(src *dagger.Directory) *dagger.File  {
	return dag.
			Helm(src).
			GenerateSchema()
}
@function
def example(src: dagger.Directory, ) -> dagger.File:
	return (
		dag.helm(src)
		.generate_schema()
	)
@func()
example(src: Directory, ): File {
	return dag
		.helm(src)
		.generateSchema()
}

withRepository() 🔗

WithRepository permit to login on private helm repository

Return Type
Helm !
Arguments
NameTypeDefault ValueDescription
nameString -

The repository name You need to set it when is not OCI format

urlString !-

The repository url

isOciBoolean false

Is it an OCI repository

usernameSecret !-

The repository username

passwordSecret !-

The repository password

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH with-repository --url string --username env:MYSECRET --password env:MYSECRET
func (m *MyModule) Example(src *dagger.Directory, url string, username *dagger.Secret, password *dagger.Secret) *dagger.Helm  {
	return dag.
			Helm(src).
			WithRepository(url, username, password)
}
@function
def example(src: dagger.Directory, url: str, username: dagger.Secret, password: dagger.Secret) -> dagger.Helm:
	return (
		dag.helm(src)
		.with_repository(url, username, password)
	)
@func()
example(src: Directory, url: string, username: Secret, password: Secret): Helm {
	return dag
		.helm(src)
		.withRepository(url, username, password)
}

withSource() 🔗

WithSource permit to update the current source

Return Type
Helm !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-

The source directory

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH with-source --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory, src1 *dagger.Directory) *dagger.Helm  {
	return dag.
			Helm(src).
			WithSource(src1)
}
@function
def example(src: dagger.Directory, src1: dagger.Directory) -> dagger.Helm:
	return (
		dag.helm(src)
		.with_source(src1)
	)
@func()
example(src: Directory, src1: Directory): Helm {
	return dag
		.helm(src)
		.withSource(src1)
}

withWorkDir() 🔗

WithWorkDir change the working directory on all containers

Return Type
Helm !
Arguments
NameTypeDefault ValueDescription
pathString !-

The path where to go as working directory

Example
dagger -m github.com/disaster37/dagger-library-go/helm@973aa50d7915782c6623963ea5e9d75cfc0b5854 call \
 --src DIR_PATH with-work-dir --path string
func (m *MyModule) Example(src *dagger.Directory, path string) *dagger.Helm  {
	return dag.
			Helm(src).
			WithWorkDir(path)
}
@function
def example(src: dagger.Directory, path: str) -> dagger.Helm:
	return (
		dag.helm(src)
		.with_work_dir(path)
	)
@func()
example(src: Directory, path: string): Helm {
	return dag
		.helm(src)
		.withWorkDir(path)
}