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

[WIP][Enhancement] move CRD yaml file to templates directory #449

Conversation

yandongxiao
Copy link
Collaborator

Related Issue(s)

fixes: #448

@yandongxiao
Copy link
Collaborator Author

yandongxiao commented Feb 20, 2024

There are errors when execute helm upgrade.

Error: UPGRADE FAILED: rendered manifests contain a resource that already exists. Unable to continue with update: CustomResourceDefinition "starrocksclusters.starrocks.com" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "starrocks"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "starrocks"

need to execute the following commands manually.

kubectl label crd starrocksclusters.starrocks.com app.kubernetes.io/managed-by=Helm --overwrite
kubectl annotate crd starrocksclusters.starrocks.com meta.helm.sh/release-name=starrocks meta.helm.sh/release-namespace=starrocks --overwrite

@mingmxu
Copy link
Contributor

mingmxu commented Feb 20, 2024

I'm surprised that helm doesn't add the annotations when it's saved in /crds folder. As helm upgrade is not a valid way so far, I won't call it a break change, but it does worth to highlight in the next release version that:

  • from v1.9.3 and later, helm upgrade is supported;
  • for v1.9.2 or earlier -> v1.9.3, needs to run the two commands manually.

@yandongxiao
Copy link
Collaborator Author

yandongxiao commented Feb 21, 2024

I'm surprised that helm doesn't add the annotations when it's saved in /crds folder. As helm upgrade is not a valid way so far, I won't call it a break change, but it does worth to highlight in the next release version that:

  • from v1.9.3 and later, helm upgrade is supported;
  • for v1.9.2 or earlier -> v1.9.3, needs to run the two commands manually.

I think your suggestion is acceptable. cc @kevincai

‌‌‌‌Another possible fatal error: Once the user upgrades to the latest version(e.g. v1.9.3), when it rolls back to an older version of the Helm chart, the CRD will be deleted. So the StarRocks cluster will be deleted too.

@yandongxiao yandongxiao changed the title [Enhancement] move CRD yaml file to templates directory [WIP][Enhancement] move CRD yaml file to templates directory Feb 23, 2024
@yandongxiao
Copy link
Collaborator Author

‌‌Close this PR first to prevent it from being merged.

@yandongxiao yandongxiao closed this Mar 4, 2024
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

Successfully merging this pull request may close these issues.

[enhancement] CRD support in sr-operator Helm chart
2 participants