use of io.stackgres.operator.conciliation.ReconciliationUtil in project stackgres by ongres.
the class DbOpsConciliator method evalReconciliationState.
@Override
public ReconciliationResult evalReconciliationState(StackGresDbOps config) {
final ReconciliationResult reconciliationResult = super.evalReconciliationState(config);
reconciliationResult.setDeletions(reconciliationResult.getDeletions().stream().filter(ReconciliationUtil::isResourceReconciliationNotPausedUntilRestart).collect(Collectors.toUnmodifiableList()));
reconciliationResult.setPatches(reconciliationResult.getPatches().stream().filter(tuple -> ReconciliationUtil.isResourceReconciliationNotPausedUntilRestart(tuple.v2)).collect(Collectors.toUnmodifiableList()));
return reconciliationResult;
}
use of io.stackgres.operator.conciliation.ReconciliationUtil in project stackgres by ongres.
the class BackupConciliator method evalReconciliationState.
@Override
public ReconciliationResult evalReconciliationState(StackGresBackup config) {
final ReconciliationResult reconciliationResult = super.evalReconciliationState(config);
reconciliationResult.setDeletions(reconciliationResult.getDeletions().stream().filter(ReconciliationUtil::isResourceReconciliationNotPausedUntilRestart).collect(Collectors.toUnmodifiableList()));
reconciliationResult.setPatches(reconciliationResult.getPatches().stream().filter(tuple -> ReconciliationUtil.isResourceReconciliationNotPausedUntilRestart(tuple.v2)).collect(Collectors.toUnmodifiableList()));
return reconciliationResult;
}
use of io.stackgres.operator.conciliation.ReconciliationUtil in project stackgres by ongres.
the class DistributedLogsConciliator method evalReconciliationState.
@Override
public ReconciliationResult evalReconciliationState(StackGresDistributedLogs config) {
final ReconciliationResult reconciliationResult = super.evalReconciliationState(config);
if (distributedLogsStatusManager.isPendingRestart(config)) {
reconciliationResult.setDeletions(reconciliationResult.getDeletions().stream().filter(ReconciliationUtil::isResourceReconciliationNotPausedUntilRestart).collect(Collectors.toUnmodifiableList()));
reconciliationResult.setPatches(reconciliationResult.getPatches().stream().filter(tuple -> ReconciliationUtil.isResourceReconciliationNotPausedUntilRestart(tuple.v2)).collect(Collectors.toUnmodifiableList()));
}
return reconciliationResult;
}
use of io.stackgres.operator.conciliation.ReconciliationUtil in project stackgres by ongres.
the class ClusterConciliator method evalReconciliationState.
@Override
public ReconciliationResult evalReconciliationState(StackGresCluster config) {
final ReconciliationResult reconciliationResult = super.evalReconciliationState(config);
if (statusManager.isPendingRestart(config)) {
reconciliationResult.setDeletions(reconciliationResult.getDeletions().stream().filter(ReconciliationUtil::isResourceReconciliationNotPausedUntilRestart).collect(Collectors.toUnmodifiableList()));
reconciliationResult.setPatches(reconciliationResult.getPatches().stream().filter(tuple -> ReconciliationUtil.isResourceReconciliationNotPausedUntilRestart(tuple.v2)).collect(Collectors.toUnmodifiableList()));
}
return reconciliationResult;
}
Aggregations