Annotation Interface Operator
@Retention(RUNTIME)
@Target({TYPE,ANNOTATION_TYPE})
@Bean
@DefaultScope(io.micronaut.context.annotation.Context.class)
public @interface Operator
Operator annotation simplifies initialisation of the controllers.
- Author:
- Pavol Gressa
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe name of the operator.Class<? extends Predicate<? extends KubernetesObject>>
The class of the filter applied by informer's resource handler when a new resource is created.Class<? extends BiPredicate<? extends KubernetesObject,
Boolean>> The class of the filter applied by informer's resource handler when an existing resource is deleted.Class<? extends BiPredicate<? extends KubernetesObject,
? extends KubernetesObject>> The class of the filter applied by informer's resource handler when an existing resource is updated.
-
Element Details
-
informer
Informer informerThe informer which is used to watch and report resource changes.- Returns:
- the informer instance
-
-
-
name
String nameThe name of the operator. It is used to uniquely identify the created controller. If not provided the controller name is generated.- Returns:
- operator name
- Default:
- ""
-
onAddFilter
Class<? extends Predicate<? extends KubernetesObject>> onAddFilterThe class of the filter applied by informer's resource handler when a new resource is created.- Returns:
- filter class
- Default:
- io.micronaut.kubernetes.client.openapi.operator.OperatorFilter.OnAdd.class
-
onUpdateFilter
Class<? extends BiPredicate<? extends KubernetesObject,? extends KubernetesObject>> onUpdateFilterThe class of the filter applied by informer's resource handler when an existing resource is updated.- Returns:
- filter class
- Default:
- io.micronaut.kubernetes.client.openapi.operator.OperatorFilter.OnUpdate.class
-
onDeleteFilter
Class<? extends BiPredicate<? extends KubernetesObject,Boolean>> onDeleteFilterThe class of the filter applied by informer's resource handler when an existing resource is deleted.- Returns:
- filter class
- Default:
- io.micronaut.kubernetes.client.openapi.operator.OperatorFilter.OnDelete.class
-