cnpg

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultStorageSize = "1Gi"
	DefaultInstances   = int64(1)
)

Variables

View Source
var ClusterGVK = schema.GroupVersionKind{
	Group:   "postgresql.cnpg.io",
	Version: "v1",
	Kind:    "Cluster",
}

ClusterGVK is the GroupVersionKind for CloudNativePG Cluster resources.

Functions

func ClusterName

func ClusterName(envName string) string

ClusterName returns a valid DNS-1123 name diverge-pg-<envName> (<= 50 chars so <clusterName>-rw fits in 63 chars).

Types

type CNPGDatabaseProvider

type CNPGDatabaseProvider struct {
	Client          client.Client
	Scheme          *runtime.Scheme
	StorageSize     string // default "1Gi"
	Instances       int64  // default 1
	SourceCluster   string // optional default source cluster for recovery/clone
	SourceNamespace string // optional default namespace for source cluster
}

CNPGDatabaseProvider provisions and tears down ephemeral CloudNativePG Clusters.

func (*CNPGDatabaseProvider) Provision

Provision creates or reconciles a CloudNativePG Cluster for the preview environment.

func (*CNPGDatabaseProvider) Status

Status inspects the CNPG Cluster status phase and conditions.

func (*CNPGDatabaseProvider) Teardown

Teardown deletes the CNPG Cluster for the preview environment idempotently.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL