public boolean isRunning(IntegrationDeployment integrationDeployment) { return openShiftService().isScaled(integrationDeployment.getName(), 1); }
public boolean isRunning(IntegrationDeployment integrationDeployment) { return openShiftService().isScaled(integrationDeployment.getSpec().getName(), 1); }
@Override public StateUpdate execute(IntegrationDeployment integrationDeployment) { try { openShiftService().scale(integrationDeployment.getName(), 0); logInfo(integrationDeployment,"Deactivated"); } catch (KubernetesClientException e) { // Ignore 404 errors, means the deployment does not exist for us // to scale down if( e.getCode() != 404 ) { throw e; } } IntegrationDeploymentState currentState = openShiftService().isScaled(integrationDeployment.getName(), 0) ? IntegrationDeploymentState.Inactive : IntegrationDeploymentState.Pending; return new StateUpdate(currentState); }