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

Target port is hard coded to 4000 in tidb service #4748

Open wxiaomou opened 1 year ago

wxiaomou commented 1 year ago

Bug Report

What version of Kubernetes are you using?

Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.14", GitCommit:"bccf857df03c5a99a35e34020b3b63055f0c12ec", GitTreeState:"clean", BuildDate:"2022-09-14T22:35:04Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.15-airbnb0", GitCommit:"8eb9c23f7e14a78e67cd8e3eb7853fa794e0bc4f", GitTreeState:"clean", BuildDate:"2022-07-12T23:05:33Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"} WARNING: version difference between client (1.22) and server (1.20) exceeds the supported minor version skew of +/-1 What version of TiDB Operator are you using?

we maintain a local folk.

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?

What's the status of the TiDB cluster pods?

What did you do?

Trying to change the tidb container port, but from the operator code https://github.com/pingcap/tidb-operator/blob/master/pkg/manager/member/tidb_member_manager.go#L599 it seems the tidb service's target port is hard coded to 4000.

What did you expect to see? I expected this port should be the value I specified in tidb-config?

What did you see instead? tidb container port is hardcoded to 4000 in tidb operator

yiduoyunQ commented 1 year ago

you can config tidb's service port

wxiaomou commented 1 year ago

@yiduoyunQ I mean the tidb container port https://github.com/pingcap/tidb-operator/blob/master/pkg/manager/member/tidb_member_manager.go#L616 Am I understanding correctly?

yiduoyunQ commented 1 year ago

it has an open issue about this #4531

wxiaomou commented 1 year ago

@yiduoyunQ Thanks