-
Notifications
You must be signed in to change notification settings - Fork 183
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
H4HIP: Adding a HIP on charts v3 #381
Open
mattfarina
wants to merge
1
commit into
helm:main
Choose a base branch
from
mattfarina:charts-v3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
hip: "0020" | ||
title: "H4HIP: Charts v3 Enablement" | ||
authors: [ "Matt Farina <[email protected]>" ] | ||
created: "2025-01-09" | ||
type: "feature" | ||
status: "accepted" | ||
--- | ||
|
||
## Abstract | ||
|
||
This HIP proposes the creation of charts v3, updating Helm to handle charts v2 and v3, and a | ||
timeline for the general availability of charts v3 that can happen after the release of Helm v4.0.0. | ||
|
||
## Motivation | ||
|
||
Many of the proposed changes for Helm v4 affect charts. Layering these onto existing charts will | ||
sometimes cause chart installation and upgrade to happen differently in Helm v3 and Helm v4, as | ||
both will need to live side by side for a time. It also means that testing of charts for v3 can produce | ||
a different result when installed with Helm v4. | ||
|
||
In addition to the affects of the changes, Helm v4 development has a fixed timeline and making | ||
changes to Helm in addition to reworking charts is not likely to fit within that fixed window. Enabling | ||
the development of charts v3 to happen as an experiment that becomes generally available after | ||
the release of Helm v4 provides more time to continue the work and get feedback. | ||
|
||
The goal is to provide adequate time to work on chart changes while doing it in a way that enables | ||
trust in existing charts to run as they were tested. | ||
|
||
## Rationale | ||
|
||
Charts v2 were created for Helm v3 and introduced minor changes. The code that handles the chart | ||
versions is the same with some checking to handle the differences. This handling ended up having | ||
numerous bugs that had to be worked out in patch releases. | ||
|
||
The chart changes being proposed for Helm v4 are more significant. Mixing those in alongside the | ||
current chart version handling will have trouble limiting bugs will enabling the changes and keeping | ||
existing charts functioning properly. | ||
|
||
The design specified here is meant to enable the current charts to work as expected while providing | ||
space for more radical changes. | ||
|
||
## Specification | ||
|
||
Describe the syntax and semantics of any new feature. | ||
|
||
Helm has numerous packages that do various things, from working with charts to storing release | ||
information. These packages all expect there to be one version of a particular thing. To support | ||
multiple versions of charts, the `chart`, `chartutil`, `engine`, and `release` packages will be made | ||
multi-version. (e.g., engine will have a v1 and v2 versions). In addition to enabling a new version of | ||
charts, this will enable the gotpl engine to evolve as needed to support the new version of charts. | ||
The `chartutil` may be combined with the `chart` package and the `releaseutil` package may be | ||
combined with the `release` package for simplification of the package structure. | ||
|
||
The versioning of the packages will follow the same structure that Kubernetes does with its APIs. | ||
This means a thing will have a directory and within it will be sub-directories for the versions. The | ||
version specific implementation will be in the version specific sub-directory. For example, | ||
|
||
``` | ||
chart | ||
├── v2 | ||
└── v3 | ||
``` | ||
|
||
The version will not use a separate Git repository or Go modules. The reason for this is the added | ||
complexity of managing the repositories and modules is added work to manage changes which will | ||
slow down velocity, will make releases more complex, and make the Helm SDK more complicated | ||
to work with. | ||
|
||
The existing versions of these packages will be externally facing while the new versions will be | ||
developed in `internal` as experiments until they are complete enough for release. When ready for | ||
release, these packages will be moved to the public locations. | ||
|
||
To illustrate this, while in development the `chart` package will have the following structure: | ||
|
||
``` | ||
internal/chart | ||
└── v3 | ||
pkg/chart | ||
└── v2 | ||
``` | ||
|
||
Once the new chart packages have (a) a stable API and (b) are feature complete the structure will | ||
be merged to look like: | ||
|
||
``` | ||
pkg/chart | ||
├── v2 | ||
└── v3 | ||
``` | ||
|
||
While in development, as an experiment, the `pkg/gates` package will be used to create an opt-in | ||
environment variable to enable a new chart version. This is how the OCI experimental feature was | ||
handled. | ||
|
||
## Backwards compatibility | ||
|
||
This development and process is designed with backwards compatibility in mind. The package | ||
locations will change, which is ok in a major version of Helm. The existing charts will be preserved | ||
so that their installation process continues to work as expected from Helm v3. New features and | ||
changes to charts can be added in without impacting existing charts. | ||
|
||
While the new chart version is being developed and is going through breaking changes, the chart | ||
will be an opt-in feature which will enable us to warn users about the state of it. | ||
|
||
## Security implications | ||
|
||
N/A | ||
|
||
## How to teach this | ||
|
||
There are a few ways to teach this: | ||
|
||
1. **Documentation**: The chart documentation will be updated to teach both versions of charts. | ||
2. **Helm Create**: Helm create will be updated to use the new chart version and provide an example. | ||
3. **Blog and Webinars**: The marketing options open to Helm will be used to share details and teach about the new chart version. | ||
|
||
## Reference implementation | ||
|
||
N/A | ||
|
||
## Rejected ideas | ||
|
||
An option to detect the chart version within existing code was seen as an option. This is how | ||
charts `apiVersion` is handled for `v1` and `v2`. This is problematic as large changes in charts | ||
will be difficult to work on and test to ensure nothing breaks across version. | ||
|
||
## Open issues | ||
|
||
N/A | ||
## References | ||
|
||
N/A |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 suspect a new chart version, will also warrant a new release version.
As such, we will also want
pkg/release/{v2,v3}
(Eventually, also code which will turn a chart v3 into a release v3. But I think the structure of that code can be left for another day)
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.
Good call. Updated