-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix repeat delete service and pod #998
Conversation
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thanks for your contribution!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gaocegege 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 |
Kubernetes pkg/controller/controller_utils.go doesn’t have this logic. This is from kubeflow/training-operator/pull/998. I think it’s safe to keep the logic here.
* Add PodControlInterface and FakePodControl * Add comments for service event reasons * Skip deleting pods/services already in termination Kubernetes pkg/controller/controller_utils.go doesn’t have this logic. This is from kubeflow/training-operator/pull/998. I think it’s safe to keep the logic here. * Remove Kubernetes controller dependency Use `KeyFunc` instead of k8s.io/kubernetes/pkg/controller.KeyFunc * Add Base and PodControllerRefManager Current implementation use PodControllerRefManager from `k8s.io/kubernetes/pkg/controller` and self-implemented `ServiceControllerRefManager` which brings some problems. 1. Pod impl may change along with k8s upgrade, service impl doesn’t 2. It’s not helping us remove Kubernetes direct dependency. 3. It’s not that straighforward for maintainers and contributors. This change make sure we folk everything we need and remove ref_manager dependency. * Rename service_ref_manager to controller_ref_manager Since this file contains both BaseControllerRefManager, PodControllerRefManager and ServiceControllerRefManager. It makes sense to rename it to controller_ref_manager.go * Address code review feedbacks
fix #997
/assign @gaocegege @richardsliu
This change is