Documentation ¶
Index ¶
Constants ¶
const ( // SuccessSynced is used as part of the Event 'reason' when a Foo is synced SuccessSynced = "Synced" // ErrResourceExists is used as part of the Event 'reason' when a Foo fails // to sync due to a Deployment of the same name already existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a resource // fails to sync due to a Deployment already existing MessageResourceExists = "Resource %q already exists and is not managed by Foo" // MessageResourceSynced is the message used for an Event fired when a Foo // is synced successfully MessageResourceSynced = "Foo synced successfully" )
Variables ¶
This section is empty.
Functions ¶
func ProvideController ¶
func ProvideController(iargs args.InjectArgs) (*controller.GenericController, error)
ProvideController provides a controller that will be run at startup. Kubebuilder will use codegeneration to automatically register this controller in the inject package
Types ¶
type FooController ¶
type FooController struct { args.InjectArgs // contains filtered or unexported fields }
FooController is the controller implementation for Foo resources +controller:group=samplecontroller,version=v1alpha1,kind=Foo,resource=foos +informers:group=apps,version=v1,kind=Deployment +rbac:rbac:groups=apps,resources=Deployment,verbs=get;list;watch;create;update;patch;delete
func (FooController) LookupFoo ¶
func (bc FooController) LookupFoo(r types.ReconcileKey) (interface{}, error)
LookupFoo looksup a Foo from the lister
func (*FooController) Reconcile ¶
func (bc *FooController) Reconcile(k types.ReconcileKey) error
Reconcile compares the actual state with the desired, and attempts to converge the two. It then updates the Status block of the Foo resource with the current status of the resource.