Skip to content

Conversation

@stevekuznetsov
Copy link

Without a careful reading of the installation code, I made a number of mistakes configuring the install client with the IncludeCRDs and SkipCRDs options. The new names proposed in this commit aim to clarify the intent of these options and make such mistakes impossible in the future.

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 22, 2025
Copy link
Contributor

@TerryHowe TerryHowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While these names may be better, this is a breaking change and would have to wait until v5. Do you want to make this change or update the comments?

@stevekuznetsov
Copy link
Author

@TerryHowe does your versioning scheme apply to the library as well as the flags for users? Also, isn't the point of alpha releases that you can still break APIs? 😅

@stevekuznetsov
Copy link
Author

My preference would be to have a broader refactor, if I'm honest - the flow that I triggered by setting installClient.IncludeCRDs was terrifying - the next helm upgrade silently deleted the CRDs from the cluster, causing data loss. While I can appreciate not making a breaking change, in my personal opinion the cost of this behavior being the way it is likely outweighs the (likely few) users of the V4 Helm library code that would be affected. Would be good to hear your thoughts on this.

@TerryHowe
Copy link
Contributor

The beta is out for v4 and there aren't supposed to be any breaking changes with the CLI or SDK at this point.

@stevekuznetsov
Copy link
Author

stevekuznetsov commented Oct 23, 2025

@mattfarina hi! I found a set of flags on the install SDK which cause Helm v4 to silently delete CRDs and cause catastrophic data loss on clusters. Do you think this warrants some breaking changes in the SDK (but not the CLI) to make it less likely that users hit this?

@TerryHowe I appreciate what you are saying but I don't think you are commenting on the important part of my question - should Helm silently delete CRDs on a cluster? Data loss on upgrade seems like the cardinal sin here and making that hard, if not impossible, seems like a good goal. (And a breaking change in the SDK, even if in a beta, seems like a much, much, much smaller issue.)

@TerryHowe
Copy link
Contributor

Documentation would help the poorly named booleans and would not break SDK users. Maybe put a TODO in there to update for v5. That would be my guess on where this is going to have to go.

Without a careful reading of the installation code, I made a number of
mistakes configuring the install client with the `IncludeCRDs` and
`SkipCRDs` options. The new names proposed in this commit aim to clarify
the intent of these options and make such mistakes impossible in the
future.

Signed-off-by: Steve Kuznetsov <stekuznetsov@microsoft.com>
@stevekuznetsov
Copy link
Author

Sure, that's the least we can do.

@TerryHowe TerryHowe requested a review from Copilot October 23, 2025 23:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves documentation for CRD-related installation options in Helm's Install action by adding detailed comments explaining the purpose and implications of SkipCRDs and IncludeCRDs flags.

Key changes:

  • Added documentation for SkipCRDs explaining it prevents CRD operations during chart installation
  • Added documentation for IncludeCRDs warning about the risks of including CRDs in release manifests during live cluster installations

// RollbackOnFailure enables rolling back (uninstalling) the release on failure if set
RollbackOnFailure bool
RollbackOnFailure bool
// SkipCRDs opts the chart installation out of installing or upgrading CRs on the cluster. By
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected abbreviation from 'CRs' to 'CRDs' to match the context about Custom Resource Definitions.

Suggested change
// SkipCRDs opts the chart installation out of installing or upgrading CRs on the cluster. By
// SkipCRDs opts the chart installation out of installing or upgrading CRDs on the cluster. By

Copilot uses AI. Check for mistakes.

Comment on lines +110 to +113
// SkipCRDs opts the chart installation out of installing or upgrading CRs on the cluster. By
// default, CRDs are installed (or upgraded) during a chart installation and AlreadyExists errors
// are ignored. When this flag is set, no operations over CRDs will be made against the cluster
// during installation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// SkipCRDs opts the chart installation out of installing or upgrading CRs on the cluster. By
// default, CRDs are installed (or upgraded) during a chart installation and AlreadyExists errors
// are ignored. When this flag is set, no operations over CRDs will be made against the cluster
// during installation.
// SkipCRDs If set to false, CRDs are installed (or upgraded) during a chart installation and
// AlreadyExists errors are ignored. If set to true, no operations on CRDs are performed on
// the cluster during installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants