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);
}
Aggregations