use of io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext in project kubernetes-client by fabric8io.
the class DeploymentOperationsImpl method doGetLog.
private List<RollableScalableResource<ReplicaSet>> doGetLog() {
List<RollableScalableResource<ReplicaSet>> rcs = new ArrayList<>();
Deployment deployment = requireFromServer();
String rcUid = deployment.getMetadata().getUid();
ReplicaSetOperationsImpl rsOperations = new ReplicaSetOperationsImpl(new RollingOperationContext(rollingOperationContext.getContainerId(), false, 0, null, rollingOperationContext.getLogWaitTimeout()), context.withName(null));
ReplicaSetList rcList = rsOperations.withLabels(getDeploymentSelectorLabels(deployment)).list();
for (ReplicaSet rs : rcList.getItems()) {
OwnerReference ownerReference = KubernetesResourceUtil.getControllerUid(rs);
if (ownerReference != null && ownerReference.getUid().equals(rcUid)) {
rcs.add(rsOperations.withName(rs.getMetadata().getName()));
}
}
return rcs;
}
use of io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext in project kubernetes-client by fabric8io.
the class DeploymentOperationsImpl method doGetLog.
private List<RollableScalableResource<ReplicaSet>> doGetLog() {
List<RollableScalableResource<ReplicaSet>> rcs = new ArrayList<>();
Deployment deployment = requireFromServer();
String rcUid = deployment.getMetadata().getUid();
ReplicaSetOperationsImpl rsOperations = new ReplicaSetOperationsImpl(new RollingOperationContext(rollingOperationContext.getContainerId(), false, 0, null, rollingOperationContext.getLogWaitTimeout()), context.withName(null));
ReplicaSetList rcList = rsOperations.withLabels(getDeploymentSelectorLabels(deployment)).list();
for (ReplicaSet rs : rcList.getItems()) {
OwnerReference ownerReference = KubernetesResourceUtil.getControllerUid(rs);
if (ownerReference != null && ownerReference.getUid().equals(rcUid)) {
rcs.add(rsOperations.withName(rs.getMetadata().getName()));
}
}
return rcs;
}
Aggregations