# Functions
AddBootstrapRepo creates a pgBackRest repository and associated service to use when bootstrapping a cluster from an existing data source.
No description provided by the author
AddClusterBootstrap creates the resources needed to bootstrap a new cluster from an existing data source.
AddExporter ensures that a PostgreSQL cluster is able to undertake the actions required by the "crunchy-postgres-exporter", i.e.
AddPgAdmin contains the various functions that are used to add a pgAdmin Deployment to a PostgreSQL cluster
Any returned error is logged in the calling function.
AddPgAdminFromPgTask is a method that helps to bring up the pgAdmin deployment that sits alongside a PostgreSQL cluster.
AddPGBadger ensures that a PostgreSQL cluster is able to undertake the actions required by the "crunchy-badger", i.e.
AddPgbouncer contains the various functions that are used to add a pgBouncer Deployment to a PostgreSQL cluster
Any returned error is logged in the calling function.
AddUpgrade implements the upgrade workflow in accordance with the received pgtask the general process is outlined below: 1) get the existing pgcluster CRD instance that matches the name provided in the pgtask 2) Patch the existing services 3) Determine the current Primary PVC 4) Scale down existing replicas and store the number for recreation 5) Delete the various resources that will need to be recreated 6) Recreate the BackrestRepo secret, since the key encryption algorithm has been updated 7) Update the existing pgcluster CRD instance to match the current version 8) Submit the pgcluster CRD for recreation.
No description provided by the author
CreateExporterSecret create a secret used by the exporter containing the user credientials.
CreateService ...
DeletePgAdmin contains the various functions that are used to delete a pgAdmin Deployment for a PostgreSQL cluster
Any errors that are returned should be logged in the calling function, though some logging occurs in this function as well.
DeletePgAdminFromPgTask is effectively a legacy method that helps to delete the pgAdmin deployment that sits alongside a PostgreSQL cluster.
DeletePgbouncer contains the various functions that are used to delete a pgBouncer Deployment for a PostgreSQL cluster
Note that "uninstall" deletes all of the objects that are added to the PostgreSQL database, such as the "pgbouncer" user.
DeleteReplica ...
DisableStandby disables standby mode for the cluster.
EnableStandby enables standby mode for the cluster.
PublishUpgradeEvent lets one publish an event related to the upgrade process.
RemoveExporter disables the ability for a PostgreSQL cluster to use the exporter functionality.
RemovePGBadger disables the ability for a PostgreSQL cluster to run a pgBadger cluster.
ResizeClusterPVC allows for the resizing of all the PVCs across the cluster.
ResizePGAdminPVC resizes the pgAdmin PVC.
ResizeWALPVC allows for the resizing of the PVCs where WAL are stored.
RollingUpdate performs a type of "rolling update" on a series of Deployments of a PostgreSQL cluster in an attempt to minimize downtime.
RotateExporterPassword rotates the password for the monitoring PostgreSQL user.
RotatePgBouncerPassword rotates the password for a pgBouncer PostgreSQL user, which involves updating the password in the PostgreSQL cluster as well as the users secret that is available in the pgbouncer Pod.
ScaleBase ...
ScaleClusterDeployments scales all deployments for a cluster to the number of replicas specified using the 'replicas' parameter.
ScaleDownBase ...
SetReplicaNumber sets the pgcluster's replica value based off of the number of pgreplicas discovered during the deletion process.
ShutdownCluster is responsible for shutting down a cluster that is currently running.
StartupCluster is responsible for starting a cluster that was previsouly shutdown.
stopPostgreSQLInstance is a proxy function for the main StopPostgreSQLInstance function, as it preps a Deployment to have its PostgreSQL instance shut down.
ToggleTLS will toggle the appropriate Postgres configuration in a DCS file around the TLS settings.
UninstallPgBouncer uninstalls the "pgbouncer" user and other management objects from the PostgreSQL cluster.
UpdateAnnotations updates the annotations in the "template" portion of a PostgreSQL deployment.
UpdateBackrestS3 updates any pgBackRest settings that may have been updated.
UpdateClusterService updates parameters (really just one) on a Service that represents a PostgreSQL cluster.
UpdateExporterSidecar either adds or emoves the metrics sidcar from the cluster.
UpdateLabels updates the labels on the template to match those of the custom labels.
No description provided by the author
UpdatePGBadgerSidecar either adds or emoves the pgBadger sidcar from the cluster.
UpdatePgbouncer contains the various functions that are used to perform updates to the pgBouncer deployment for a cluster, such as rotating a password
Any errors that are returned should be logged in the calling function, though some logging occurs in this function as well.
UpdatePgBouncerAnnotations updates the annotations in the "template" portion of a pgBouncer deployment.
UpdatePgBouncerService updates the information on the pgBouncer Service.
No description provided by the author
UpdateClusterService updates parameters (really just one) on a Service that represents a PostgreSQL replca instance.
UpdateResources updates the PostgreSQL instance Deployments to reflect the update resources (i.e.
UpdateTablespaces updates the PostgreSQL instance Deployments to update what tablespaces are mounted.
UpdateTLS updates whether or not TLS is enabled, and if certain attributes are set (i.e.
UpdateTolerations updates the Toleration definition for a Deployment.
# Constants
ReplicaSuffix is the suffix of the replica Service name.
# Variables
ErrClusterNotShutdown defines the error that is thrown when an action cannot proceed because the cluster is not in standby mode.
ErrStandbyNotAllowed contains the error message returned when an API call is not permitted because it involves a cluster that is in standby mode.
ErrStandbyNotEnabled defines the error that is thrown when standby mode is not enabled but a standby action was attempted.
# Structs
No description provided by the author
No description provided by the author
ScaleClusterInfo contains information about a cluster obtained when scaling the various deployments for a cluster.
ServiceTemplateFields ...