maintenance
Postgres extension container images tasksInstallation
dagger install github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26Entrypoint
Return Type
Maintenance Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
func (m *MyModule) Example() *dagger.Maintenance {
return dag.
Maintenance()
}@function
def example() -> dagger.Maintenance:
return (
dag.maintenance()
)@func()
example(): Maintenance {
return dag
.maintenance()
}Types
Maintenance 🔗
updateOslibs() 🔗
Updates the OS dependencies in the system-libs directory for the specified extension(s)
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | The source directory containing the extension folders. Defaults to the current directory |
| target | String ! | "all" | The target extension to update OS libs for. Defaults to "all". |
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
update-oslibs --target stringfunc (m *MyModule) Example(target string) *dagger.Directory {
return dag.
Maintenance().
UpdateOslibs(target)
}@function
def example(target: str) -> dagger.Directory:
return (
dag.maintenance()
.update_oslibs(target)
)@func()
example(target: string): Directory {
return dag
.maintenance()
.updateOslibs(target)
}getOslibsTargets() 🔗
Retrieves a list in JSON format of the extensions requiring OS libs updates
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | The source directory containing the extension folders. Defaults to the current directory |
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
get-oslibs-targetsfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Maintenance().
GetOslibsTargets(ctx)
}@function
async def example() -> str:
return await (
dag.maintenance()
.get_oslibs_targets()
)@func()
async example(): Promise<string> {
return dag
.maintenance()
.getOslibsTargets()
}getTargets() 🔗
Retrieves a list in JSON format of the extensions
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | The source directory containing the extension folders. Defaults to the current directory |
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
get-targetsfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Maintenance().
GetTargets(ctx)
}@function
async def example() -> str:
return await (
dag.maintenance()
.get_targets()
)@func()
async example(): Promise<string> {
return dag
.maintenance()
.getTargets()
}generateTestingValues() 🔗
Generates Chainsaw’s testing external values in YAML format
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | The source directory containing the extension folders. Defaults to the current directory |
| target | Directory ! | - | Path to the target extension directory |
| extensionImage | String | - | URL reference to the extension image to test [REPOSITORY[:TAG]] |
| registryUsername | String | - | Registry username for authentication (optional) |
| registryPassword | Secret | - | Registry password or token for authentication (optional) |
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
generate-testing-values --target DIR_PATHfunc (m *MyModule) Example(target *dagger.Directory) *dagger.File {
return dag.
Maintenance().
GenerateTestingValues(target)
}@function
def example(target: dagger.Directory) -> dagger.File:
return (
dag.maintenance()
.generate_testing_values(target)
)@func()
example(target: Directory): File {
return dag
.maintenance()
.generateTestingValues(target)
}create() 🔗
Scaffolds a new Postgres extension directory structure
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| templatesDir | Directory | - | The source directory containing the extension template files |
| name | String ! | - | The name of the extension |
| versions | [String ! ] ! | ["18"] | The Postgres major versions the extension is supported for |
| distros | [String ! ] ! | ["trixie","bookworm"] | The Debian distributions the extension is supported for |
| packageName | String | - | The Debian package name for the extension. If the package name contains the postgres version, it can be templated using the "%version%" placeholder. (default "postgresql-%version%-<name>") |
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
create --name string --versions string1 --versions string2 --distros string1 --distros string2func (m *MyModule) Example(name string, versions []string, distros []string) *dagger.Directory {
return dag.
Maintenance().
Create(name, versions, distros)
}@function
def example(name: str, versions: List[str], distros: List[str]) -> dagger.Directory:
return (
dag.maintenance()
.create(name, versions, distros)
)@func()
example(name: string, versions: string[], distros: string[]): Directory {
return dag
.maintenance()
.create(name, versions, distros)
}test() 🔗
Tests the specified target using Chainsaw
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | The source directory containing the extension folders. Defaults to the current directory |
| kubeconfig | File ! | - | Kubeconfig to connect to the target K8s |
| target | String ! | "all" | The target extension to test |
| chainsawImage | String ! | "ghcr.io/kyverno/chainsaw:v0.2.14@sha256:c703e4d4ce7b89c5121fe957ab89b6e2d33f91fd15f8274a9f79ca1b2ba8ecef" | Container image to use to run chainsaw renovate: datasource=docker depName=kyverno/chainsaw packageName=ghcr.io/kyverno/chainsaw versioning=docker |
| extraArgs | [String ! ] ! | - | Additional arguments to pass to Chainsaw test command |
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
test --kubeconfig file:path --target string --chainsaw-image string --extra-args string1 --extra-args string2func (m *MyModule) Example(ctx context.Context, kubeconfig *dagger.File, target string, chainsawImage string, extraArgs []string) {
return dag.
Maintenance().
Test(ctxkubeconfig, target, chainsawImage, extraArgs)
}@function
async def example(kubeconfig: dagger.File, target: str, chainsaw_image: str, extra_args: List[str]) -> None:
return await (
dag.maintenance()
.test(kubeconfig, target, chainsaw_image, extra_args)
)@func()
async example(kubeconfig: File, target: string, chainsawImage: string, extraArgs: string[]): Promise<void> {
return dag
.maintenance()
.test(kubeconfig, target, chainsawImage, extraArgs)
}generateCatalogs() 🔗
Generate extension’s ClusterImageCatalogs starting from a base set of catalogs
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | The source directory containing the extension folders. Defaults to the current directory |
| catalogsDir | Directory | - | The directory containing the starting catalogs. Defaults to "/image-catalogs" |
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@7a5465b603379bf149c0d69e31b2afbbbd245a26 call \
generate-catalogsfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Maintenance().
GenerateCatalogs()
}@function
def example() -> dagger.Directory:
return (
dag.maintenance()
.generate_catalogs()
)@func()
example(): Directory {
return dag
.maintenance()
.generateCatalogs()
}