helm
This module has been generated via dagger init and serves as a reference tobasic 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@f6eaa0e2880f94b7c62b899d215906e97071bb31
Entrypoint
Return Type
Helm !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | The helm source |
baseHelmContainer | Container | - | base helm container It need contain helm |
baseGeneratorContainer | Container | - | Base generator container It need contain readme-generator-for-helm |
baseYqContainer | Container | - | Base YQ container It need contain yq |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH
func (m *myModule) example(src *Directory) *Helm {
return dag.
Helm(src)
}
@function
def example(src: dagger.Directory, ) -> dag.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@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH helm-container
func (m *myModule) example(src *Directory) *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@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH generator-container
func (m *myModule) example(src *Directory) *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@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH yq-container
func (m *myModule) example(src *Directory) *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
Name | Type | Default Value | Description |
---|---|---|---|
key | String ! | - | The key to update on yaml file |
value | String ! | - | The new value to put |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH update-chart --key string --value string
func (m *myModule) example(src *Directory, key string, value string) *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
Name | Type | Default Value | Description |
---|---|---|---|
key | String ! | - | The key to update on yaml file |
value | String ! | - | The new value to put |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH update-values --key string --value string
func (m *myModule) example(src *Directory, key string, value string) *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)
}
ci() 🔗
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
registry | String | - | The registry You need to provide it if run from CI |
repository | String | - | The repository inside the registry You need to provide it if run from CI |
helmPaths | [String ! ] | ["."] | The helm paths |
ci | String | - | If you are on CI, provide the CI type to set the right stuff when commit to ovoid loop for ever |
version | String | - | The image version to publish You need to provide it if run from CI |
registryUsername | Secret | - | The registry username You need to provide it if run from CI |
registryPassword | Secret | - | The registry password You need to provide it if run from CI |
gitToken | Secret | - | The git token You need to provide it if run from CI |
gitRepoUrl | String | - | The git repo URL You need to provide it when you are on PullRequest |
gitBranch | String | - | 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@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH ci
func (m *myModule) example(src *Directory) *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
Name | Type | Default Value | Description |
---|---|---|---|
ci | String ! | - | The CI runner |
branches | [String ! ] ! | ["main"] | The branch from CI |
helmPaths | [String ! ] | ["."] | The helm paths |
daggerVersion | String | - | The dagger version to use Only used with Github Default use the current dagger version |
registry | String | - | The registry where to push helm chart Push to ghcr.io by default when you are on github CI |
repository | String | - | The repository Push to current repository by default when you are on github CI |
defaultBranch | String | "main" | The default branch name It's needed to commit change from a tag |
registryCredential | String | - | The registry credential name Only used when Jenkins pipeline |
registryUsernameKey | String | - | The credential name for registry username Only used when Github pipeline Default it use the current user |
registryPasswordKey | String | - | The credential name for registry password Only used when Github pipeline Default it use the current git token |
gitTokenCredential | String | - | The credential name for git token Only used for Jenkins pipeline |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH generate-ci --ci string --branches string1 --branches string2
func (m *myModule) example(src *Directory, ci string, branches []string) *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)
}
lint() 🔗
Lint permit to lint helm chart
Return Type
String !
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH lint
func (m *myModule) example(ctx context.Context, src *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()
}
generateDocumentation() 🔗
GenerateDocumentation permit to generate helm documentation It will return the readme file
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
targetFile | String | "README.md" | The target file |
configFile | String | - | Config file for readme-generator |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH generate-documentation
func (m *myModule) example(src *Directory) *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()
}
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
Name | Type | Default Value | Description |
---|---|---|---|
registryUrl | String ! | - | The registry url |
repositoryName | String ! | - | The repository name |
version | String ! | - | The version |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH push --registry-url string --repository-name string --version string
func (m *myModule) example(src *Directory, registryUrl string, repositoryName string, version string) *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)
}
generateSchema() 🔗
GenerateSchema permit to generate helm schema It will return the values.schema.json file
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
targetFile | String | "values.schema.json" | The target file |
configFile | String | - | Config file for readme-generator |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH generate-schema
func (m *myModule) example(src *Directory) *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
Name | Type | Default Value | Description |
---|---|---|---|
name | String | - | The repository name You need to set it when is not OCI format |
url | String ! | - | The repository url |
isOci | Boolean | false | Is it an OCI repository |
username | Secret ! | - | The repository username |
password | Secret ! | - | The repository password |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH with-repository --url string --username env:MYSECRET --password env:MYSECRET
func (m *myModule) example(src *Directory, url string, username *Secret, password *Secret) *Helm {
return dag.
Helm(src).
WithRepository(url, username, password)
}
@function
def example(src: dagger.Directory, url: str, username: dagger.Secret, password: dagger.Secret) -> dag.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
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | The source directory |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH with-source --src DIR_PATH
func (m *myModule) example(src *Directory, src1 *Directory) *Helm {
return dag.
Helm(src).
WithSource(src1)
}
@function
def example(src: dagger.Directory, src1: dagger.Directory) -> dag.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
Name | Type | Default Value | Description |
---|---|---|---|
path | String ! | - | The path where to go as working directory |
Example
dagger -m github.com/disaster37/dagger-library-go/helm@f6eaa0e2880f94b7c62b899d215906e97071bb31 call \
--src DIR_PATH with-work-dir --path string
func (m *myModule) example(src *Directory, path string) *Helm {
return dag.
Helm(src).
WithWorkDir(path)
}
@function
def example(src: dagger.Directory, path: str) -> dag.Helm:
return (
dag.helm(src)
.with_work_dir(path)
)
@func()
example(src: Directory, path: string): Helm {
return dag
.helm(src)
.withWorkDir(path)
}