shared

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2019 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Finalizer used to trigger a deletion of the user prior to the object being deleted.
	Finalizer = "databases.mysql.skpr.io"
	// ControllerName used for identifying which controller is performing an operation.
	ControllerName = "mysql-database-shared"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, name string, conn Connection) error

Add creates a new Database Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type Connection

type Connection struct {
	Hostname string
	Port     int
	Username string
	Password string
}

Connection details users for provisioning databases, users and grants.

type ReconcileDatabase

type ReconcileDatabase struct {
	ProvisionerName string
	client.Client

	Connection Connection
	// contains filtered or unexported fields
}

ReconcileDatabase reconciles a Database object

func (*ReconcileDatabase) CreateDatabase

func (r *ReconcileDatabase) CreateDatabase(client *mysql.Client, database *mysqlv1beta1.Database, conn mysqlv1beta1.DatabaseStatusConnection) error

CreateDatabase for the reconcile loop.

func (*ReconcileDatabase) CreateGrant

CreateGrant for the reconcile loop.

func (*ReconcileDatabase) CreateUser

CreateUser for the reconcile loop.

func (*ReconcileDatabase) DeleteDatabase

func (r *ReconcileDatabase) DeleteDatabase(client *mysql.Client, database *mysqlv1beta1.Database, conn mysqlv1beta1.DatabaseStatusConnection) error

DeleteDatabase for the reconcile loop.

func (*ReconcileDatabase) DeleteGrant

DeleteGrant for the reconcile loop.

func (*ReconcileDatabase) DeleteUser

DeleteUser for the reconcile loop.

func (*ReconcileDatabase) Reconcile

func (r *ReconcileDatabase) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Database object and makes changes based on the state read and what is in the Database.Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=mysql.skpr.io,resources=databaseclaims,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=mysql.skpr.io,resources=databaseclaims/status,verbs=get;update;patch

func (*ReconcileDatabase) SyncStatus

func (r *ReconcileDatabase) SyncStatus(database *mysqlv1beta1.Database, status mysqlv1beta1.DatabaseStatus) error

SyncStatus for the Database object.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL