Interface OpenShiftHandle
public interface OpenShiftHandle
- Author:
- Ales Justin
-
Method Summary
Modifier and TypeMethodDescriptionvoidDelete pod by name.Get the logs for a given pod.Get the logs for a given pod.getPods()Get all pods.Get all pods.getReadyPods(String prefix) Get ready pods.<T> TInput is on purpose plain Object.voidreplacePods(String prefix, int size, int replicas) Replace #size of pods via delete.voidscaleDeployment(String prefix, int replicas) Scale deployment to replicas.Stream pod log into output stream.voidtriggerDeploymentConfigUpdate(String prefix, boolean wait) Trigger deployment config update.voidtriggerDeploymentConfigUpdate(String prefix, boolean wait, Map<String, String> variables) Trigger deployment config updatevoidwaitForReadyPods(String prefix, int replicas) Wait for ready pods.
-
Method Details
-
url
-
execute
- Throws:
Exception
-
execute
- Throws:
Exception
-
execute
- Throws:
Exception
-
exec
- Throws:
Exception
-
waitForReadyPods
Wait for ready pods.- Parameters:
prefix- the RC prefixreplicas- the expected size od ready pods- Throws:
Exception- for any error
-
replacePods
Replace #size of pods via delete.- Parameters:
prefix- the RC prefixsize- the number of pods to replacereplicas- the number of exepcted replicas after replace- Throws:
Exception- for any error
-
scaleDeployment
Scale deployment to replicas.- Parameters:
prefix- the RC prefixreplicas- replicas- Throws:
Exception- for any error
-
getLog
Get the logs for a given pod.- Parameters:
podName- the pod name- Returns:
- The pod's log
- Throws:
Exception- if a pod couldn't be found or if there's an error retrieving the log
-
streamLog
Stream pod log into output stream.- Parameters:
podName- the pod name- Returns:
- log as a stream
- Throws:
Exception- for any error
-
getLog
Get the logs for a given pod. Combines both arguments to find a matching pod.- Parameters:
prefix- Pod's name prefix, may be nulllabels- The labels for selecting the pod, may be null- Returns:
- The pod's log
- Throws:
Exception- if a pod couldn't be found or if there's an error retrieving the log
-
getReadyPods
Get ready pods.- Parameters:
prefix- the prefix- Returns:
- ready pods
- Throws:
Exception- for any error
-
getPods
Get all pods.- Returns:
- all pods
- Throws:
Exception- for any error
-
getPods
Get all pods.- Parameters:
prefix- RC name, if null all pods are returned- Returns:
- all pods
- Throws:
Exception- for any error
-
deletePod
Delete pod by name.- Parameters:
podName- pod namegracePeriodSeconds- grace period, -1 if none / default- Throws:
Exception- for any error
-
triggerDeploymentConfigUpdate
Trigger deployment config update. A dummy variable is inserted into deployment config in order to trigger the redeployment.- Parameters:
prefix- the deployment config prefixwait- wait until update is done- Throws:
Exception- for any error
-
triggerDeploymentConfigUpdate
void triggerDeploymentConfigUpdate(String prefix, boolean wait, Map<String, String> variables) throws ExceptionTrigger deployment config update- Parameters:
prefix- the deployment config prefixwait- wait until update is donevariables- Environment variables to insert into the deployment. If null or empty, a dummy variable is inserted in order to trigger the redeployment.- Throws:
Exception- for any error
-
jolokia
Input is on purpose plain Object.- Throws:
Exception
-