本文整理汇总了Java中io.fabric8.kubernetes.client.internal.readiness.Readiness类的典型用法代码示例。如果您正苦于以下问题:Java Readiness类的具体用法?Java Readiness怎么用?Java Readiness使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Readiness类属于io.fabric8.kubernetes.client.internal.readiness包,在下文中一共展示了Readiness类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDeploymentConfigReport
import io.fabric8.kubernetes.client.internal.readiness.Readiness; //导入依赖的package包/类
/**
* Returns a simple report of the deployments.
* @return A string containing the text of the report.
*/
private String getDeploymentConfigReport() {
StringBuilder sb = new StringBuilder();
List<DeploymentConfig> all = openshiftClient.deploymentConfigs().list().getItems();
List<DeploymentConfig> pending = all.stream()
.filter(d -> !Readiness.isDeploymentConfigReady(d))
.collect(Collectors.toList());
try {
sb.append(createDeploymentReport(all.size(), all.size() - pending.size()));
sb.append(createPendingReportForDeploymentConfig(pending));
} catch (Throwable t) {
//ignore
}
return sb.toString();
}
示例2: getDeploymentReport
import io.fabric8.kubernetes.client.internal.readiness.Readiness; //导入依赖的package包/类
/**
* Returns a simple report of the deployments.
* @return A string containing the text of the report.
*/
private String getDeploymentReport() {
StringBuilder sb = new StringBuilder();
List<Deployment> all = kubernetesClient.extensions().deployments().list().getItems();
List<Deployment> pending = all.stream()
.filter(d -> !Readiness.isDeploymentReady(d))
.collect(Collectors.toList());
try {
sb.append(createDeploymentReport(all.size(), all.size() - pending.size()));
sb.append(createPendingReportForDeployment(pending));
} catch (Throwable t) {
//ignore
}
return sb.toString();
}
示例3: uiShouldBeReady
import io.fabric8.kubernetes.client.internal.readiness.Readiness; //导入依赖的package包/类
@Test @Ignore
// This test is failing frequently and should be investigated
// https://github.com/syndesisio/syndesis-system-tests/issues/28
public void uiShouldBeReady() {
Assert.assertTrue(Readiness.isDeploymentConfigReady(ui));
}
示例4: restShouldBeReady
import io.fabric8.kubernetes.client.internal.readiness.Readiness; //导入依赖的package包/类
@Test
public void restShouldBeReady() {
Assert.assertTrue(Readiness.isDeploymentConfigReady(rest));
}
示例5: areAllDeploymentsReady
import io.fabric8.kubernetes.client.internal.readiness.Readiness; //导入依赖的package包/类
private static boolean areAllDeploymentsReady(AddressCluster dc) {
return dc.getResources().getItems().stream().filter(KubernetesHelper::isDeployment).allMatch(Readiness::isReady);
}