We've noticed a race condition when performing the following actions (on Azure Kubernetes Services):
- install a
Serviceof typeLoadBalancer(via a Helm chart, usinghelm install) - delete the
Service(usinghelm uninstall) - recreate the
Service(usinghelm installagain)
As the Service has a finalizer, the Service will not really be deleted when the API server returns from step 1. Instead, it will only be marked for deletion. Therefore, if executed fast enough, step 2 will not recreate anything and in the end, there will be no Service even though the Helm chart seems to be installed.
I wonder if this is expected or if I should raise a bug report with Kubernetes (because, e.g., the API server should refuse to modify a service currently being deleted) or Helm (because, e.g., they should notice that the resource is currently deleted and therefore cannot be reinstalled).