Class ControllerConfigurationImpl.ControllerConfigurationBuilder
java.lang.Object
io.micronaut.kubernetes.client.operator.ControllerConfigurationImpl.ControllerConfigurationBuilder
- Enclosing class:
- ControllerConfigurationImpl
Operator configuration builder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theControllerConfiguration
.withApiGroup
(String apiGroup) Set the api group.withApiListType
(Class<? extends io.kubernetes.client.common.KubernetesListObject> apiListType) Set the api list ype.withApiType
(Class<? extends io.kubernetes.client.common.KubernetesObject> apiType) Set the api type.withLabelSelector
(String labelSelector) Set the label selector.Set the operator name.withNamespaces
(Set<String> namespaces) Set the namespaces.withOnAddFilter
(Predicate<? extends io.kubernetes.client.common.KubernetesObject> onAddFilter) Set the filter for added resources.withOnDeleteFilter
(BiPredicate<? extends io.kubernetes.client.common.KubernetesObject, Boolean> onDeleteFilter) Set the filter for deleted resources.withOnUpdateFilter
(BiPredicate<? extends io.kubernetes.client.common.KubernetesObject, ? extends io.kubernetes.client.common.KubernetesObject> onUpdateFilter) Set the filter for updated resources.withResourcePlural
(String resourcePlural) Set the resource plural.withResyncCheckPeriod
(Long resyncCheckPeriod) Set the resync check period.
-
Constructor Details
-
ControllerConfigurationBuilder
public ControllerConfigurationBuilder()
-
-
Method Details
-
withName
Set the operator name.- Parameters:
name
- name- Returns:
- builder
-
withApiType
public ControllerConfigurationImpl.ControllerConfigurationBuilder withApiType(Class<? extends io.kubernetes.client.common.KubernetesObject> apiType) Set the api type.- Parameters:
apiType
- api type- Returns:
- builder
-
withApiListType
public ControllerConfigurationImpl.ControllerConfigurationBuilder withApiListType(Class<? extends io.kubernetes.client.common.KubernetesListObject> apiListType) Set the api list ype.- Parameters:
apiListType
- api list type- Returns:
- builder
-
withResourcePlural
public ControllerConfigurationImpl.ControllerConfigurationBuilder withResourcePlural(String resourcePlural) Set the resource plural.- Parameters:
resourcePlural
- resource plural- Returns:
- builder
-
withApiGroup
Set the api group.- Parameters:
apiGroup
- api group- Returns:
- builder
-
withNamespaces
public ControllerConfigurationImpl.ControllerConfigurationBuilder withNamespaces(Set<String> namespaces) Set the namespaces.- Parameters:
namespaces
- namespaces- Returns:
- builder
-
withLabelSelector
public ControllerConfigurationImpl.ControllerConfigurationBuilder withLabelSelector(String labelSelector) Set the label selector.- Parameters:
labelSelector
- label selector- Returns:
- builder
-
withOnAddFilter
public ControllerConfigurationImpl.ControllerConfigurationBuilder withOnAddFilter(Predicate<? extends io.kubernetes.client.common.KubernetesObject> onAddFilter) Set the filter for added resources.- Parameters:
onAddFilter
- on add predicate- Returns:
- builder
-
withOnUpdateFilter
public ControllerConfigurationImpl.ControllerConfigurationBuilder withOnUpdateFilter(BiPredicate<? extends io.kubernetes.client.common.KubernetesObject, ? extends io.kubernetes.client.common.KubernetesObject> onUpdateFilter) Set the filter for updated resources.- Parameters:
onUpdateFilter
- on update predicate- Returns:
- builder
-
withOnDeleteFilter
public ControllerConfigurationImpl.ControllerConfigurationBuilder withOnDeleteFilter(BiPredicate<? extends io.kubernetes.client.common.KubernetesObject, Boolean> onDeleteFilter) Set the filter for deleted resources.- Parameters:
onDeleteFilter
- on delete predicate- Returns:
- builder
-
withResyncCheckPeriod
public ControllerConfigurationImpl.ControllerConfigurationBuilder withResyncCheckPeriod(Long resyncCheckPeriod) Set the resync check period.- Parameters:
resyncCheckPeriod
- resynch check period- Returns:
- builder
-
build
Builds theControllerConfiguration
.- Returns:
- the configuration
-