Skip to content

Commit

Permalink
chore: modify deployment find logic
Browse files Browse the repository at this point in the history
  • Loading branch information
shinilseop committed Nov 16, 2022
1 parent f782d45 commit e90c073
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,7 @@ public HasMetadata getDeploymentObject(String name) {
.getItems();

return deployments.stream().filter((item) -> item.getMetadata().getName().equals(name))
.collect(Collectors.toList())
.get(deployments.size() - 1);
.findFirst().get();
}

public HasMetadata getJobObject(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void deployInferenceServerWithoutHPATest() throws Exception {
.getItems();

io.fabric8.kubernetes.api.model.apps.Deployment createdDeployment = (io.fabric8.kubernetes.api.model.apps.Deployment) kubernetesService.getDeploymentObject(
"testDeployment".toLowerCase());
"inference-" + deployment.getName().toLowerCase());

HorizontalPodAutoscalerList hpaList = client.autoscaling().v2beta2().horizontalPodAutoscalers()
.inNamespace("default").list();
Expand Down

0 comments on commit e90c073

Please sign in to comment.