Skip to content
Snippets Groups Projects
Commit 04df203a authored by Patryk Kazimierowski's avatar Patryk Kazimierowski
Browse files

removed try catch

parent 1ea8eff4
No related branches found
No related tags found
2 merge requests!273Release 1.8.0 update,!268Resolve "Add application instance scaling support"
...@@ -35,18 +35,15 @@ public class DefaultKServiceOperationsManager implements KServiceOperationsManag ...@@ -35,18 +35,15 @@ public class DefaultKServiceOperationsManager implements KServiceOperationsManag
@Override @Override
@Loggable(LogLevel.INFO) @Loggable(LogLevel.INFO)
public void scaleDeployment(Identifier deploymentId, int replicas) { public void scaleDeployment(Identifier deploymentId, int replicas) throws KubernetesClientSetupException {
KubernetesNmServiceInfo serviceInfo = repositoryManager.loadService(deploymentId); KubernetesNmServiceInfo serviceInfo = repositoryManager.loadService(deploymentId);
try {
final String namespace = namespaceService.namespace(serviceInfo.getDomain()); final String namespace = namespaceService.namespace(serviceInfo.getDomain());
final String kubernetesDeploymentName = final String kubernetesDeploymentName =
Stream.of(serviceInfo.getDescriptiveDeploymentId().getValue(), serviceInfo.getKubernetesTemplate().getMainDeploymentName()) Stream.of(serviceInfo.getDescriptiveDeploymentId().getValue(), serviceInfo.getKubernetesTemplate().getMainDeploymentName())
.filter(Objects::nonNull) .filter(Objects::nonNull)
.collect(Collectors.joining("-")); .collect(Collectors.joining("-"));
kubernetesApiClientService.scaleDeployment(serviceInfo.getRemoteCluster(), namespace, kubernetesDeploymentName, replicas); kubernetesApiClientService.scaleDeployment(serviceInfo.getRemoteCluster(), namespace, kubernetesDeploymentName, replicas);
} catch (KubernetesClientSetupException e) {
log.error(e.getMessage());
}
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment