Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb-opertor加载参数失败
[Test Environment] Test environment
[TiDB Version] None
[Reproduction Path] Operations performed that led to the issue
[Encountered Issue: Symptoms and Impact]
[Resource Configuration]
[K8s Version]:
[Attachments: Screenshots/Logs/Monitoring]
Upgrading the operator from version 1.3.3 to 1.4.6 resulted in a configuration error.
Configuration is as follows:
Upgrade command:
/root/helm/linux-amd64/helm upgrade tidb-operator ./tidb-operator --namespace=tidb-admin
Error message:
Error: UPGRADE FAILED: error validating “”: error validating data: ValidationError(Deployment.spec.template.spec.imagePullSecrets[0]): invalid type for io.k8s.api.core.v1.LocalObjectReference: got “string”, expected “map”
Based on the error message, it can be seen that a validation error occurred during the upgrade of TiDB Operator, where the type of Deployment.spec.template.spec.imagePullSecrets[0] is incorrect. It should be a map type, but it is actually a string type.
This error is usually caused by an incorrect format of a configuration item in the Helm Chart. To resolve this issue, you can try the following methods:
-
Check the configuration items in the Helm Chart to ensure the format is correct. You can refer to the configuration examples in the official TiDB Operator documentation [1] to verify if your configuration meets the requirements.
-
If you are using a custom Helm Chart, try using the official Helm Chart for the upgrade. The official Helm Chart can be obtained from the TiDB Operator GitHub repository [2].
-
If the above methods do not resolve the issue, you can try uninstalling the old version of TiDB Operator and then reinstalling the new version of TiDB Operator. The command to uninstall TiDB Operator is as follows:
helm uninstall tidb-operator --namespace=tidb-admin
Then, you can follow the steps in the official TiDB Operator documentation [1] to reinstall TiDB Operator.
Just provide an example directly.
Just comment out this line.
In v1.3.3, it also reports an error. How was it successfully deployed before?
➜ ~ helm install tidb-operator pingcap/tidb-operator --namespace tidb-admin --version v1.3.3 -f values.yaml
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec.template.spec.imagePullSecrets[0]): invalid type for io.k8s.api.core.v1.LocalObjectReference: got "string", expected "map"