Class OperatorResourceLister<ApiType extends io.kubernetes.client.common.KubernetesObject>
java.lang.Object
io.micronaut.kubernetes.client.operator.OperatorResourceLister<ApiType>
- Type Parameters:
ApiType
- the api type of the listed resources
public class OperatorResourceLister<ApiType extends io.kubernetes.client.common.KubernetesObject>
extends Object
Operator lister simplifies retrieval of the resources from within the
SharedIndexInformer
's
Cache
.- Since:
- 3.3
- Author:
- Pavol Gressa
-
Constructor Summary
ConstructorDescriptionOperatorResourceLister
(@NonNull ControllerConfiguration controllerConfiguration, @NonNull SharedIndexInformerFactory sharedIndexInformerFactory) -
Method Summary
-
Constructor Details
-
Method Details
-
get
@NonNull public @NonNull Optional<ApiType> get(@NonNull @NonNull io.kubernetes.client.extended.controller.reconciler.Request request) Get the kubernetes resource from theSharedIndexInformer
'sCache
for the givenRequest
. The operation returnsOptional
for cases when the resource is not present in the cache.- Parameters:
request
- the reconciliation request- Returns:
- optional resource in local cache
-