-
Notifications
You must be signed in to change notification settings - Fork 137
Add intelligent kustomize sorting in apply and delete #386
Conversation
/hold |
/lgtm |
/hold cancel |
/lgtm |
@jlewi @animeshsingh Can you take a look at PR? We think it will efficiently improve User Experience when installing/deleting Kubeflow. |
@Jeffwan I am trying to understand where this PR can benefit. If we look at the output of the
This order looks quite fine to me. So are you saying that this sorting is random and may actually cause problem? However I can sense the problem likely with the
to delete the resource in a reversed order? Another reason to just go with the kustomize is to be sure that all resource kinds are taken care. For example, the And if kustomize is sorting the resources not in a right order, maybe we can create issue there? What do you think? Thanks. |
Thanks for helping review the PR. It depends on how you organize applications in one stack. In your example, you don't have namespace manifest, so deletion will be easier. Can you check your logs on
yeah, this is true. The list won't cover everything especially on the CRD. That's why we put CRD the end of list in
|
@adrian555 Any other concerns? If not, I will go merge the PR. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jeffwan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Add intelligent kustomize sorting in apply and delete * Adjust CRD sequence to leverage finalizer to cleanup created resources
* Add intelligent kustomize sorting in apply and delete * Adjust CRD sequence to leverage finalizer to cleanup created resources
Resolve #385 and kubeflow/manifests#1421
For single application or stacks, kustomize apply/delete order is not guaranteed and it depends on the kustomize file definition. It brings lots of problems as #385 describes.
Add ordering here to help address them. With this PR, apply and deletion becomes more smooth.
It takes 11 mins to finish deletion in the past. (with all cert-manager, kf-serving, knative, istio-system, kubeflow)
Right now, it only takes 4~5 minutes.
Update: did some test, another case we want to handle is when we delete profile crd and controller, we want some namespaces to be cleaned up, otherwise, it will get stuck there.
I move CRD under APiService and webhooks to leverage finalizers. After this change, everything works perfect.