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 Details

    • ResourceCondition

      public ResourceCondition(Predicate<T> predicate, String conditionName)
      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

      public String getConditionName()
      Gets the name of the condition.
      Returns:
      The name of the condition.
    • getPredicate

      public Predicate<T> 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.