Open anish-db opened 1 year ago
adding a new field as the desired version to override the version string from the image tag should work. But in some cases, if we need to know the current version of a Pod or StatefulSet, then we may need to get this information from HTTP APIs or store this information in the annotation of Pod/Statefulset.
Yes, I think using version over HTTP Api in some cases would be fine since they would still be accurate in our case.
+1 to this feature request.
Feature Request
Is your feature request related to a problem? Please describe: We adapt the official pingcap images thru our internal docker image pipeline to produce images with custom version tags that don't follow the tidb version string format of
v6.5.3
etc. e.g. our version strings look liketidb_2023-06-27_00.43.39Z_master_123abcde_123456789
Operator makes various assumptions to gate functionality based on wether a component is new enough past some version or not. For this it tries to parse the
.spec.version
field from the tidb cluster definition and errors out in our case like:This makes a lot of error logs & prevents us from using various functionality and potentially incorrect usage at various operator code paths: https://github.com/pingcap/tidb-operator/blob/34c19d4b977df6afe5f3a60db17905f71a2fc1cf/pkg/manager/member/tidb_member_manager.go#L1144 https://github.com/pingcap/tidb-operator/blob/34c19d4b977df6afe5f3a60db17905f71a2fc1cf/pkg/manager/member/utils.go#L463 https://github.com/pingcap/tidb-operator/blob/34c19d4b977df6afe5f3a60db17905f71a2fc1cf/pkg/manager/member/ticdc_scaler.go#L236
Describe the feature you'd like: We would like to be able to specify an override version string for informing operator what tidb versions we are using which is separate from the actual image tag used for container images.
Describe alternatives you've considered: N/A
Teachability, Documentation, Adoption, Migration Strategy: Explained above.
cc: @coderplay @gegao-db