Commit graph

62 commits

Author SHA1 Message Date
Matt Farina
ca8eae9361
Reproducible chart archive builds
Building the same chart into an archive multiple times will have
the same sha256 hash.

Perviously, the time in the headers for a file was time.Now() which
changed each time. The time is now collected from the operating
system when the file is loaded and this time is used.

Fixes: #3612

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-29 11:49:22 -04:00
George Jenkins
7dd2484aed
Merge pull request #31295 from TerryHowe/fix-make-helm-list-show-all-by-default
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Fix make helm list show all by default
2025-10-13 20:04:19 +01:00
copilot-swe-agent[bot]
b4f932a715
Fix test by making date sorting stable and updating golden files
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-10-13 10:28:43 -06:00
Terry Howe
20eb6e9b04
fix: empty time values
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-10-10 16:44:19 -06:00
Matt Farina
24159ec8b6 Moving new default accessor functions to internal per feedback
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 13:16:49 -04:00
Matt Farina
fb20e96a56 Adding a test/example for the release accessor
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 12:53:00 -04:00
Matt Farina
9c958dec76 Making uninstall response generic
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:49:08 -04:00
Matt Farina
f80cbe43d0 Moved release objects to enable versioning
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:49:08 -04:00
Matt Farina
2247a0074b Move all the get commands to the new release interface
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:49:08 -04:00
Terry Howe
3e1dd9a5dc
chore: remove pkg/time which is no longer needed
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-09-15 12:29:35 -06:00
Matt Farina
9dcc49cbd5 Move lint pkg to be part of each chart version
Linting is specific to the chart versions. A v2 and v3 chart will
lint differently.

To accomplish this, packages like engine need to be able to handle
different chart versions. This was accomplished by some changes:

1. The introduction of a Charter interface for charts
2. The ChartAccessor which is able to accept a chart and then
   provide access to its data via an interface. There is an
   interface, factory, and implementation for each version of
   chart.
3. Common packages were moved to a common and util packages.
   Due to some package loops, there are 2 packages which may
   get some consolidation in the future.

The new interfaces provide the foundation to move the actions
and cmd packages to be able to handle multiple apiVersions of
charts.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-09-02 12:14:37 -04:00
Matt Farina
6f957f4922 Move the release util to the versioned directory
The release util package is directly related to the v1 of
releases and uses the v1 of releases.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-09-02 10:13:55 -04:00
George Jenkins
e2dcbe28bf Helm client/SDK support server-side apply
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-08-18 10:05:07 -07:00
Joe Julian
92bc614fbf
Merge remote-tracking branch 'upstream/main' into use-sort-slice 2025-08-13 13:22:16 -07:00
George Jenkins
8face0e596
Merge pull request #31060 from yumeiyin/main
refactor: replace Split in loops with more efficient SplitSeq
2025-07-18 07:50:10 -07:00
yumeiyin
8c22fbfe4a refactor: replace Split in loops with more efficient SplitSeq
Signed-off-by: yumeiyin <yin.yumei@qq.com>
2025-07-14 16:21:15 +08:00
Yuriy Losev
46b1a41631 Add release labels to the release Metadata
Signed-off-by: Yuriy Losev <yuriy.losev@flant.com>
2025-07-09 11:30:22 +04:00
Matthieu MOREL
157f0ba10a chore: enable thelper
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-16 10:25:08 +02:00
Justen Stall
280a9ddbdb
Merge branch 'main' into stdlib-errors-2
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:13:10 -04:00
Mike Delucchi
e1425f1aa5 fix: correct webhook order to match Kubernetes admission flow
Place APIService before webhooks, with MutatingWebhookConfiguration
before ValidatingWebhookConfiguration to match standard admission control.

Signed-off-by: Mike Delucchi <git@zanuka.com>
2025-04-08 19:05:55 -07:00
Mike Delucchi
1003a3c93f fixes kind_sorter_test to match new order
Signed-off-by: Mike Delucchi <git@zanuka.com>
2025-04-08 19:05:55 -07:00
Mike Delucchi
c121b6b83e changes order of operations
Signed-off-by: Mike Delucchi <git@zanuka.com>
2025-04-08 19:05:55 -07:00
zanuka
9b636902c6 updates mutate and validate web hook configs
Signed-off-by: Mike Delucchi <git@zanuka.com>
2025-04-08 19:05:55 -07:00
Robert Sirchia
848c134e0c
fixing error messages
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-28 16:14:48 -05:00
Robert Sirchia
c2e6ed8ae5
fixing build error
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-28 08:22:53 -05:00
Robert Sirchia
8887d01791
fixing issues with my PR
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-27 15:47:28 -05:00
Robert Sirchia
c36bc25fb1
fixing missing attributes
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-27 14:48:29 -05:00
Robert Sirchia
1ad79a2bb7
converting inline log to slog
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-27 14:21:57 -05:00
Matt Farina
e711488970
Move pkg/release to pkg/release/v1 to support v3 charts
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>
2025-02-26 10:14:15 -05:00
Matt Farina
61d3eca55c
Move pkg/chart to pkg/chart/v2 to prepare for v3 charts
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>
2025-02-25 15:20:44 -05:00
Matt Farina
18ca7c1002
Move pkg/releaseutil to pkg/release/util
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>
2025-02-24 14:58:51 -05:00
Chris Berry
cde407b7d1 Add hook annotations to output pod logs to client on success and fail
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:30:29 +00:00
Matt Farina
2236294119 Updating to helm.sh/helm/v4
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>
2024-12-26 16:33:51 -05:00
Niladri Halder
d351b091ca
Add annotations and dependencies to get metadata output
The output of helm get metadata includes a subset of the fields contained in
the chart.Metadata struct. This change adds the values of the annotations field
and the dependencies field to the output.

Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
2024-10-04 11:22:35 +05:30
Nathan Baulch
ef85fa7f2d
Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Soujanya Mangipudi
ffa19a4b5d Addressing review comments - move printing code out of client.go
Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix circleci tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix formatting errors

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix gofmt issue

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>
2022-09-09 13:29:19 -07:00
Soujanya Mangipudi
9d5be803bc feat(helm): Supporting helm3 to show up resource names that were deployed as part of release in helm status command
Creating a new PR based on this existing stale PR https://github.com/helm/helm/pull/7728

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

# Conflicts:
#	go.sum
2022-09-09 13:28:48 -07:00
Josh Soref
2bf8fdf45d
chore: Spelling (#9410)
* spelling: annotate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: asserts

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: behavior

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: binary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: contain

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: copied

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: depending

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: deprecated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: doesn't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: donot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: github

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: inputting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: iteration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: jabberwocky

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubernetes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: length

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mismatch

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: outputs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: panicking

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: plugins

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parsing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: porthos

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: regular

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: resource

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repositories

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: something

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: strict

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: string

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-15 21:11:57 -04:00
Matthew Fisher
198f403688
Merge pull request #8590 from Foxboron/morten/fix-go1.15
release/mock: Ensure conversion from int to string yields a string
2020-08-20 08:07:04 -07:00
Morten Linderud
83a5e620d0
release/mock: Ensure conversion from int to string yields a string
With the release of go 1.15, the test-suite doesn't pass as `go test` got
a new warning for improper `string(x)` usage.

https://golang.org/doc/go1.15#vet

    $ make test-unit
    # helm.sh/helm/v3/pkg/release
    pkg/release/mock.go:56:27: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
    [snip]
    make: *** [Makefile:82: test-unit] Error 2

This patch changes ensures we are utilizing `fmt.Sprint` instead as
recommended.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2020-08-12 23:04:02 +02:00
Dmitry Chepurovskiy
266c74f390
Move selector filtering after latest release version filtering
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:20:53 +03:00
Dmitry Chepurovskiy
99bd709530
Pass labels from secret/configmap to release object
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:18:50 +03:00
Cristian Klein
9a4f4ec64b fix(helm): Avoid corrupting storage via a lock
If two `helm upgrade`s are executed at the exact same time, then one of
the invocations will fail with "already exists".

If one `helm upgrade` is executed and a second one is started while the
first is in `pending-upgrade`, then the second invocation will create a
new release. Effectively, two helm invocations will simultaneously
change the state of Kubernetes resources -- which is scary -- then two
releases will be in `deployed` state -- which can cause other issues.

This commit fixes the corrupted storage problem, by introducting a poor
person's lock. If the last release is in a pending state, then helm will
abort. If the last release is in a pending state, due to a previously
killed helm, then the user is expected to do `helm rollback`.

Closes #7274

Signed-off-by: Cristian Klein <cristian.klein@elastisys.com>
2020-07-13 22:54:52 +02:00
Matthew Fisher
fc6d6d3605
Merge pull request #6979 from lindhe/explain_revision_version_in_get
Add comments about release Version variable
2020-07-07 09:20:45 -07:00
Andreas Lindhé
de1996e500 Add comments about release Version variable
I was looking into the `get` command, and got tripped up by the
`Version` variable. It was unclear to me what Version represents, since
it's called REVISION when doing e.g., `helm list`.

But even after knowing this, it was not very clear to me why we
(implicitly) set the Version variable to 0 but never seem to use it.
`mhickey` explained to me on Slack that this gets the latest revision of
the release. Makes sense, but I added a comment about that too, to
clarify.

Signed-off-by: Andreas Lindhé <andreas@lindhe.io>
2020-01-09 21:41:13 +01:00
Josh Soref
02ad2b1187 Spelling (#7258)
* spelling: constraint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cryptographic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: doesnot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: don't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unexpected

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dreadnought

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: default

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: envvars

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: evaluates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: execute

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: extractor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: frobnitz

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: generated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: jabba

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: keywords

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubernetes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: override

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: package

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parsable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: progress

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recursively

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: release

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cache

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: representing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: serializer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subchart

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utilities

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2019-12-18 12:04:08 +00:00
Jason Pickens
0eaa881c4e Add missing statuses to the status help text (#7035)
Signed-off-by: Jason Pickens <jasonpickensnz@gmail.com>
2019-12-16 14:47:24 +00:00
Taylor Thomas
4d7968f692 ref(time): Adds wrapper for most time stdlib methods
Any method that had a function parameter that was a `Time` or returned a
`Time` is now wrapped so you can use our time wrapper without any weird conventions

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-16 08:47:52 -06:00
Taylor Thomas
aa429e150a feat(*): Adds custom time package for better marshalling
This package mainly exists to workaround an issue in Go
where the serializer doesn't omit an empty value for time:
https://github.com/golang/go/issues/11939. This replaces all
release and hook object time references with the new time package
so things actually marshal correctly

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-15 14:13:19 -06:00
Martin Hickey
f12be4c4b6
Port #4078 to Helm v3 (#6619)
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-10-11 09:03:36 +01:00