Search in sources :

Example 1 with ReconciliationUtil

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;
}
Also used : ReconciliationResult(io.stackgres.operator.conciliation.ReconciliationResult) ReconciliationUtil(io.stackgres.operator.conciliation.ReconciliationUtil)

Example 2 with ReconciliationUtil

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;
}
Also used : ReconciliationResult(io.stackgres.operator.conciliation.ReconciliationResult) ReconciliationUtil(io.stackgres.operator.conciliation.ReconciliationUtil)

Example 3 with ReconciliationUtil

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;
}
Also used : ReconciliationResult(io.stackgres.operator.conciliation.ReconciliationResult) ReconciliationUtil(io.stackgres.operator.conciliation.ReconciliationUtil)

Example 4 with ReconciliationUtil

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;
}
Also used : ReconciliationResult(io.stackgres.operator.conciliation.ReconciliationResult) ReconciliationUtil(io.stackgres.operator.conciliation.ReconciliationUtil)

Aggregations

ReconciliationResult (io.stackgres.operator.conciliation.ReconciliationResult)4 ReconciliationUtil (io.stackgres.operator.conciliation.ReconciliationUtil)4