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

[CRD] versioning support in StarrocksCluster #445

Open
mingmxu opened this issue Feb 7, 2024 · 2 comments
Open

[CRD] versioning support in StarrocksCluster #445

mingmxu opened this issue Feb 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mingmxu
Copy link
Contributor

mingmxu commented Feb 7, 2024

Describe the current behavior

Currently, CRD: StarrocksCluster has a fixed version apiVersion: starrocks.com/v1, without proper versioning and capability guarantee, the risk to upgrade CRD is unknown.

Describe the enhancement

Support versioning in CRD: StarrocksCluster, and add capability verification during CRD upgrade.

Additional context

Add any other context or screenshots about the enhancement here.

cc @dengliu @yandongxiao

@yandongxiao
Copy link
Collaborator

‌‌‌If we are just marking the version information of CRD, can we add the corresponding version information to the annotation or label of CRD?

@mingmxu
Copy link
Contributor Author

mingmxu commented Feb 21, 2024

It's good to stick using one version in CRD, if we're able to keep backward/forward compatible crossing the released CRDs:

  • the old CRs can be parsed by the new operator, this eliminates the migration effort when upgrading operator/crd;
  • the new CRs can be parsed by the old operator, this ensures it's safe to rollback operator upgrade;

Technically we can use webhook to rewrite CRs when compatibility is not guaranteed. I don't suggest to move that far until necessary, adding logic in operator to handle unset behaviors is much simpler.


Some more information in https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/

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

No branches or pull requests

2 participants