controllers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoLevel  = logging.InfoLevel
	DebugLevel = logging.ZapDebugLevel
	TraceLevel = logging.ZapTraceLevel

	DatabaseControllerName = "database-controller"
	DatabaseClass          = "databaseclass"
	EndpointName           = "endpoint-name"
	SecretName             = "secret-name"
)

Variables

This section is empty.

Functions

func FormatSecretName

func FormatSecretName(obj *databasev1.Database) string

FormatSecretName returns the name of a Database's Secret resource as it should appear in metadata.name.

Types

type DatabaseReconciler

type DatabaseReconciler struct {
	client.Client
	Log           logr.Logger
	Scheme        *runtime.Scheme
	EventRecorder record.EventRecorder
	DbmsList      database.DbmsList
	Pool          pool.Pool
}

DatabaseReconciler reconciles a Database object

func (*DatabaseReconciler) Reconcile

func (r *DatabaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*DatabaseReconciler) SetupWithManager

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

+kubebuilder:rbac:groups=database.dbaas.bedag.ch,resources=databases,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=database.dbaas.bedag.ch,resources=databases/status,verbs=get;update;patch +kubebuilder:rbac:groups=database.dbaas.bedag.ch,resources=databases/finalizers,verbs=update +kubebuilder:rbac:groups=databaseclass.dbaas.bedag.ch,resources=databaseclasses,verbs=get;list;watch +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;delete SetupWithManager creates the controller responsible for Database resources by means of a ctrl.Manager.

type ReconcileError

type ReconcileError struct {
	Reason         string
	Message        string
	Err            error
	AdditionalInfo []interface{}
}

func (ReconcileError) IsNotEmpty

func (r ReconcileError) IsNotEmpty() bool

IsNotEmpty checks if r is not empty using reflect.DeepEqual. Needed because field AdditionalInfo is not comparable.

func (ReconcileError) With

func (r ReconcileError) With(values []interface{}) ReconcileError

With creates a copy of the receiver and appends values to its AdditionalInfo field.

Jump to

Keyboard shortcuts

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