-
Notifications
You must be signed in to change notification settings - Fork 73
Difference between kubeflow/common and kubeflow/tf-operator/pkg/common #71
Comments
Issue Label Bot is not confident enough to auto-label this issue. |
Thanks for the issue. It is helpful. Will we have plan to migrate tf-operator to common? |
@Jeffwan Thanks for tracking down the differences! @gaocegege Yes, check out the current roadmap and we are tracking it in #64. |
I think my plan is to leave the interface for now.. I will have default implementation for following methods in Then other controllers can reuse the implementation of JobController and they can still override following methods if they need a different implementation.
|
Some conclusion
|
* Try and fix CircleCI build * Add missing url to gemfury
Comparing
ControllerInterface
between two different projects, tf-operator is pretty clean.kubeflow/common
adds extra methods to create Job/Pod/Services.common/pkg/apis/common/v1/interface.go
Lines 31 to 56 in fda69c7
Besides that, we extracted a few interfaces for high level abstraction which makes sense.
common/pkg/apis/common/v1/interface.go
Lines 59 to 72 in fda69c7
JobController side, tf-operator has
PodControl
andServiceControl
which are used to operate k8s objects. However, in #36, since create/delete pods/services interface have been exposed, community determine to removePodControl
andServiceControl
because them are kubernetes controller internal codes, and there's also concern on the size of the dependency (need kubernetes code base).Currently, it's a little bit weird.
kubernetes/pkg/controller
, Expectation is still using them here. https://github.com/kubeflow/common/blob/master/pkg/controller.v1/common/job_controller.go#L100 . This is not part ofclient-go
yet. See issue Adding expectations and controller ref manager to client-go kubernetes/client-go#332I think we used
dep
to manage dependencies in the past and I've migrated common to go module compatible. Ideally, we will move all operator to go modules pretty soon. Size of the dependencies is not that painful.kubeflow/common
.I think we only one of following three. The status in
kubeflow/common
isCreateService
, etc. If that's all same, it's better to implement it inside JobController.common/pkg/apis/common/v1/interface.go
Lines 31 to 38 in fda69c7
common/pkg/apis/common/v1/interface.go
Lines 47 to 56 in fda69c7
The text was updated successfully, but these errors were encountered: