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 thewaitForImageStreamTagsmethod take a client as the argument TODO: Update dekorate to take the client as an argument and then remove this class
-
-
Constructor Summary
Constructors Constructor Description OpenshiftUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DeployStrategygetDeployStrategy()static Optional<String>getNamespace()static ContainerImageOpenshiftConfigmergeConfig(ContainerImageOpenshiftConfig openshiftConfig, S2iConfig s2iConfig)MergesContainerImageOpenshiftConfigwithS2iConfigprioritizing in the former.static booleanwaitForImageStreamTags(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.
-
-
-
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 ImageStreamitems- 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)
MergesContainerImageOpenshiftConfigwithS2iConfigprioritizing in the former.- Parameters:
openshiftConfig- the Openshift configs2iConfig- the s2i config- Returns:
- an instance of
ContainerImageOpenshiftConfigwith 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.
-
-