-
Notifications
You must be signed in to change notification settings - Fork 69
Split CRDs into a different chart so they could be fully managed by helm #252
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
base: main
Are you sure you want to change the base?
Conversation
Hi @gossion, thanks so so much for the contribution. I kicked off CI, and will hopefully have a chance to review later today :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look great to me, looks like there's a merge conflict
.PHONY: helm-publish | ||
helm-publish: helm-version | ||
helm push kagent-crds-$(VERSION).tgz oci://ghcr.io/kagent-dev/kagent/helm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: This may fail the release since the OCI repo won't exist beforehand, I can solve that if this happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @EItanya , please help if that happen.
if strings.Contains(output, "exists and cannot be imported into the current release") { | ||
s.Stop() | ||
c.Println("Warning: CRDs already exist but not managed by helm, you might need to delete them manually to make them fully managed by helm.") | ||
s.Start() | ||
} else { | ||
c.Println("Error installing kagent-crds:", output) | ||
return | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a requirement, but since we are in a repl
anyway we could offer to do this for the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good point.
Here is what I am thinking:
- InstallCmd - still succeeds (to avoid breaking change) when CRDs are not managed by helm, but warns that users need to manually delete CRDs or run uninstall cmd to delete CRDs.
- UninstallCmd - adding steps in uninstall to delete CRDs (by kubctl?) if helm release not found but CRDs are there.
how do you think?
This pull request introduces the changes to the Helm chart structure and CLI commands for managing the Kagent application. The primary goal is to separate the Kagent Custom Resource Definitions (CRDs) into their own Helm chart, improving modularity, version control, and adherence to Helm best practices. Additionally, the CLI commands for installation and uninstallation have been updated to align with this new structure.
original helm release:
new helm releases:
It will also fix #234. Note: For the existing old CRDs deployed by old helm chart:
users need to delete those resources manually so the next
helm install
could use the separated CRDs chart.