Class 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 Detail

      • OpenshiftUtils

        public OpenshiftUtils()
    • Method Detail

      • 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.
      • 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.