Closed Jeffwan closed 4 years ago
Issue-Label Bot is automatically applying the labels:
Label | Probability |
---|---|
area/kfctl | 0.98 |
kind/feature | 0.73 |
Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! Links: app homepage, dashboard and code for this bot.
Issue is from https://github.com/kubeflow/manifests/issues/1421.
The issue is when we
kfctl delete -f kfdef.yaml
. namespace deletion will time out. This is because when we delete namespace, all resources will be deleted without control. If k8s APIServer will call registeredapiservice
to clean up resources, However, ifapiservice
backend pod has been deleted, then it will stuck there and being terminating.We delete kustomize files in reverse order, this is good and we can have some control on application order. For example, install istio, cert-manager first and then install kubeflow, etc. https://github.com/kubeflow/kfctl/blob/e7f548d4cee2ba4a7865f6f5ca3fa5ef1ca730ef/pkg/kfapp/kustomize/kustomize.go#L397
However, in each application, there's no order. If namespace becomes the first one to be deleted. it will stuck there until 5 min timeout.
Examples:
We can see
knative-serving
get stuck for few minutes andcert-manager
again failed, eventually, when we deletebase/namespace
.The proposal is to bring some orders based on Kind before we DeleteResource in one application.
https://github.com/kubeflow/kfctl/blob/e7f548d4cee2ba4a7865f6f5ca3fa5ef1ca730ef/pkg/kfapp/kustomize/kustomize.go#L426
The easiest way is to delete name at the end. More elegant way would be order by Kind.