Class NamespaceResource

java.lang.Object
io.skodjob.testframe.resources.NamespaceResource
All Implemented Interfaces:
ResourceType<io.fabric8.kubernetes.api.model.Namespace>

public class NamespaceResource extends Object implements ResourceType<io.fabric8.kubernetes.api.model.Namespace>
Implementation of ResourceType for specific kubernetes resource
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    create(io.fabric8.kubernetes.api.model.Namespace resource)
    Creates specific Namespace resource
    void
    create(String namespaceName)
    Creates namespace object and create
    void
    delete(String resourceName)
    Deletes Namespace resource from Namespace in current context
    io.fabric8.kubernetes.client.dsl.NonNamespaceOperation<?,?,?>
    Get specific client for resoruce
    Kind of api resource
    void
    replace(String resourceName, Consumer<io.fabric8.kubernetes.api.model.Namespace> editor)
    Replaces Namespace resource using Consumer from which is the current Namespace resource updated
    void
    update(io.fabric8.kubernetes.api.model.Namespace resource)
    Updates specific Namespace resource
    boolean
    waitForDeletion(io.fabric8.kubernetes.api.model.Namespace resource)
    Waits for Namespace to be deleted
    boolean
    waitForReadiness(io.fabric8.kubernetes.api.model.Namespace resource)
    Waits for Namespace to be ready (created/running)

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NamespaceResource

      public NamespaceResource()
      Constructor
  • Method Details

    • getKind

      public String getKind()
      Kind of api resource
      Specified by:
      getKind in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Returns:
      kind name
    • getClient

      public io.fabric8.kubernetes.client.dsl.NonNamespaceOperation<?,?,?> getClient()
      Get specific client for resoruce
      Specified by:
      getClient in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Returns:
      specific client
    • create

      public void create(String namespaceName)
      Creates namespace object and create
      Parameters:
      namespaceName - name of the namespace
    • create

      public void create(io.fabric8.kubernetes.api.model.Namespace resource)
      Creates specific Namespace resource
      Specified by:
      create in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Parameters:
      resource - Namespace resource
    • update

      public void update(io.fabric8.kubernetes.api.model.Namespace resource)
      Updates specific Namespace resource
      Specified by:
      update in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Parameters:
      resource - Namespace resource that will be updated
    • delete

      public void delete(String resourceName)
      Deletes Namespace resource from Namespace in current context
      Specified by:
      delete in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Parameters:
      resourceName - name of the Namespace that will be deleted
    • replace

      public void replace(String resourceName, Consumer<io.fabric8.kubernetes.api.model.Namespace> editor)
      Replaces Namespace resource using Consumer from which is the current Namespace resource updated
      Specified by:
      replace in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Parameters:
      resourceName - name of the Namespace that will be replaced
      editor - Consumer containing updates to the resource
    • waitForReadiness

      public boolean waitForReadiness(io.fabric8.kubernetes.api.model.Namespace resource)
      Waits for Namespace to be ready (created/running)
      Specified by:
      waitForReadiness in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Parameters:
      resource - resource
      Returns:
      result of the readiness check
    • waitForDeletion

      public boolean waitForDeletion(io.fabric8.kubernetes.api.model.Namespace resource)
      Waits for Namespace to be deleted
      Specified by:
      waitForDeletion in interface ResourceType<io.fabric8.kubernetes.api.model.Namespace>
      Parameters:
      resource - resource
      Returns:
      result of the deletion