controllers

package
v0.0.0-...-1f03512 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNewSecret = errors.New("creating new secret")
View Source
var ErrSecretImmutable = errors.New("secret is immutable")

Functions

This section is empty.

Types

type DatabaseAccountReconciler

type DatabaseAccountReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	Recorder      Recorder
	AccountServer *accountsvr.Server
	Config        *v1.DatabaseAccountControllerConfig
}

DatabaseAccountReconciler reconciles a DatabaseAccount object.

func (*DatabaseAccountReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DatabaseAccount object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile

func (*DatabaseAccountReconciler) SetupWithManager

func (r *DatabaseAccountReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type Recorder

type Recorder interface {
	NormalEvent(*v1.DatabaseAccount, RecorderReason, string)
	WarningEvent(*v1.DatabaseAccount, RecorderReason, string)
}

func NewRecorder

func NewRecorder(r record.EventRecorder) Recorder

type RecorderEventType

type RecorderEventType string
const (
	RecorderNormal  RecorderEventType = "Normal"
	RecorderWarning RecorderEventType = "Warning"
)

func (RecorderEventType) String

func (r RecorderEventType) String() string

type RecorderReason

type RecorderReason string
const (
	ReasonQueued         RecorderReason = "Queued"
	ReasonUserCreate     RecorderReason = "UserCreate"
	ReasonDatabaseCreate RecorderReason = "DatabaseCreate"
	ReasonReady          RecorderReason = "Ready"
)

func (RecorderReason) String

func (r RecorderReason) String() string

type RecorderWrapper

type RecorderWrapper struct {
	// contains filtered or unexported fields
}

func (*RecorderWrapper) Event

func (r *RecorderWrapper) Event(
	dbAccount *v1.DatabaseAccount,
	eventType RecorderEventType,
	reason RecorderReason,
	message string,
)

func (*RecorderWrapper) NormalEvent

func (r *RecorderWrapper) NormalEvent(dbAccount *v1.DatabaseAccount, reason RecorderReason, message string)

func (*RecorderWrapper) WarningEvent

func (r *RecorderWrapper) WarningEvent(dbAccount *v1.DatabaseAccount, reason RecorderReason, message string)

Jump to

Keyboard shortcuts

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