Class OpenshiftUtils
java.lang.Object
io.quarkus.container.image.openshift.deployment.OpenshiftUtils
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DeployStrategymergeConfig(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.
-
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 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
- Returns:
- the openshift namespace set in the OpenShift extension.
-
getDeployStrategy
- Returns:
- the openshift deploy strategy set in the OpenShift/Kubernetes extensions.
-