Documentation
¶
Overview ¶
Package extensions provides utilities for resolving PostgreSQL extension configurations from image catalogs and cluster specifications
Index ¶
- func AppendPaths(existing string, extra []string) string
- func CollectBinPaths(extensionList []apiv1.ExtensionConfiguration, baseDir string) []string
- func CollectLibraryPaths(extensionList []apiv1.ExtensionConfiguration, baseDir string) []string
- func ResolveFromCatalog(cluster *apiv1.Cluster, catalog apiv1.GenericImageCatalog, ...) ([]apiv1.ExtensionConfiguration, error)
- func SetEnvVars(extensionList []apiv1.ExtensionConfiguration, envMap envmap.EnvironmentMap, ...)
- func ValidateWithoutCatalog(cluster *apiv1.Cluster) ([]apiv1.ExtensionConfiguration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendPaths ¶
AppendPaths returns existing (a colon-separated list, possibly empty) with extra appended. Returns existing unchanged when extra is empty.
func CollectBinPaths ¶
func CollectBinPaths(extensionList []apiv1.ExtensionConfiguration, baseDir string) []string
CollectBinPaths returns a list of paths which should be added to PATH given a list of extensions mounted under baseDir. NOTE: filepath.Join normalizes user-supplied paths (e.g. leading "/", "./" or trailing "/" are cleaned), so "/bin", "./bin", and "bin" all resolve to the same directory under the extension mount point.
func CollectLibraryPaths ¶
func CollectLibraryPaths(extensionList []apiv1.ExtensionConfiguration, baseDir string) []string
CollectLibraryPaths returns a list of paths which should be added to LD_LIBRARY_PATH given a list of extensions mounted under baseDir. NOTE: filepath.Join normalizes user-supplied paths (e.g. leading "/", "./" or trailing "/" are cleaned), so "/lib", "./lib", and "lib" all resolve to the same directory under the extension mount point.
func ResolveFromCatalog ¶
func ResolveFromCatalog( cluster *apiv1.Cluster, catalog apiv1.GenericImageCatalog, requestedMajorVersion int, ) ([]apiv1.ExtensionConfiguration, error)
ResolveFromCatalog returns a list of requested Extensions from a Catalog for a given Postgres major version. If present, extension entries present in the catalog are always used as a starting base. If additional configuration is passed via `cluster.Spec.PostgresConfiguration.Extensions` for an extension that's already defined in the catalog, the values defined in the Cluster take precedence.
func SetEnvVars ¶
func SetEnvVars(extensionList []apiv1.ExtensionConfiguration, envMap envmap.EnvironmentMap, baseDir string)
SetEnvVars applies custom Env entries from the given extensions (mounted under baseDir) into envMap, expanding placeholders like ${image_root} against baseDir. Names reserved for operator use or covered by dedicated fields are skipped; overrides are logged as warnings.
func ValidateWithoutCatalog ¶
func ValidateWithoutCatalog(cluster *apiv1.Cluster) ([]apiv1.ExtensionConfiguration, error)
ValidateWithoutCatalog returns extensions when cluster uses imageName directly. In this case, all extensions must be fully specified in the cluster spec.
Types ¶
This section is empty.