Documentation
¶
Index ¶
- Constants
- type Database
- func (d *Database) CreateOrPatchDB(ctx context.Context, h *helper.Helper) (ctrl.Result, error)
- func (d *Database) CreateOrPatchDBByName(ctx context.Context, h *helper.Helper, name string) (ctrl.Result, error)
- func (in *Database) DeepCopy() *Database
- func (in *Database) DeepCopyInto(out *Database)
- func (d *Database) DeleteFinalizer(ctx context.Context, h *helper.Helper) error
- func (d *Database) GetDatabase() *mariadbv1.MariaDBDatabase
- func (d *Database) GetDatabaseHostname() string
- func (d *Database) WaitForDBCreated(ctx context.Context, h *helper.Helper) (ctrl.Result, error)
- func (d *Database) WaitForDBCreatedWithTimeout(ctx context.Context, h *helper.Helper, requeueAfter time.Duration) (ctrl.Result, error)
Constants ¶
const ( // ReasonDBError - DB error ReasonDBError condition.Reason = "DatabaseError" // ReasonDBPatchError - new resource set to reason Init ReasonDBPatchError condition.Reason = "DatabasePatchError" // ReasonDBPathOK - DB object created or patched ok ReasonDBPatchOK condition.Reason = "DatabasePatchOK" // ReasonDBNotFound - DB object not found ReasonDBNotFound condition.Reason = "DatabaseNotFound" // ReasonDBWaitingInitialized - waiting for service DB to be initialized ReasonDBWaitingInitialized condition.Reason = "DatabaseWaitingInitialized" // ReasonDBServiceNameError - error getting the DB service hostname ReasonDBServiceNameError condition.Reason = "DatabaseServiceNameError" // ReasonDBSync - Database sync in progress ReasonDBSync condition.Reason = "DBSync" )
Conditions for status in web console
const ( // DatabaseUserPasswordKey - key in secret which holds the service user DB password DatabaseUserPasswordKey = "DatabasePassword" // DatabaseAdminPasswordKey - key in secret which holds the admin user password DatabaseAdminPasswordKey = "AdminPassword" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database -
func GetDatabaseByName ¶
GetDatabaseByName returns a *Database object with specified name and namespace
func NewDatabase ¶
func NewDatabase( databaseName string, databaseUser string, secret string, labels map[string]string, ) *Database
NewDatabase returns an initialized DB.
func NewDatabaseWithNamespace ¶
func NewDatabaseWithNamespace( databaseName string, databaseUser string, secret string, labels map[string]string, name string, namespace string, ) *Database
NewDatabaseWithNamespace returns an initialized DB.
func (*Database) CreateOrPatchDB ¶
CreateOrPatchDB - create or patch the service DB instance Deprecated. Use CreateOrPatchDBByName instead. If you want to use the default the DB service instance of the deployment then pass "openstack" as the name.
func (*Database) CreateOrPatchDBByName ¶
func (d *Database) CreateOrPatchDBByName( ctx context.Context, h *helper.Helper, name string, ) (ctrl.Result, error)
CreateOrPatchDBByName - create or patch the service DB instance on the DB service. The DB service is selected by the name of the MariaDB CR providing the service.
func (*Database) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Database.
func (*Database) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Database) DeleteFinalizer ¶
DeleteFinalizer deletes a finalizer by its object
func (*Database) GetDatabase ¶
func (d *Database) GetDatabase() *mariadbv1.MariaDBDatabase
GetDatabase - returns the DB
func (*Database) GetDatabaseHostname ¶
GetDatabaseHostname - returns the DB hostname which host the DB
func (*Database) WaitForDBCreated ¶
WaitForDBCreated - wait until the MariaDBDatabase is initialized and reports Status.Completed == true Deprecated, use WaitForDBCreatedWithTimeout instead