io.fabric8.kubernetes.api.model.ContainerStateRunning Java Examples

The following examples show how to use io.fabric8.kubernetes.api.model.ContainerStateRunning. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TeiidOpenShiftClient.java    From syndesis with Apache License 2.0 5 votes vote down vote up
public String getPodStartedAt(String namespace, String openShiftName) {
    List<Pod> pods = openshiftClient().pods().inNamespace(namespace).withLabel("application", openShiftName).list().getItems();
    if (!pods.isEmpty()) {
        ContainerStateRunning running = pods.get(0).getStatus().getContainerStatuses().get(0).getState().getRunning();
        if (running != null) {
            return running.getStartedAt();
        }
    }
    return null;
}
 
Example #2
Source File: KubernetesPodEventTranslatorTest.java    From styx with Apache License 2.0 4 votes vote down vote up
private static ContainerState runningContainerState() {
  return new ContainerState(new ContainerStateRunning("2016-05-30T09:46:48Z"), null, null);
}