mirror of
https://github.com/DerDavidBohl/dirigent-spring.git
synced 2025-12-31 00:49:59 -06:00
Recreate Deployments when Secrets change
This commit is contained in:
@@ -6,6 +6,7 @@ import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.StreamSupport;
|
||||
@@ -36,8 +37,15 @@ public class DeploymentStatePersistingService {
|
||||
}
|
||||
|
||||
public List<DeploymentState> getDeploymentStates() {
|
||||
return StreamSupport.stream(deploymentStateRepository.findAll().spliterator(), false)
|
||||
.toList();
|
||||
Iterable<DeploymentState> all = deploymentStateRepository.findAll();
|
||||
|
||||
List<DeploymentState> result = new ArrayList<>();
|
||||
|
||||
for (DeploymentState deploymentState : all) {
|
||||
result.add(deploymentState);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user