Documentation ¶
Index ¶
Constants ¶
const ( PrettyPatroni patroniFormat = "pretty" TSVPatroni patroniFormat = "tsv" JSONPatroni patroniFormat = "json" YAMLPatroni patroniFormat = "yaml" )
const ( TextPGBackRest pgbackrestFormat = "text" JSONPGBackRest pgbackrestFormat = "json" )
const ( // LabelCluster is used to label PostgresCluster objects. LabelCluster = labelPrefix + "cluster" // LabelData is used to identify Pods and Volumes store Postgres data. LabelData = labelPrefix + "data" // LabelRole is used to identify object roles. LabelRole = labelPrefix + "role" // LabelMonitoring is used to identify monitoring Pods LabelMonitoring = "app.kubernetes.io/name=postgres-operator-monitoring" )
const ( // RolePatroniLeader is the LabelRole that Patroni sets on the Pod that is // currently the leader. RolePatroniLeader = "master" // RolePostgresUser is the LabelRole applied to PostgreSQL user secrets. RolePostgresUser = "pguser" )
const ( // ContainerDatabase is the name of the container running PostgreSQL and // supporting tools: Patroni, pgBackRest, etc. ContainerDatabase = "database" )
const (
// DataPostgres is a LabelData value that indicates the object has PostgreSQL data.
DataPostgres = "postgres"
)
Variables ¶
This section is empty.
Functions ¶
func Confirm ¶ added in v0.4.0
Confirm uses a Scanner to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations and return 'true'. Similarly, "n", "N", "no", "No", "NO" all deny confirmation and return 'false'. If the input is not recognized, nil is returned.
func NewPodExecutor ¶
NewPodExecutor returns an executor function. It is used when commands are run from a Container shell using an 'exec' command. The RBAC settings required for this are "resources=pods/exec,verbs=create"
func PostgresUserSecretLabels ¶ added in v0.4.0
PostgresUserSecretLabels provides labels for the Postgres user Secret
func PrimaryInstanceLabels ¶
PrimaryInstanceLabels provides labels for a PostgreSQL cluster primary instance
Types ¶
This section is empty.