Documentation
¶
Index ¶
- Constants
- func SetOwnerAnnotation(u *unstructured.Unstructured, owner *unstructured.Unstructured)
- type EnqueueRequestForAnnotation
- func (e *EnqueueRequestForAnnotation) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAnnotation) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAnnotation) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAnnotation) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Constants ¶
const ( // NamespacedNameAnnotation - annotation that will be used to get the primary resource namespaced name. NamespacedNameAnnotation = "operator-sdk/primary-resource" // TypeAnnotation - annotation that will be used to verify that the primary resource is the primary resource to use. TypeAnnotation = "operator-sdk/primary-resource-type" )
Variables ¶
This section is empty.
Functions ¶
func SetOwnerAnnotation ¶ added in v0.18.0
func SetOwnerAnnotation(u *unstructured.Unstructured, owner *unstructured.Unstructured)
SetOwnerAnnotation sets annotations for dependent resources that needs to be watched by namespaced Owners.
Types ¶
type EnqueueRequestForAnnotation ¶
type EnqueueRequestForAnnotation struct {
Type string
}
EnqueueRequestForAnnotation enqueues Requests based on the presence of an annotation that contains the namespaced name of the primary resource.
The primary usecase for this, is to have a controller enqueue requests for the following scenarios 1. namespaced primary object and dependent cluster scoped resource 2. cluster scoped primary object. 3. namespaced primary object and dependent namespaced scoped but in a different namespace object.
func (*EnqueueRequestForAnnotation) Create ¶
func (e *EnqueueRequestForAnnotation) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create implements EventHandler
func (*EnqueueRequestForAnnotation) Delete ¶
func (e *EnqueueRequestForAnnotation) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete implements EventHandler
func (*EnqueueRequestForAnnotation) Generic ¶
func (e *EnqueueRequestForAnnotation) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic implements EventHandler
func (*EnqueueRequestForAnnotation) Update ¶
func (e *EnqueueRequestForAnnotation) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update implements EventHandler