shared

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 24 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, params Params) 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
	// We use this CA for the .Status.CA field.
	CA string
}

Connection details users for provisioning databases, users and grants.

type Params added in v0.4.1

type Params struct {
	ProvisionerName string
	Connection      Connection
}

Params passed into the Reconciler.

type ReconcileDatabase

type ReconcileDatabase struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileDatabase reconciles a Database object

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) SyncDatabase added in v0.2.0

SyncDatabase for the reconcile loop.

func (*ReconcileDatabase) SyncGrant added in v0.2.0

SyncGrant for the reconcile loop.

func (*ReconcileDatabase) SyncStatus

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

SyncStatus for the Database object.

func (*ReconcileDatabase) SyncUser added in v0.2.0

SyncUser for the reconcile loop.

Jump to

Keyboard shortcuts

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