spring-cloud-deployer-kubernetes icon indicating copy to clipboard operation
spring-cloud-deployer-kubernetes copied to clipboard

Revisit LoadBalancer deletion logic

Open jvalkeal opened this issue 6 years ago • 1 comments

Current logic of deleting LoadBalancer service during undeploy have few issues.

  • We should not silently eat InterruptedException as it may be a signal that this task should be aborted. This happens if this is run within cancellable task in TaskExecutor.
  • We wait LoadBalancer to go away which will never happen as we never ask to delete it.
  • For example with minikube, there's no real LoadBalancer while service itself is created. When service response have empty LoadBalancer, svc.getStatus().getLoadBalancer().getIngress().isEmpty() will always return true, thus we always wait.

https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/blob/078cedc3649d857480a0fe6e2de73a91f3b5268f/src/main/java/org/springframework/cloud/deployer/spi/kubernetes/KubernetesAppDeployer.java#L174-L198

jvalkeal avatar Mar 09 '18 08:03 jvalkeal

We would have to look into to see why it was decided to confirm that the objects are actually deleted from the K8s cluster. This may not be necessary after all.

sabbyanandan avatar Oct 15 '19 20:10 sabbyanandan