kustomize
The default container is Alpine with the official kustomize release binary forthe engine's platform (the registry.k8s.io image is amd64-only).
Installation
dagger install github.com/hampusctl/daggerverse/kustomize@1b08831096058e8c3abb47cdde51e51663023d86Entrypoint
Return Type
Kustomize !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | container is an existing container with kustomize on PATH |
| version | String ! | "v5.8.3" | version is the kustomize release, e.g. v5.8.3 |
| base | String ! | "alpine:3.22" | base is the image the binary is installed into |
| extraCaCerts | [File ! ] | - | extraCaCerts are additional CA certificate files to trust |
Example
dagger -m github.com/hampusctl/daggerverse/kustomize@1b08831096058e8c3abb47cdde51e51663023d86 call \
--version string --base stringfunc (m *MyModule) Example(version string, base string) *dagger.Kustomize {
return dag.
Kustomize(version, base)
}@function
def example(version: str, base: str, ) -> dagger.Kustomize:
return (
dag.kustomize(version, base)
)@func()
example(version: string, base: string, ): Kustomize {
return dag
.kustomize(version, base)
}Types
Kustomize 🔗
Kustomize runs kustomize build and kustomize edit.
container() 🔗
Return Type
Container ! Example
dagger -m github.com/hampusctl/daggerverse/kustomize@1b08831096058e8c3abb47cdde51e51663023d86 call \
--version string --base string containerfunc (m *MyModule) Example(version string, base string) *dagger.Container {
return dag.
Kustomize(version, base).
Container()
}@function
def example(version: str, base: str, ) -> dagger.Container:
return (
dag.kustomize(version, base)
.container()
)@func()
example(version: string, base: string, ): Container {
return dag
.kustomize(version, base)
.container()
}build() 🔗
Build runs kustomize build on path inside source and returns the rendered YAML.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | source is the directory holding the kustomization and everything it references |
| path | String ! | "." | path is the kustomization directory, relative to source |
| extraArgs | [String ! ] | - | extraArgs are additional kustomize build arguments, e.g. [“–enable-helm”] |
Example
dagger -m github.com/hampusctl/daggerverse/kustomize@1b08831096058e8c3abb47cdde51e51663023d86 call \
--version string --base string build --source DIR_PATH --path stringfunc (m *MyModule) Example(version string, base string, source *dagger.Directory, path string) *dagger.File {
return dag.
Kustomize(version, base).
Build(source, path)
}@function
def example(version: str, base: str, source: dagger.Directory, path: str) -> dagger.File:
return (
dag.kustomize(version, base)
.build(source, path)
)@func()
example(version: string, base: string, source: Directory, path: string): File {
return dag
.kustomize(version, base)
.build(source, path)
}setImage() 🔗
SetImage runs “kustomize edit set image” on the kustomization in dir and returns the updated source directory. Each image is “name=newName[:tag|@digest]”.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | source is the directory holding the kustomization |
| dir | String ! | "." | dir is the kustomization directory, relative to source |
| images | [String ! ] ! | - | images are the image overrides, e.g. [“controller=ghcr.io/org/app@sha256:…”] |
Example
dagger -m github.com/hampusctl/daggerverse/kustomize@1b08831096058e8c3abb47cdde51e51663023d86 call \
--version string --base string set-image --source DIR_PATH --dir string --images string1 --images string2func (m *MyModule) Example(version string, base string, source *dagger.Directory, dir string, images []string) *dagger.Directory {
return dag.
Kustomize(version, base).
Setimage(source, dir, images)
}@function
def example(version: str, base: str, source: dagger.Directory, dir: str, images: List[str]) -> dagger.Directory:
return (
dag.kustomize(version, base)
.setimage(source, dir, images)
)@func()
example(version: string, base: string, source: Directory, dir: string, images: string[]): Directory {
return dag
.kustomize(version, base)
.setImage(source, dir, images)
}