GetApplicationDatabaseOwner get the owner user of the application database for a specific bootstrap
()
| 614 | |
| 615 | // GetApplicationDatabaseOwner get the owner user of the application database for a specific bootstrap |
| 616 | func (cluster *Cluster) GetApplicationDatabaseOwner() string { |
| 617 | bootstrap := cluster.Spec.Bootstrap |
| 618 | if bootstrap == nil { |
| 619 | return "" |
| 620 | } |
| 621 | |
| 622 | if bootstrap.Recovery != nil && bootstrap.Recovery.Owner != "" { |
| 623 | return bootstrap.Recovery.Owner |
| 624 | } |
| 625 | |
| 626 | if bootstrap.PgBaseBackup != nil && bootstrap.PgBaseBackup.Owner != "" { |
| 627 | return bootstrap.PgBaseBackup.Owner |
| 628 | } |
| 629 | |
| 630 | if bootstrap.InitDB != nil && bootstrap.InitDB.Owner != "" { |
| 631 | return bootstrap.InitDB.Owner |
| 632 | } |
| 633 | |
| 634 | return "" |
| 635 | } |
| 636 | |
| 637 | // GetServerCASecretName get the name of the secret containing the CA |
| 638 | // of the cluster |
no outgoing calls
no test coverage detected