Package io.skodjob.testframe.resources
Class ResourceCondition<T extends io.fabric8.kubernetes.api.model.HasMetadata>
java.lang.Object
io.skodjob.testframe.resources.ResourceCondition<T>
- Type Parameters:
T- Type of Kubernetes resource.
public class ResourceCondition<T extends io.fabric8.kubernetes.api.model.HasMetadata>
extends Object
Represents a condition that can be applied to Kubernetes resources.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceCondition(Predicate<T> predicate, String conditionName) Constructs a ResourceCondition with the given predicate and condition name. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends io.fabric8.kubernetes.api.model.HasMetadata>
ResourceCondition<T>deletion()Creates a ResourceCondition representing deletion of a resource.Gets the name of the condition.Gets the predicate representing the condition.static <T extends io.fabric8.kubernetes.api.model.HasMetadata>
ResourceCondition<T>readiness(ResourceType<T> type) Creates a ResourceCondition representing readiness of a resource of the given type.
-
Constructor Details
-
ResourceCondition
Constructs a ResourceCondition with the given predicate and condition name.- Parameters:
predicate- The predicate representing the condition.conditionName- The name of the condition.
-
-
Method Details
-
getConditionName
Gets the name of the condition.- Returns:
- The name of the condition.
-
getPredicate
Gets the predicate representing the condition.- Returns:
- The predicate representing the condition.
-
readiness
public static <T extends io.fabric8.kubernetes.api.model.HasMetadata> ResourceCondition<T> readiness(ResourceType<T> type) Creates a ResourceCondition representing readiness of a resource of the given type.- Type Parameters:
T- Type of Kubernetes resource.- Parameters:
type- The resource type.- Returns:
- The ResourceCondition representing readiness.
-
deletion
public static <T extends io.fabric8.kubernetes.api.model.HasMetadata> ResourceCondition<T> deletion()Creates a ResourceCondition representing deletion of a resource.- Type Parameters:
T- Type of Kubernetes resource.- Returns:
- The ResourceCondition representing deletion.
-