Commit graph

171 commits

Author SHA1 Message Date
Matthew Fisher
402fce389a
fix(chartutil): restore .Release.Revision
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-10-17 11:04:45 -07:00
Karuppiah Natarajan
dfed8ab5e3
fix install storing computed values in release
this was partially fixed in #6430 but the fix only
worked for values without nesting. this PR fixes it.
this is done by doing a deep copy of values rather
than a top level keys copy. deep copy ensures
values are not mutated during coalesce()
execution which leads to bugs like #6659

the deep copy code has been copied from:

https://gist.github.com/soroushjp/0ec92102641ddfc3ad5515ca76405f4d

which is in turn inspired by this stackoverflow answer:
http://stackoverflow.com/a/28579297/1366283

Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-17 16:37:19 +05:30
Aaron Mell
6a98d1f1d2 Code Review Changes
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-14 13:14:14 -05:00
Aaron Mell
4eca26e4e1 Modified the scope of Kubeconfig so it could be set outside an env variable.
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-14 13:14:14 -05:00
Taylor Thomas
01e593fbcd fix(action): Fixes ordering of variable binding
The recent init action config switched the order of how variables get bound
and where. This led to the namespace variable not being propagated down into
the calls to kubernetes.

Co-authored-by: Matthew Fisher <matt.fisher@microsoft.com>
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-11 11:41:57 -06:00
Taylor Thomas
da72944611
Merge pull request #6640 from thomastaylor312/feat/parse_pre_release
feat(lint): Ports v2 functionality for linting pre-release charts
2019-10-11 10:42:48 -06:00
Taylor Thomas
0ba959af0d feat(lint): Ports v2 functionality for linting pre-release charts
This is a port of #5177

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-10 16:58:47 -06:00
Jacob LeGrone
2d983f27e7
feat(hooks): never delete CustomResourceDefinitions
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-10-10 18:30:57 -04:00
Jacob LeGrone
34d685f8bf
feat(hooks): set default deletion policy to before-hook-creation
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-10-10 18:30:57 -04:00
Matthew Fisher
0227ade173
Merge pull request #6363 from jlegrone/refactor-test-command
Remove run test subcommand and --cleanup flag, print test status
2019-10-10 15:24:14 -07:00
Jacob LeGrone
0645b92c1b
Print test status
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-10-10 17:50:26 -04:00
Jacob LeGrone
6f18519957
Remove test --cleanup flag
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-10-10 15:11:53 -04:00
Aaron Mell
1d66a676c8 Moved the GetNamespace and KubeConfig function from action to cli
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 13:35:46 -05:00
Aaron Mell
3264b75378 Refactoring after rebasing with latest
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 13:35:23 -05:00
Aaron Mell
01d7657c1e Another Code review change
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 13:34:25 -05:00
Aaron Mell
851e016e90 Reverted previous commit, changes based on code review feedback.
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 13:34:25 -05:00
Aaron Mell
1ca2ab1d8d Moving actionInit from cmd/helm/helm to pgk/action/action to make it easier to instantiate the configuration
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 13:34:24 -05:00
Taylor Thomas
6cfd47784b
Merge pull request #6625 from Dean-Coakley/get-output-cmd
fix(cmd): Add --output option to get values
2019-10-09 16:39:11 -06:00
Dean Coakley
3c899d0bde Add get values table output headers
Signed-off-by: Dean Coakley <dean.s.coakley@gmail.com>
2019-10-09 23:08:22 +01:00
Dean Coakley
66268d9eee fix(cmd): Add --output option to get values
Signed-off-by: Dean Coakley <dean.s.coakley@gmail.com>
2019-10-09 23:08:12 +01:00
Adam Reese
1e20ebae35
fix(pkg/kube): validate with OpenAPI on install
Signed-off-by: Adam Reese <adam@reese.io>
2019-10-09 14:25:47 -07:00
Adam Reese
442c3588e4
Merge pull request #6599 from adamreese/feat/validation
feat(pkg/kube): add openapi validation for k8s objects
2019-10-09 09:23:52 -07:00
Adam Reese
572b92dc8a
feat(pkg/kube): add openapi validation for k8s objects
Add back OpenAPI validation for kubernetes objects.

Fixes: #6382

