mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 07:35:10 +02:00
add creating method for PostgresStatus
This commit is contained in:
@@ -96,6 +96,11 @@ func (postgresStatus PostgresStatus) Running() bool {
|
|||||||
return postgresStatus.PostgresClusterStatus == ClusterStatusRunning
|
return postgresStatus.PostgresClusterStatus == ClusterStatusRunning
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Creating status of cluster
|
||||||
|
func (postgresStatus PostgresStatus) Creating() bool {
|
||||||
|
return postgresStatus.PostgresClusterStatus == ClusterStatusCreating
|
||||||
|
}
|
||||||
|
|
||||||
func (postgresStatus PostgresStatus) String() string {
|
func (postgresStatus PostgresStatus) String() string {
|
||||||
return fmt.Sprintf(`status=%s`, postgresStatus.PostgresClusterStatus)
|
return fmt.Sprintf(`status=%s`, postgresStatus.PostgresClusterStatus)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ func (c *Cluster) setStatus(status string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cluster) isNewCluster() bool {
|
func (c *Cluster) isNewCluster() bool {
|
||||||
return c.Status.PostgresClusterStatus == acidv1.ClusterStatusCreating
|
return c.Status.Creating()
|
||||||
}
|
}
|
||||||
|
|
||||||
// initUsers populates c.systemUsers and c.pgUsers maps.
|
// initUsers populates c.systemUsers and c.pgUsers maps.
|
||||||
|
|||||||
Reference in New Issue
Block a user