startup

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package startup holds the contract between the operator and the pgbouncer-startup binary that runs as the PgBouncer container's startup probe: the paths it reads, the environment it expects, and the admin credentials it connects with.

The binary is copied out of the operator image into the PgBouncer image by the init container, so it is built with CGO_ENABLED=0 to stay independent of the target image's libc. This package must therefore stay free of any dependency that requires cgo — notably internal/postgres, which pulls in pg_query_go.

Index

Constants

View Source
const (
	// ConfigDirectory is where the PgBouncer configuration volume is mounted.
	ConfigDirectory = "/etc/pgbouncer"

	// LogDirectory is where the PgBouncer log volume is mounted.
	LogDirectory = "/var/logs"

	// LogAbsolutePath is where the binary appends its own output, so that a
	// failed startup can be inspected after the fact.
	LogAbsolutePath = LogDirectory + "/startup.log"

	// PausedFileProjectionPath is the paused marker's path within the
	// configuration volume, and PausedFileAbsolutePath is its full path. The
	// marker is projected optionally: it is absent unless the cluster is paused.
	PausedFileProjectionPath = "pgbouncer-paused"
	PausedFileAbsolutePath   = ConfigDirectory + "/" + PausedFileProjectionPath

	// PausedValue is the marker's content when connections should be paused.
	PausedValue = "1"

	// AdminUser is the PgBouncer user allowed to issue PAUSE and RESUME.
	AdminUser = "_crunchypgbounceradmin"

	// AdminPasswordEnvVar names the environment variable holding AdminUser's
	// password in the PgBouncer container.
	AdminPasswordEnvVar = "PGBOUNCER_ADMIN_PASSWORD" // #nosec G101 this is a name, not a credential

	// PauseTimeoutSeconds is the timeout for setting pause.
	PauseTimeoutSeconds = 30

	PortEnvVar = "PGBOUNCER_PORT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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