Signed-off-by: Adam Reese <adam@reese.io>
2019-10-08 12:55:19 -07:00
Taylor Thomas
62ed7b3764
Merge pull request #6594 from thomastaylor312/feat/template_api_versions
feat(template): Ports api-versions flag to v3
2019-10-08 10:18:07 -06:00
Taylor Thomas
0210d43a66
Merge pull request #6550 from thomastaylor312/fix/missing_debug
fix(cmd): Fix all the outputs
2019-10-07 14:03:11 -06:00
Taylor Thomas
59d3488d1c feat(template): Ports api-versions flag to v3
This is a port of #5392. It also takes care of the small chore to update the default k8s
version to 1.16, which is the latest supported version

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-07 13:30:06 -06:00
Taylor Thomas
3d64c6bb54 ref(cmd): Implement flag parsing for output format
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-07 12:58:36 -06:00
Taylor Thomas
768d27b387 ref(*): Refactors output into its own package
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-07 10:09:28 -06:00
Matthew Fisher
0ae0f0742d
fix(action): fix import statement
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-10-05 11:51:10 -07:00
Matthew Fisher
02999565a4
Merge pull request #6556 from karuppiah7890/conditional-dependencies-not-working-v3
fix(pkg/action): fix conditional dependencies not working with reuse values
2019-10-05 11:00:28 -07:00
Matthew Fisher
c1e63a2a17
Merge pull request #6536 from karuppiah7890/fix-lint-for-no-package-found
fix silent lint ignore for non existing packaged charts
2019-10-05 10:57:26 -07:00
Karuppiah Natarajan
bb9426c4e2
fix(pkg/lint): fix lint silently ignoring non existing packaged charts
Closes #6428

Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-04 21:28:16 +05:30
Taylor Thomas
3799d0024c fix(cmd): Fix all the outputs
There were two different methods and varying ways to output the status of a release.
This standardizes all of the outputs, but requires a breaking change. Output will
not perfectly match previous v3 output, and we had to break the printing function
in the `action` package, but now things are much more standardized.

Fixes #6238

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-03 17:03:19 -06: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
Matt Farina
967f4fed42
Update dependencies
* Kubernetes updated to 1.16.1
* SemVer and Sprig updated to latest releases that leverage go
  modules
* Tests and checks updated. These already landed in v2 via PR 6457

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 13:49:07 -04:00
Matthew Fisher
c1fc24c84e
Merge pull request #6386 from VilledeMontreal/fix/testrunnocluster
Check connectivity to cluster for helm test run
2019-10-02 11:40:40 -07:00
Karuppiah Natarajan
337f52c566
fix(pkg/action): fix conditional dependencies not working with reuse values
Closes #6530

Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-02 19:33:19 +05:30
Taylor Thomas
6ccb2897d9 PR fixes
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-01 13:38:57 -06:00
Taylor Thomas
36f3a4b326 fix(action): Protects against current resource conflicts
Currently, if using the --atomic flag or deleting a release that failed due to an already existing
resource, Helm will deleting those resources that aren't managed by it. This PR fixes the issue
by checking for pre-existing resources during install and upgrade. This is done as a validation
step so the release will not even be started if resources currently exist. This PR is inspired by
@xchapter7x's work in #3477.

This also fixes a small bug in upgrade where deletes fail if the resource was already deletes

Fixes #6407

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-09-30 16:11:40 -06:00
Martin Hickey
26dacf84aa
feat(cmd): Port child NOTES.txt rendering to Helm 3 (#6512)
* Port Helm 2 PR 4088 to Helm 3

Not a direct port as is but refactored for Helm 3.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Update unit test to test string retunred for different order

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-09-30 16:40:33 +01:00
Taylor Thomas
eac6a60001 feat(*): Ports all output functionality from v2
As part of this port, I removed some now superfluous code from the `action` package.
This is technically a breaking change, but since the package was introduced in v3, it
is highly unlikely anyone is using it and we are still within the beta window.

Also closes #6437

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-09-25 16:07:10 -06:00
Matthew Fisher
261e5b00ac
Merge pull request #6491 from bacongobbler/port-5700
fix(action): typo
2019-09-24 21:32:14 -07:00
Matthew Fisher
faa9048580
Merge pull request #6486 from bacongobbler/fix-6452
fix(action): invalidate discovery client cache on startup
2019-09-24 11:29:28 -07:00
Matthew Fisher
9742c8c5a2
fix(action): typo
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-09-24 10:57:35 -07:00
Taylor Thomas
6419ff6961
Merge pull request #6480 from thomastaylor312/feat/cleanup_on_fail
feat(*): Ports `--cleanup-on-fail` to v3
2019-09-24 10:42:10 -06:00
Matthew Fisher
1b0b843d6a
fix(action): invalidate discovery client cache on startup
we want to force a cache invalidation to ensure that the Capabilities object always has the latest information from the server (Kubernetes server version, available API versions, etc). `kubectl version` forces a cache invalidation every time it's invoked, so this seems like a safe change that is identical to kubectl's behaviour.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-09-24 09:14:29 -07:00
Matthew Fisher
3e891dbde9
Merge pull request #6425 from AndiDog/helm-template-no-reachability-check
Fix reachability check which must be disabled for `helm template` (unless `--validate` is specified)
2019-09-24 08:36:53 -07:00
Taylor Thomas
17854e83af feat(*): Ports --cleanup-on-fail to v3
This ports the functionality of cleanup on fail to v3 as introduced in #4871. This has been tested manually
and would be a good candidate for a new acceptance test.

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-09-23 16:13:02 -06:00
Matthew Fisher
4971ed5077
fix(list): scrub list returned from .List()
This way only the latest release is displayed with `helm list`.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-09-23 15:00:16 -07:00
Andreas Sommer
3a843df1ff Fix reachability check which must be disabled for helm template (unless --validate is specified)
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
2019-09-16 13:13:05 +02:00