psbinding

package
v0.0.0-...-c92f746 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdmissionController

func NewAdmissionController(
	ctx context.Context,
	name, path string,
	la GetListAll,
	WithContext BindableContext,
) *controller.Impl

NewAdmissionController constructs a reconciler

Types

type BaseReconciler

type BaseReconciler struct {
	// The GVR of the "primary key" resource
	GVR schema.GroupVersionResource

	Get func(namespace string, name string) (Bindable, error)

	// DynamicClient is used to patch subjects.
	DynamicClient dynamic.Interface

	// Factory is used for producing listers for the object references we encounter.
	Factory duck.InformerFactory

	// The tracker builds an index of what resources are watching other
	// resources so that we can immediately react to changes to changes in
	// tracked resources.
	Tracker tracker.Interface

	// Recorder is an event recorder for recording Event resources to the
	// Kubernetes API.
	Recorder record.EventRecorder
}

BaseReconciler helps implement controller.Reconciler for Binding resources.

func (*BaseReconciler) EnsureFinalizer

func (r *BaseReconciler) EnsureFinalizer(ctx context.Context, fb kmeta.Accessor) error

func (*BaseReconciler) IsFinalizing

func (r *BaseReconciler) IsFinalizing(ctx context.Context, fb kmeta.Accessor) bool

func (*BaseReconciler) Reconcile

func (r *BaseReconciler) Reconcile(ctx context.Context, key string) error

Reconcile implements controller.Reconciler

func (*BaseReconciler) ReconcileDeletion

func (r *BaseReconciler) ReconcileDeletion(ctx context.Context, fb Bindable) error

func (*BaseReconciler) ReconcileSubject

func (r *BaseReconciler) ReconcileSubject(ctx context.Context, fb Bindable, mutation func(context.Context, *duckv1.WithPod)) error

func (*BaseReconciler) RemoveFinalizer

func (r *BaseReconciler) RemoveFinalizer(ctx context.Context, fb kmeta.Accessor) error

func (*BaseReconciler) UpdateStatus

func (r *BaseReconciler) UpdateStatus(ctx context.Context, desired Bindable) error

Update the Status of the resource. Caller is responsible for checking for semantic differences before calling.

type Bindable

type Bindable interface {
	duck.OneOfOurs

	GetSubject() tracker.Reference
	GetBindingStatus() BindableStatus

	Do(context.Context, *duckv1.WithPod)
	Undo(context.Context, *duckv1.WithPod)
}

Bindable is implemented by Bindings whose subjects as duckv1.WithPod.

type BindableContext

type BindableContext func(context.Context, Bindable) context.Context

type BindableStatus

type BindableStatus interface {
	InitializeConditions()
	MarkBindingAvailable()
	MarkBindingUnavailable(reason string, message string)
	SetObservedGeneration(int64)
}

type ListAll

type ListAll func() ([]Bindable, error)

Jump to

Keyboard shortcuts

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