MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / GetApplicationDatabaseOwner

Method GetApplicationDatabaseOwner

api/v1/cluster_funcs.go:616–635  ·  view source on GitHub ↗

GetApplicationDatabaseOwner get the owner user of the application database for a specific bootstrap

()

Source from the content-addressed store, hash-verified

614
615// GetApplicationDatabaseOwner get the owner user of the application database for a specific bootstrap
616func (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

Callers 7

defaultTablespacesMethod · 0.95
RestoreMethod · 0.80
newCommandFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected