Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom version strings on images with operator. #5213

Open
anish-db opened this issue Jul 29, 2023 · 3 comments
Open

Support custom version strings on images with operator. #5213

anish-db opened this issue Jul 29, 2023 · 3 comments

Comments

@anish-db
Copy link
Contributor

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 like tidb_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:

E0729 00:22:23.727017       1 utils.go:464] Parse version tidb_2023-06-27_00.43.39Z_master_123abcde_123456789 failure, error: Invalid Semantic Version
W0729 00:22:23.927754       1 tidb_member_manager.go:1102] parse tidb verson 'tidb_2023-06-27_00.43.39Z_master_123abcde_123456789' failed, skip setting store labels for TiKV of TiDB cluster tidb/devdev. err: Invalid Semantic Version

This makes a lot of error logs & prevents us from using various functionality and potentially incorrect usage at various operator code paths:

isOlder, err := cmpver.Compare(tidbVersion, cmpver.Less, tidbSupportLabelsMinVersin)

func TiKVLessThanV50(image string) bool {

ge, err := cmpver.Compare(podVersion, cmpver.GreaterOrEqual, currentVersion)

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

@csuzhangxc
Copy link
Member

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.

@anish-db
Copy link
Contributor Author

Yes, I think using version over HTTP Api in some cases would be fine since they would still be accurate in our case.

@adamf-db
Copy link

adamf-db commented Aug 8, 2023

+1 to this feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants