spring-cloud / spring-cloud-deployer-kubernetes

The Spring Cloud Deployer implementation for Kubernetes
Apache License 2.0
157 stars 98 forks source link

How to handle 'zombie' services when deployment fails #450

Open popadynetsb opened 3 years ago

popadynetsb commented 3 years ago

Skipper creates a Service Object before the Deployment . As Skipper does not validate k8s Objects before trying to deploy an application and does not remove the service if the deployment fails, typos in a volume or volume mounts definitions result in zombie services. Now, on the next try, Skipper fails on deploying the service (as it is already present) and fixed component cannot be deployed

https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/blob/2772716d94c57cd62fff721891d61033a5a40128/src/main/java/org/springframework/cloud/deployer/spi/kubernetes/KubernetesAppDeployer.java#L115-L122