pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.22k stars 489 forks source link

[Discussion] Potential name conflict `controller-manager` #34

Closed gaocegege closed 6 years ago

gaocegege commented 6 years ago

Hi,

I am a TiDB contributor and interested in the development of TiDB operator. When I looked through the code, I found that the package name in cmd/ is controller-manager, while controller-manager has special meaning in Kubernetes community, IMO. cloud-controller-manager and controller-manager in K8s manages multiple controllers, and our CLI only creates one controller for tidbcluster CRD. Then I think it is better to name it to tidb-operator or tidb.

gaocegege commented 6 years ago

There are some examples in the operator community:

tennix commented 6 years ago

Hi, @gaocegege Thanks for your suggestion. Actually, an operator is just a controller or multiple controllers of Kubernetes. Currently, TiDB Operator has only one controller, but we plan to add more controllers and to avoid the complexity of deployment of TiDB Operator, we will make other controllers all into one binary, just like Kubernetes controller-manager. And we may also add a scheduler component to TiDB Operator in the future. All of these just work as Kubernetes components themselves, the only difference is that these components are not builtin to Kubernetes. So we prefer to name it like Kubernetes itself. Making users aware of what these components exactly are, no magic.

gaocegege commented 6 years ago

SGTM

At the current stage, it confuses me but your opinion makes sense.