使用 tidb operator 部署 tidb 集群,tidb-controller-manager 报错 Required value: name/mountPath must not be empty

tidb cluster tidb01/xyz is not valid and must be fixed first, aggregated error: [spec.tikv.storageVolumes[0].name: Required value: name must not be empty, spec.tikv.storageVolumes[0].mountPath: Required value: mountPath must not be empty]

使用 tidb-operator 部署 tidb 集群到 k8s 遇到一个关于配置文件的报错,我检查了配置文件,没有发现问题。请教一下!不知道有没有人遇到同样的问题。

  • 本地的 k8s 集群 (Docker 19.3.13, Kubernetes v1.18.8, Debian 10)
  • local storage
  • helm 3 安装的 tidb-operator
  • CRD 也确定已经部署了。
$ helm version --short
v3.3.4+ga61ce56

$ helm list -n tidb-admin
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
tidb-operator   tidb-admin      1               2020-12-07 17:58:44.135571384 +0800 CST deployed        tidb-operator-v1.1.7    v1.1.7

$ kubectl get crd | grep pingcap
backups.pingcap.com                                             2020-12-07T09:36:25Z
backupschedules.pingcap.com                                     2020-12-07T09:36:27Z
restores.pingcap.com                                            2020-12-07T09:36:26Z
tidbclusterautoscalers.pingcap.com                              2020-12-07T09:36:28Z
tidbclusters.pingcap.com                                        2020-12-07T09:36:25Z
tidbinitializers.pingcap.com                                    2020-12-07T09:36:28Z
tidbmonitors.pingcap.com                                        2020-12-07T09:36:27Z

报错中提到的配置,我检查了一下没有发现问题,yq 也可以正常输出

$ cat tidb-cluster.yaml | yq .spec.tikv.storageVolumes[0].name
"wal"
$ cat tidb-cluster.yaml | yq .spec.tikv.storageVolumes[0].mountPath
"/data_tikv/wal"

我把我的配置文件也上传一份

tidb-cluster.yaml (1.2 KB)

@buptzhoutian 这里 validation 有问题,我建了个 issue https://github.com/pingcap/tidb-operator/issues/3583,我们会在下个小版本修复,麻烦暂时 tikv 不要配置 storageVolumes.

原来如此,好的,我跟踪一下这个 issue

好的 辛苦

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。