Skip to content
Snippets Groups Projects
Commit 8a781ae9 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Fix in Api invocation

parent 3ab79309
No related branches found
No related tags found
1 merge request!273Release 1.8.0 update
Pipeline #95199 passed
...@@ -45,12 +45,12 @@ public class KubernetesApiJanitorService { ...@@ -45,12 +45,12 @@ public class KubernetesApiJanitorService {
public boolean checkIfReady(KCluster kCluster, Identifier deploymentId, String domain) { public boolean checkIfReady(KCluster kCluster, Identifier deploymentId, String domain) {
final String namespace = namespaceService.namespace(domain); final String namespace = namespaceService.namespace(domain);
final Deployment deployment = kubernetesApiClientService.getDeployment(kCluster, deploymentId.value(), namespace); final Deployment deployment = kubernetesApiClientService.getDeployment(kCluster, namespace, deploymentId.value());
if (Objects.nonNull(deployment)) { if (Objects.nonNull(deployment)) {
return Objects.equals(deployment.getSpec().getReplicas(), deployment.getStatus().getReadyReplicas()); return Objects.equals(deployment.getSpec().getReplicas(), deployment.getStatus().getReadyReplicas());
} else { } else {
log.info("Deployment {} not found in namespace {}. Looking for a StatefulSet", deploymentId.value(), namespace); log.info("Deployment {} not found in namespace {}. Looking for a StatefulSet", deploymentId.value(), namespace);
final StatefulSet statefulSet = kubernetesApiClientService.getStatefulSet(kCluster, deploymentId.value(), namespace); final StatefulSet statefulSet = kubernetesApiClientService.getStatefulSet(kCluster, namespace, deploymentId.value());
if (Objects.nonNull(statefulSet)) { if (Objects.nonNull(statefulSet)) {
return Objects.equals(statefulSet.getSpec().getReplicas(), statefulSet.getStatus().getReadyReplicas()); return Objects.equals(statefulSet.getSpec().getReplicas(), statefulSet.getStatus().getReadyReplicas());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment