-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Helm CRD deployment/deletion #107
Conversation
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: scaledobjects.kore.k8s.io | ||
annotations: | ||
"helm.sh/hook": crd-install | ||
# This will delete the CRD before any attempt to install it | ||
# However, it only works if you use the --wait option on `helm install` | ||
"helm.sh/hook-delete-policy": "before-hook-creation" |
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.
I wasn't clear about this in the meeting today. Would this cause all ScaledObjects to get deleted on update?
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.
On update, no. They would only get wiped if you were doing a fresh helm install after deleting the deployment. If we don't want people to unintentionally wipe them, I can revert that and just leave in the var that lets you not create the CRD.
You'll need to rebase your pr. The file names changed so keep that in mind. |
Will rebase at some point this afternoon, I have been at an event and am catching up on all the changes. |
8a22d25
to
68260af
Compare
@Aarthisk I'd love to see this merged or closed, just rebased again so it is up to date |
Helm CRD deployment/deletion Former-commit-id: 13071d2
Helm CRD deployment/deletion Former-commit-id: 3405d42
Signed-off-by: Tom Kerkhove <[email protected]>
Fixes #105
Added hook to delete CRD before reinstall - still not sure if this is the preferable pathKilled this. I think we should go with the route least likely to suddenly wipe someone's setupNot sure which of the paths mentioned in linked issue is preferred - delete CRD w/ deployment, or delete CRD before attempting to install?