* Runtime abstraction to encapsulate subprocess code and enable future runtimes
Also fix race condition in TestPrepareCommandExtraArgs by replacing the shared variable modification with a local copy
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Remove commented out code
Co-authored-by: Joe Julian <me@joejulian.name>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Check test failure string
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
---------
Signed-off-by: Scott Rigby <scott@r6by.com>
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Co-authored-by: Joe Julian <me@joejulian.name>
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
A few things are added here:
1. The cache is made to be more generic as a content based cache.
It could be used for other things such as plugins
2. Flags were added to specify the content cache locaiton rather
than rely on the repository cache. Keeping the 2 the same
hid bugs and errors.
3. Tests were added and updated to ensure the cache is used and
tested
Signed-off-by: Matt Farina <matt.farina@suse.com>
The previous cache was based on chart name and version. If 2 charts
with different content had the same name and version they would collide.
Helm did not trust the cache because of this and always downloaded
content. It was a short lived cache.
This commit introduces a content based cache which is based on the
content rather than file name. Charts with the same name but different
content are no longer an issue.
While the system assumes a file based interface, the cache system
is pluggable. In the future, it should return bytes for the content
instead of paths to it. That would requie a larger change for Helm 5
or later.
Signed-off-by: Matt Farina <matt.farina@suse.com>
If a resource exists in the cluster and is to be adopted by helm install
--take-ownership, it is left unchanged while helm reports the
installation to have succeeded.
This is due to CRs and CRDs being merged without three-way-merge, which
results in an empty patch.
By using a three-way-merge transparently when --take-ownership is used,
the helm behaves as expected without breaking previous behavior.
Fixes#30622
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
This is part of HIP 20 which provides a means to have v3 charts
that live alongside v2 charts while having breaking changes.
The plan is to have a different release object for v3 chart
instances for at least a couple reasons:
1. So that the chart object on the release can be fundamentally
different.
2. So that Helm v3 does not detect or try to work with instances
of charts whose apiVersion it does not know about.
Note: it is expected that Helm v3 usage will be used long after
the Helm project no longer supports it. 5 years after Helm v2
had reached end-of-life there was still usage of it.
Note: The release util package is separate from the versioned
elements as it is planned to use generics to handle multiple
release object versions.
Signed-off-by: Matt Farina <matt.farina@suse.com>
This change moves the code, updates the import locations, and
adds a doc.go file to document what the v2 package is for.
This is part of HIP 20 for v3 charts
Signed-off-by: Matt Farina <matt.farina@suse.com>
The releaseutil package was originally designed to work against a
generated codebase from a protobuf in Helm v2. This is when Helm
used gRPC to communicate to a server side component named Tiller.
When Helm moved everything client side, this package remained and
it supported the release package.
This change moves releaseutil to be a sub-packge of release. This
is part of the change to support apiVersion v3 charts which is
documented in HIP 20
Signed-off-by: Matt Farina <matt.farina@suse.com>
chartutil was originally created to operate on protobufs which are
no longer part of Helm. The util package makes more sense to be
part of the chart package.
This change is part of the HIP 20 to create v3 charts and
explicitly call out v2 charts. The changes for this are in smaller
bite size changes.
Signed-off-by: Matt Farina <matt.farina@suse.com>
Since Helm is going through breaking changes with Helm v4, the version path to
Helm needs to be updated.
Signed-off-by: Matt Farina <matt.farina@suse.com>
- replace os.IsNotExist with errors.Is and fs.ErrNotExist
- use %w directive
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>