Skip to content

Conversation

porridge
Copy link

No description provided.

@robertsirc
Copy link
Member

@mattfarina

@robertsirc
Copy link
Member

can you look at this?

Comment on lines +67 to +84
#### 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.

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.

Comment on lines +124 to +130
Add a linter check that complains if an undocumented value for hook deletion policy is used.

Pros:
- Raises awareness about this issue.

Cons:
- None?

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.

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

Successfully merging this pull request may close these issues.

3 participants