Documentation ¶
Index ¶
Constants ¶
const ( // PrimaryRegister registers primary node into the cluster PrimaryRegister = "primary register" // StandbyRegister registers standby node into the cluster StandbyRegister = "standby register" // NodeRejoin rejoins the node, which was previously deleted NodeRejoin = "node rejoin" )
Variables ¶
This section is empty.
Functions ¶
func UpdateClusterStatus ¶
func UpdateClusterStatus(request *PostgreSQLRequest, clusterStatus *postgresqlv1.PostgreSQLStatus) error
UpdateClusterStatus compares current and new status and perfroms the update if needed.
Types ¶
type Node ¶
type Node interface {
// contains filtered or unexported methods
}
Node interface represents a single PostgreSQL node in the cluster
type PostgreSQLRequest ¶
type PostgreSQLRequest struct {
// contains filtered or unexported fields
}
PostgreSQLRequest encapsulates variables needed for request handling
func NewPostgreSQLRequest ¶
func NewPostgreSQLRequest(client client.Client, cluster *postgresqlv1.PostgreSQL, scheme *runtime.Scheme) *PostgreSQLRequest
NewPostgreSQLRequest constructs a PostgreSQLRequest
func (*PostgreSQLRequest) CreateOrUpdateCluster ¶
func (request *PostgreSQLRequest) CreateOrUpdateCluster() (bool, error)
CreateOrUpdateCluster iterates over all nodes in the current spec and ensures cluster reflect desired state
func (*PostgreSQLRequest) CreateOrUpdateSecret ¶
func (request *PostgreSQLRequest) CreateOrUpdateSecret() error
CreateOrUpdateSecret creates a new Secret if doesn't exists and ensures all its attributes has desired values
func (*PostgreSQLRequest) CreateOrUpdateService ¶
func (request *PostgreSQLRequest) CreateOrUpdateService(name string, selectorName string) error
CreateOrUpdateService creates a new Service if doesn't exists and ensures all its attributes has desired values
func (*PostgreSQLRequest) Reconcile ¶
func (request *PostgreSQLRequest) Reconcile() (bool, error)
Reconcile creates or updates all the resources managed by the operator