Commit graph

58 commits

Author SHA1 Message Date
Chris Berry
4cb639ed4e
Fix lint
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 18:55:47 -05:00
Chris Berry
ca90972b3d
Add hook annotations to output pod logs to client on success and fail
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 18:54:56 -05:00
Marcin Owsiany
a6863a64ce Drop unused field.
Signed-off-by: Marcin Owsiany <porridge@redhat.com>
2024-04-04 11:14:23 +02:00
Matt Farina
847369c184
Update to Go 1.21 for builds
Noteis:
1. This moves golangci scanning to a GitHub action. This will
   enable inline pointers to issues in the PR where linting fails.
2. Go 1.21 is specified in the go.mod because Kubernetes libs
   require it.
3. The lint issues were removed. Some were fixed while others
   were handled by skipping linting or using _ as an argument.
   Many of these can be refactored later for better cleanup.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-01-08 15:48:36 -05:00
Joe Julian
2b9f4991d6
Merge remote-tracking branch 'upstream/main' into priorityclassorder 2023-08-07 18:09:48 -07:00
Matt Farina
50c22ed7f9
Bump the Go version
Needed to gofmt source to meet changes in style

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:29:26 -04:00
Stepan Dohnal
f46eaf2f1b Add priority class to kind sorter
Signed-off-by: Stepan Dohnal <stepan.dohnal@datamole.cz>
2022-04-05 10:56:05 +02:00
stephanECD
0361dc8568 Add IngressClass to manifests to be (un)installed
Signed-off-by: StephanECD <87023735+stephanECD@users.noreply.github.com>
2022-02-04 11:34:32 +00:00
hzliangbin
146e0f9cc3 add kind_sorter support for SecretList
Signed-off-by: Bin Liang <hzliangbin@foxmail.com>
2020-05-21 18:23:00 +08:00
Matthew Fisher
193850a9e2
Merge pull request #7499 from bacongobbler/fix-7416
ref(helm): sort hooks by kind
2020-03-24 08:38:44 -07:00
Matthew Fisher
671ceb5514
ref(kind_sorter): use an in-place sort for sortManifestsByKind, reduce code duplication
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-02-06 14:05:15 -08:00
Daniel Strobusch
9a2ff7802f
fix(helm): sort hooks by kind for equal weight
Use the same install order for hooks as for normal resources (non-hooks) for hooks with equal weight.
This makes resource handling more consistent and helps, when there are hook consisting of several resources like e.g. a service account and a job using this service account.

The sort functions are changed from an in place search to an out of place sort to avoid inout parameters.

Closes #7416.

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2020-01-23 09:07:06 +01:00
Dao Cong Tien
10b44a114d Add unit test for Reverse() in pkg/releaseutil.go
Signed-off-by: Dao Cong Tien <tiendc@vn.fujitsu.com>
2020-01-17 09:11:03 +07:00
Bradley Skuse
e2946c7e34 Fix: helm3 - kind sorter incorrectly compares unknown and namespace
Signed-off-by: Bradley Skuse <bradleyskuse@me.com>

Fix style error from CI

Signed-off-by: Bradley Skuse <bradleyskuse@me.com>

Fix: helm3 - kind sorter incorrectly compares unknown and namespace

Fix: helm3 - kind sorter incorrectly compares unknown and namespace

