Search in sources :

Example 1 with StackGresClusterDbOpsSecurityUpgradeStatus

use of io.stackgres.common.crd.sgcluster.StackGresClusterDbOpsSecurityUpgradeStatus in project stackgres by ongres.

the class ClusterRestartStateHandlerImplTest method initializeClusterStatus.

@Override
protected void initializeClusterStatus(StackGresCluster cluster, List<Pod> pods) {
    final StackGresClusterStatus status = new StackGresClusterStatus();
    final StackGresClusterDbOpsStatus dbOps = new StackGresClusterDbOpsStatus();
    final StackGresClusterDbOpsSecurityUpgradeStatus securityUpgrade = new StackGresClusterDbOpsSecurityUpgradeStatus();
    securityUpgrade.setInitialInstances(pods.stream().map(Pod::getMetadata).map(ObjectMeta::getName).collect(Collectors.toList()));
    securityUpgrade.setPrimaryInstance(getPrimaryInstance(pods).getMetadata().getName());
    dbOps.setSecurityUpgrade(securityUpgrade);
    status.setDbOps(dbOps);
    cluster.setStatus(status);
}
Also used : ObjectMeta(io.fabric8.kubernetes.api.model.ObjectMeta) StackGresClusterDbOpsStatus(io.stackgres.common.crd.sgcluster.StackGresClusterDbOpsStatus) StackGresClusterDbOpsSecurityUpgradeStatus(io.stackgres.common.crd.sgcluster.StackGresClusterDbOpsSecurityUpgradeStatus) StackGresClusterStatus(io.stackgres.common.crd.sgcluster.StackGresClusterStatus)

Aggregations

ObjectMeta (io.fabric8.kubernetes.api.model.ObjectMeta)1 StackGresClusterDbOpsSecurityUpgradeStatus (io.stackgres.common.crd.sgcluster.StackGresClusterDbOpsSecurityUpgradeStatus)1 StackGresClusterDbOpsStatus (io.stackgres.common.crd.sgcluster.StackGresClusterDbOpsStatus)1 StackGresClusterStatus (io.stackgres.common.crd.sgcluster.StackGresClusterStatus)1