controllers

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateWatchEventHandler

func NewCreateWatchEventHandler(controller *sbrController) handler.EventHandler

NewCreateWatchEventHandler creates a new instance of handler.EventHandler interface with CSVToWatcherMapper as map-func.

func NewRetriever

func NewRetriever(
	client dynamic.Interface,
) *retriever

NewRetriever instantiate a new retriever instance.

func RegisterFlags

func RegisterFlags(flags *flag.FlagSet)

Types

type K8STypeLookup

type K8STypeLookup interface {
	ResourceForReferable(obj Referable) (*schema.GroupVersionResource, error)
	KindForReferable(obj Referable) (*schema.GroupVersionKind, error)
	ResourceForKind(gvk schema.GroupVersionKind) (*schema.GroupVersionResource, error)
	KindForResource(gvr schema.GroupVersionResource) (*schema.GroupVersionKind, error)
}

type Referable

type Referable interface {
	GroupVersionResource() (*schema.GroupVersionResource, error)
	GroupVersionKind() (*schema.GroupVersionKind, error)
}

type ResourceWatcher

type ResourceWatcher interface {
	AddWatchForGVR(schema.GroupVersionResource) error
	AddWatchForGVK(schema.GroupVersionKind) error
}

ResourceWatcher add watching for GroupVersionKind/GroupVersionResource

type ServiceBindingReconciler

type ServiceBindingReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

ServiceBindingReconciler reconciles a ServiceBinding object

func (*ServiceBindingReconciler) KindForReferable

func (r *ServiceBindingReconciler) KindForReferable(obj Referable) (*schema.GroupVersionKind, error)

func (*ServiceBindingReconciler) KindForResource

func (*ServiceBindingReconciler) Reconcile

func (r *ServiceBindingReconciler) Reconcile(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. TODO(user): Modify the Reconcile function to compare the state specified by the ServiceBinding 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.7.0/pkg/reconcile

func (*ServiceBindingReconciler) ResourceForKind

func (*ServiceBindingReconciler) ResourceForReferable

func (r *ServiceBindingReconciler) ResourceForReferable(obj Referable) (*schema.GroupVersionResource, error)

func (*ServiceBindingReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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