Fix: helm3 - kind sorter incorrectly compares unknown and namespace
2020-01-14 21:59:14 +08:00
Matthew Fisher
7432fdc9ef
Merge pull request #7355 from dastrobu/#7159-cannot-install-service-account-token-due-to-install-order
fix(helm): move ServiceAccount before Secret in InstallOrder.
2020-01-08 10:04:33 -08:00
Daniel Strobusch
08663e6bb3
fix(helm): move ServiceAccount before Secret in InstallOrder.
Service accounts must be installed before secrets when service account tokens (secrets) are be managed by Helm. Otherwise Kubernetes will delete any service account token right after creation, since there is no service account mounting the token (see https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#token-controller)

Closes #7159.

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2020-01-08 18:54:08 +01:00
Andreas Sommer
4d8160eedf feat(template): process manifests in file path order, then in order found in each file (before sorting manifests)
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
2019-12-16 20:51:22 +01:00
Taylor Thomas
6a91263e38 fix(releaseutil): Removes API version checks from kind sorter
The sorting method for manifests contained a check to see if the API
version existed. This violates separation of concerns as the sorter
should just sort and leave validation to other parts of the code.

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-29 11:13:03 -06:00
Taylor Thomas
93abfd75ad Remove reference to stdtime to reduce confusion
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-16 21:01:52 -05: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
Dmitry Tokarev
1da0d011f9 Added NetworkPolicy, PodDisruptionBudget, and PodSecurityPolicy to InstallOrder. (#6624)
Port #6266 #4769 #3899 to Helm 3.

Signed-off-by: Dmitry Tokarev <dm.tokarev@yahoo.com>
2019-10-10 12:41:55 +01:00
Matt Farina
9bc7934f35
Updating the module for v3 as the major version
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 14:27:05 -04:00
Jacob LeGrone
7f532b4917
doc(hooks): note helm 2 test annotation support requirement
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-07-31 15:33:56 -04:00
Jacob LeGrone
72127c391c
feat(test): define tests as Jobs and allow arbitrary supporting resources
This updates commands install, upgrade, delete, and test to share the
same implementation for hook execution.

BREAKING CHANGES:
- The `test-failure` hook annotation is removed.

Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-07-31 15:33:56 -04:00
Seb Ospina
1469a78029 Added List mode for Role, ClusterRole and Bindings
Signed-off-by: Seb Ospina <kraige@gmail.com>
2019-07-27 16:19:16 +02:00
Constantin Bugneac
512f67de14 Added HorizontalPodAutoscaler to sort order.
Signed-off-by: Constantin Bugneac <constantin.bugneac@worldfirst.com>
2019-07-20 08:13:14 +01:00
Oleg Sidorov
ec440d446d Replaced ghodss/yaml with sigs.k8s.io/yaml
This commit replaces usage of github.com/ghodss/yaml with it's forked
version maintained by SIG community. The replaced library has
low-to-none support activity unlike the latter. We believe the new
Helm branch could benefit from using the community-supported version on
a long-term run as yaml parser is a key component of Helm chart rendering
engine.

This commit locks sigs.k8s.io/yaml dependency version on 1.1.0 which
is backwards compatible with ghodss/yaml 1.0.0.

This change also resolves the outdated dependency version lock for
ghodss/yaml (currently 1.0.0) and makes it possible to port changes from
https://github.com/helm/helm/pull/6010 to dev-v3.

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
2019-07-12 16:52:15 +02:00
Matthew Fisher
da83115510
Merge pull request #5539 from jan25/fix-list-sorting-5499
fix(helm): sort release list with flags --reverse and --date
2019-06-05 13:09:23 -07:00
Adam Reese
097834de0a
ref(pkg/chartutil): remove k8s version object dependency
Flattens the `.Capabilities` built-in and removes useless kubernetes
runtime metadata.

Signed-off-by: Adam Reese <adam@reese.io>
2019-05-07 13:49:05 -07:00
Abhilash Gnan
d40f3c63ea fix ByDate sorter to use Time.Unix()
Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
2019-04-08 20:40:01 +02:00
Adam Reese
271e4cf111
fix(cmd/template): allow setting release name for template
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-18 22:56:18 -07:00
Adam Reese
14d8e97d2a
fix(*): resolve new govet issues
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-18 12:45:20 -07:00
Adam Reese
895e9192d4
feat(*): use vanity import helm.sh/helm
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-13 13:43:47 -07:00
Matthew Fisher
2571dbf82f
ref: remove pkg/helm, pkg/hapi, pkg/tiller
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-03-12 09:47:12 -07:00
Adam Reese
21d3a40f3b
feat(tests): replace gometalinter with golangci-lint
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-08 11:45:42 -08:00
Adam Reese
e51a9b90c9
Merge pull request #5284 from adamreese/v3/make-format
feat(Makefile): add formatting target
2019-02-14 23:40:50 -08:00
Martin Hickey
45fb4b1c44 Fix linter warnings
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-02-12 18:18:33 +00:00
Adam Reese
f791421fab
feat(Makefile): add formatting target
Signed-off-by: Adam Reese <adam@reese.io>
2019-02-08 12:24:47 -08:00
Matt Butcher
425f7a6f6c
feat: add 'pkg/action' for list operations (#5077)
* feat: add pkg/action to encapsulate action logic

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* feat: replace client/server internals with action package

While we removed Tiller, we left the internal client/server architecture mostly intact. This replaces that architecture with the `pkg/action` package.

This implements the action package for list, but nothing else.

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* feat: Add install and refactor some tests

This adds install to the action package, and then fixes up a lot of testing.

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* fix: Move a bunch of sorters to the releaseutils package

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* fix: updated APIs and fixed a failed test

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* Use var for timestamper, instead of adding as a struct field

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2019-01-07 17:45:14 -07:00
Adam Reese
2b81eea1e2
ref(*): replace byte array with map for Release config
Signed-off-by: Adam Reese <adam@reese.io>
2018-12-04 15:57:24 -08:00
Adam Reese
4f26b658d8
change copyright to "Copyright The Helm Authors" 2018-08-24 12:03:55 -07:00
Adam Reese
f012940d9c
ref(*): refactor chart/chartutil
ref(chartutil): move chart loading out of chartutil into new package
    add chart loader interface to allow lazy loading
feat(chart): create chart accessors
ref(*): cleanup requirements
ref(tiller): remove optional template engines
ref(tiller): simplify sorting releases and hooks
ref(*): code simplification
ref(hapi): move chart package out of hapi
ref(chart): add requirements and lock to Chart struct
2018-08-24 11:28:29 -07:00
Matthew Fisher
195d21d5d7
ref(cmd): rename helm delete to helm uninstall
To match the convention of `helm install`, `helm uninstall` is the inverse.

Other tangential changes in this PR:

- StatusDeleting has been changed to StatusUninstalling
- StatusDeleted has been changed to StatusUninstalled
- `helm list --deleted` has been changed to `helm list --uninstalled`
- `helm list --deleting` has been changed to `helm list --uninstalling`
- `helm.DeleteOption` and all delete options have been renamed to `helm.UninstallOption`

I have not made any changes to the "helm.sh/hook-delete-policy", "pre-delete" and "post-delete" hook annotations because

1. it's a major breaking change to existing helm charts, which we've commited to NOT break in Helm 3
2. there is no "helm.sh/hook-install-policy" to pair with "helm.sh/hook-uninstall-policy", so delete still makes sense here

`helm delete` and `helm del` have been added as aliases to `helm uninstall`, so `helm delete` and `helm del` still works as is.
2018-06-14 15:46:00 -07:00
Adam Reese
3b9596c6ab
ref(*): convert const types to strings 2018-04-26 16:52:31 -07:00
Adam Reese
c5a76deba3
ref(*): use go conventions for naming types 2018-04-19 11:12:46 -07:00
Adam Reese
91a6ebfed5
ref(*): remove protobuf timestamps 2018-04-18 15:35:37 -07:00
Adam Reese
6345f04190
ref(hapi): convert protobuf to go types 2018-04-18 14:53:38 -07:00
Michelle Noorali
dcfbb2bd35 fix(releaseutil): remove newline on SplitManifests
fixes #2158
2017-05-02 14:48:08 -04:00
Adam Reese
85c41ef11a ref(*): kubernetes v1.6
Rebase on kubernetes v1.6
2017-04-11 15:42:23 -07:00