-
Notifications
You must be signed in to change notification settings - Fork 200
HIP 0027: Handling unknown hook-delete-policy values #403
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
Signed-off-by: Marcin Owsiany <[email protected]>
Signed-off-by: Marcin Owsiany <[email protected]>
can you look at this? |
#### 1. Official support for a policy which disables hook deletion | ||
|
||
Add a new, documented hook deletion policy value: `never`. | ||
When specified, such hook resource is not deleted. | ||
Effectively, the same as suggestion for Helm 3, but explicitly supported. | ||
|
||
Pros: | ||
- Keeps compatibility with Helm 3. | ||
- Allows a notion of resources which are installed by helm, but afterwards not managed by it in any way. | ||
- StackRox chart continues to work as before without changing. | ||
- Other charts (if any) which happen depend on current undocumented behaviour could easily be made to work by changing | ||
whatever value they use to `never`. | ||
|
||
Cons: | ||
- It seems that hooks were generally intended to be resources whose previous instances are cleaned up | ||
before (subsequent) chart applications. Supporting this policy breaks this assumption and | ||
introduces some complexity when reasoning about possible scenarios. For example such `pre-install` | ||
hook resources need to be guarded by a `if $.Release.IsInstall` condition in order not to break upgrades. |
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 prefer this one and would call it a bug fix. I think the con you listed, while valid, is probably the expected behavior for anyone that was previously using a not-supported string. This would just make it more explicit.
Add a linter check that complains if an undocumented value for hook deletion policy is used. | ||
|
||
Pros: | ||
- Raises awareness about this issue. | ||
|
||
Cons: | ||
- None? |
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.
This should also be true.
No description provided.