tidb-operator icon indicating copy to clipboard operation
tidb-operator copied to clipboard

Allow PD/TiKV port configuration

Open Tema opened this issue 3 years ago • 4 comments
trafficstars

Feature Request

Is your feature request related to a problem? Please describe: We try to setup TiDB in the environment, which has a strict range of ports allowed to use.

Describe the feature you'd like: Allow tidb CR to specify which ports to use for TiKV and PD. Right now port numbers are hardcoded: https://github.com/pingcap/tidb-operator/blob/master/charts/tidb-cluster/templates/scripts/_start_pd.sh.tpl#L64-L66

Tema avatar May 23 '22 15:05 Tema

@Tema The ports of TiKV and PD are only used internally in the Kubernetes cluster, why do you want to customize the ports?

DanielZhangQD avatar Jul 04 '22 09:07 DanielZhangQD

We use hostNetwork:true flag to avoid network virtualization overhead for high throughput use cases. Also we connect to PD and TiKV cluster from a client which is located on a separate k8s cluster.

Tema avatar Jul 05 '22 16:07 Tema

We use hostNetwork:true flag to avoid network virtualization overhead for high throughput use cases. Also we connect to PD and TiKV cluster from a client which is located on a separate k8s cluster.

I think pod container merge strategic feature will solve your problem, ref: https://github.com/pingcap/tidb-operator/pull/4530.WDYT?

mikechengwei avatar Jul 06 '22 03:07 mikechengwei

@mikechengwei https://github.com/pingcap/tidb-operator/pull/4530 only allows me to enable hostNetwork:true, which we already do. But it does not allow me to configure --advertise-peer-urls for PD/TiKV to listen on a different port.

Tema avatar Jul 06 '22 15:07 Tema