Class OpenshiftUtils

java.lang.Object
io.quarkus.container.image.openshift.deployment.OpenshiftUtils

public class OpenshiftUtils extends Object
This class is copied from Dekorate, with the difference that the waitForImageStreamTags method take a client as the argument TODO: Update dekorate to take the client as an argument and then remove this class
  • Constructor Details

    • OpenshiftUtils

      public OpenshiftUtils()
  • Method Details

    • waitForImageStreamTags

      public static boolean waitForImageStreamTags(io.fabric8.openshift.client.OpenShiftClient client, Collection<io.fabric8.kubernetes.api.model.HasMetadata> items, long amount, TimeUnit timeUnit)
      Wait for the references ImageStreamTags to become available.
      Parameters:
      client - The openshift client used to check the status of the ImageStream
      items - A list of items, possibly referencing image stream tags.
      amount - The max amount of time to wait.
      timeUnit - The time unit of the time to wait.
      Returns:
      True if the items became available false otherwise.
    • mergeConfig

      public static ContainerImageOpenshiftConfig mergeConfig(ContainerImageOpenshiftConfig openshiftConfig, S2iConfig s2iConfig)
      Merges ContainerImageOpenshiftConfig with S2iConfig prioritizing in the former.
      Parameters:
      openshiftConfig - the Openshift config
      s2iConfig - the s2i config
      Returns:
      an instance of ContainerImageOpenshiftConfig with the merged configuration.
    • getNamespace

      public static Optional<String> getNamespace()
      Returns:
      the openshift namespace set in the OpenShift extension.
    • getDeployStrategy

      public static DeployStrategy getDeployStrategy()
      Returns:
      the openshift deploy strategy set in the OpenShift/Kubernetes extensions.