Documentation ¶
Overview ¶
Package controller contains the function in PGK that reacts to events in the cluster.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgBouncerInstanceInterface ¶
type PgBouncerInstanceInterface interface { Paused() bool Pause() error Resume() error Reload() error }
PgBouncerInstanceInterface the public interface for a PgBouncer instance, implementations should be thread safe
func NewPgBouncerInstance ¶
func NewPgBouncerInstance() PgBouncerInstanceInterface
NewPgBouncerInstance initializes a new pgBouncerInstance
type PgBouncerReconciler ¶
type PgBouncerReconciler struct {
// contains filtered or unexported fields
}
PgBouncerReconciler can reconcile the status of the PostgreSQL cluster with the one of this PostgreSQL instance. Also the configuration in the ConfigMap is applied when needed
func NewPgBouncerReconciler ¶
func NewPgBouncerReconciler(poolerNamespacedName types.NamespacedName) (*PgBouncerReconciler, error)
NewPgBouncerReconciler creates a new pgbouncer reconciler
func (*PgBouncerReconciler) GetClient ¶
func (r *PgBouncerReconciler) GetClient() ctrl.Client
GetClient returns the dynamic client that is being used for a certain reconciler
func (*PgBouncerReconciler) Init ¶
func (r *PgBouncerReconciler) Init(ctx context.Context) error
Init ensures that all PgBouncer requirement are met.
In detail: 1. create the pgbouncer configuration and the required secrets 2. ensure that every needed folder is existent
func (*PgBouncerReconciler) Reconcile ¶
Reconcile is the main reconciliation loop for the pgbouncer instance
func (*PgBouncerReconciler) Run ¶
func (r *PgBouncerReconciler) Run(ctx context.Context)
Run runs the reconciliation loop for this resource