Dagger
Search

maintenance

Postgres extension container images tasks

Installation

dagger install github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824

Entrypoint

Return Type
Maintenance
Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824 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
NameTypeDefault ValueDescription
sourceDirectory -

The source directory containing the extension folders. Defaults to the current directory

targetString !"all"

The target extension to update OS libs for. Defaults to “all”.

Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824 call \
 update-oslibs --target string
func (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
NameTypeDefault ValueDescription
sourceDirectory -

The source directory containing the extension folders. Defaults to the current directory

Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824 call \
 get-oslibs-targets
func (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
NameTypeDefault ValueDescription
sourceDirectory -

The source directory containing the extension folders. Defaults to the current directory

Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824 call \
 get-targets
func (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
NameTypeDefault ValueDescription
sourceDirectory -

The source directory containing the extension folders. Defaults to the current directory

targetDirectory !-

Path to the target extension directory

extensionImageString -

URL reference to the extension image to test [REPOSITORY[:TAG]]

registryUsernameString -

Registry username for authentication (optional)

registryPasswordSecret -

Registry password or token for authentication (optional)

Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824 call \
 generate-testing-values --target DIR_PATH
func (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
NameTypeDefault ValueDescription
templatesDirDirectory -

The source directory containing the extension template files

nameString !-

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

packageNameString -

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%-”)

Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824 call \
 create --name string --versions string1 --versions string2 --distros string1 --distros string2
func (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
NameTypeDefault ValueDescription
sourceDirectory -

The source directory containing the extension folders. Defaults to the current directory

kubeconfigFile !-

Kubeconfig to connect to the target K8s

targetString !"all"

The target extension to test

chainsawImageString !"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@32fce677a62f71ed13541f2a4420fc86f5149824 call \
 test --kubeconfig file:path --target string --chainsaw-image string
func (m *MyModule) Example(ctx context.Context, kubeconfig *dagger.File, target string, chainsawImage string)   {
	return dag.
			Maintenance().
			Test(ctxkubeconfig, target, chainsawImage)
}
@function
async def example(kubeconfig: dagger.File, target: str, chainsaw_image: str) -> None:
	return await (
		dag.maintenance()
		.test(kubeconfig, target, chainsaw_image)
	)
@func()
async example(kubeconfig: File, target: string, chainsawImage: string): Promise<void> {
	return dag
		.maintenance()
		.test(kubeconfig, target, chainsawImage)
}

generateCatalogs() 🔗

Generate extension’s ClusterImageCatalogs starting from a base set of catalogs

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -

The source directory containing the extension folders. Defaults to the current directory

catalogsDirDirectory -

The directory containing the starting catalogs. Defaults to “/image-catalogs”

Example
dagger -m github.com/GabriFedi97/postgres-extensions-containers/dagger/maintenance@32fce677a62f71ed13541f2a4420fc86f5149824 call \
 generate-catalogs
func (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()
}