Commit graph

1300 commits

Author SHA1 Message Date
Taylor Thomas
f6116a7ca9 Fixes issues with delete
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-30 11:51:39 -06:00
Taylor Thomas
15fc57f8a3 ref(*): Refactors kube client to be a bit more friendly
This changes most of the KubeClient interface to only ever build objects once and
then pass in everything as lists of resources. As a consequence, we needed to refactor
several of the actions. I took the opportunity to refactor out some duplicated
code while I was in the same area

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-30 11:51:39 -06:00
Taylor Thomas
1dac8421ef ref(kube): Renames Result type to ResourceList
`Result` is a misnomer and is going to be repurposed in a future commit for a
common result type for the different kube `Interface` methods

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-30 11:51:39 -06:00
Martin Hickey
5906b9dfee Fix style conformance issue
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-07-30 16:00:18 +01:00
Taylor Thomas
e258418837
Merge pull request #6066 from ian-howell/fix/6044
fix(engine): Fix eating too many colons during template execution
2019-07-29 14:56:37 -06:00
Ian Howell
c92e3351f7 Switch to a more unique delimiter for template execution errors
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
2019-07-29 15:39:44 -05:00
Martin Hickey
8e7905c7a8
Merge pull request #6106 from hickeyma/upd-scaffold-api-ver
Feat(*): Update scaffold chart to v2 apiVersion
2019-07-29 20:39:13 +01:00
Martin Hickey
5410e7d346 Fix style conformance issues
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-07-29 19:17:35 +01:00
Martin Hickey
149da7c77e Update scaffold chart to v2 apiVersion
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-07-29 19:02:59 +01:00
Matt Farina
095ba431aa
Merge pull request #6095 from mattfarina/remove-stable
Removing the stable repository
2019-07-29 09:32:00 -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
Matt Farina
670968fb19
Removing the stable repository
The stable repository provides a quick onboarding with a set of
community curated charts. Two problems with the community stable
repository has lead to its need to be removed.

1. The URL is hard coded to a Google Cloud bucket under Google's
   control. This was setup when Helm was part of Kubernetes and
   Kubernetes was a Google project. The bucket cannot be
   transfered to another non-Google controlled project. And,
   the bucket is not accessible in some parts of the world
   (e.g., China).
2. The number of charts in the stable repository has grown
   generally unmaintainable. The repository maintainers cannot
   manage the number of PRs coming it cauing delays in response
   or no response and PRs are automatically closed. This is
   a poor experience.

The alternatice is the Helm Hub that provides a central point of
search for many Helm repositories. Different people and organizations
can maintain their own charts. A central server is not needed as
Helm is setup to be distributed.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-07-26 12:27:18 -04:00
hd-rk
7ad1d522b3 test: add test
Signed-off-by: hd-rk <hdn314159@gmail.com>
2019-07-26 19:18:20 +08:00
hd-rk
6d3eb81943 fix: use repo default client to download index
Signed-off-by: hd-rk <hdn314159@gmail.com>
2019-07-26 14:49:53 +08:00
hd-rk
71c2bba69d fix: call chartutil.ProcessDependencies in action.Install
Signed-off-by: hd-rk <hdn314159@gmail.com>
2019-07-25 22:58:30 +08:00
Matthew Fisher
63d7a0c2cf
Merge pull request #6070 from bacongobbler/fix-6059
Use chart version as default tag when saving
2019-07-23 14:41:56 -07:00
Matthew Fisher
2045fab01f
ref(action): remove ParseReferenceWithChartDefaults
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-23 14:33:23 -07:00
Matthew Fisher
97e7461e41
Merge pull request #6049 from bacongobbler/helm-template-schema-validation
feat(template): introduce --validate
2019-07-23 09:37:39 -07:00
Ian Howell
31b940a61d fix(engine): Fix eating too many colons during template execution
This fixes #6044, in which error parsing is greedily eating too many
colons, preventing users from using colons in their warning messages to
the `required` function

Signed-off-by: Ian Howell <ian.howell0@gmail.com>
2019-07-23 11:33:03 -05:00
Martin Hickey
7ddd3f482e
Merge pull request #6038 from liuliqiang/dev-v3
Fix paths in the ingress template and values file written by helm create
2019-07-23 14:44:37 +01:00
Liu Liqiang
49120340d3 Fix paths in the ingress template and values file written by helm create
Signed-off-by: Liu Liqiang <liuliqiang@smartx.com>
2019-07-23 17:25:47 +08:00
Matthew Fisher
4f6d002d6c
chore(docs): move docs to helm-www
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-22 12:15:35 -07:00
Josh Dolitsky
b3fd254991 Use chart version as default tag when saving
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
2019-07-22 10:24:52 -05:00
Martin Hickey
712c850ac5
Merge pull request #6047 from Constantin07/add_hpa_to_sorting_order_port_to_v3
Add hpa to sorting order (port to v3)
2019-07-22 10:41:23 +01: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
Matthew Fisher
7de91248ce
feat(template): introduce --validate
This feature flag allows `helm template` to be used against a live cluster. Some charts need CRDs to be applied to the cluster before calling `helm install`. This allows users to validate their templates will render with those resources set.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-19 12:27:14 -07:00
Matthew Fisher
880f4456b3
Merge pull request #6046 from bacongobbler/fix-5654
fix(kube): remove namespace enforcement
2019-07-19 08:48:48 -07:00
Matthew Fisher
b5d555e4ea
fix(kube): remove namespace enforcement
This fixes an issue where resources that hardcode the metadata.namespace parameter cannot be installed.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-19 08:07:07 -07:00
Taylor Thomas
2c397b6879
Merge pull request #6011 from thomastaylor312/feat/atomic
feat(*) Adds atomic flag to v3
2019-07-18 10:14:21 -06:00
Matthew Fisher
6e60242a18
ref(getter): change NewHTTPGetter and NewPluginGetter to return type Getter
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-18 09:07:03 -07:00
Matthew Fisher
2800c56f9d
ref(downloader): pass in options to ChartDownloader
This restores the ability to pass in parameters at runtime to the
ChartDownloader, enabling users to pass in parameters like the --username
and --password flags.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-18 09:00:08 -07:00
Matthew Fisher
d23d68d51c
Merge pull request #5881 from torstenwalter/template
helm 3: support writing multiple resources to the same file
2019-07-17 09:51:34 -07:00
Torsten Walter
ec038337a4
support writing multiple resources to the same file
Signed-off-by: Torsten Walter <mail@torstenwalter.de>
2019-07-17 17:55:50 +02:00
Oleg Sidorov
f94bac0643 chartutil.ReadValues is forced to unmarshal numbers into json.Number refs #1707 [dev-v3]
Backport of https://github.com/helm/helm/pull/6010 to dev-v3 (the
description below is a copy-paste from the original v2 branch PR).
As https://github.com/helm/helm/pull/6016 is now merged to dev-v3, the
change is reasonably trivial.

This change is an attempt to address the common problem of json number
unmarshalling where any number is converted into a float64 and
represented in a scientific notation on a marshall call. This behavior
breaks things like: chart versions and image tags if not converted to
yaml strings explicitly.

An example of this behavior: k8s failure to fetch an image tagged with a
big number like: $IMAGE:20190612073634 after a few steps of yaml
re-rendering turns into: $IMAGE:2.0190612073634e+13.

Example issue: #1707

This commit forces yaml parser to use JSON modifiers and explicitly
enables interface{} unmarshalling instead of float64. The change
introduced might be breaking so should be processed with an extra care.

Due to the fact helm mostly dals with human-produced data (charts), we
have a decent level of confidence this change looses no functionality
helm users rely upon (the scientific notation).

Relevant doc: https://golang.org/pkg/encoding/json/#Decoder.UseNumber

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
Signed-off-by: Oleg Sidorov <me@whitebox.io>
2019-07-17 10:30:51 +02:00
Matt Farina
84d0f231e8
Merge pull request #6016 from icanhazbroccoli/icanhazbroccoli-dev-v3-sigs-yaml
Replaced ghodss/yaml with sigs.k8s.io/yaml [dev-v3]
2019-07-15 17:28:01 -04:00
steven-sheehy
1064934105 Add sub-command support to plugin downloader
Signed-off-by: steven-sheehy <steven@steven-laptop.local>
2019-07-14 17:36:51 -05: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
Taylor Thomas
29c343278e feat(action): Refactors unit tests with better fakes
This also adds unit tests for the Atomic and Wait functionality

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-11 14:45:05 -06:00
Taylor Thomas
93d07c862d feat(*): Adds back --atomic functionality to Helm 3
This does not include the cleanup on fail logic as that will be reintroduced
in a future PR

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-11 14:45:00 -06:00
Andrew Rudoi
09e1f8aeb1 chore: add ValueOptions constructor
Signed-off-by: Andrew Rudoi <arudoi@newrelic.com>
2019-07-11 09:18:15 -07:00
Matt Farina
ff818fceca
Merge pull request #5860 from mattfarina/moar-capabilities-v3
Expose the resource types in addition to the api group/version in templates
2019-07-09 13:58:01 -04:00
Taylor Thomas
51ad3cd357 ref(*): Refactors the history action to return releases instead of formatted output
Output utilities have been moved to their own file and streamlined as well

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-08 15:28:51 -06:00
Taylor Thomas
eaa7d8c7c4 feat(wait): Adds smarter waiting for DaemonSets and StatefulSets
The partition and maxUnavailable values are now used in determining the state
of both objects

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-08 10:05:48 -06:00
Marc Khouzam
81321532e6 Fix linter issuers
Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca>
2019-07-05 08:07:03 -04:00
Taylor Thomas
61578de6a0
Merge pull request #5970 from thomastaylor312/fix/missing_wait
fix(pkg/action): Adds back in missing wait functionality
2019-07-03 14:24:21 -06:00
Josh Dolitsky
240dd53e78
Helm 3: set custom manifest config media type on chart push (#5719)
* set custom manifest config media type

Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>

* use v1 for manifest schema

Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>

* remove unneeded debug flag

Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>

* update to new config media type

Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
2019-07-03 15:00:16 -05:00
Taylor Thomas
d031651c45 fix(pkg/action): Adds back in missing wait functionality
In my previous PR, I did not notice that the wait functionality had been completely removed
from the actions. This restores wait functionality to upgrade and rollback

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-03 13:05:47 -06:00
Matthew Fisher
e55a25bfeb
Merge pull request #5917 from bacongobbler/ref-getter-options
ref(getter): introduce Options for passing in getter parameters
2019-07-03 08:23:04 -07:00
Taylor Thomas
cf79b90867
Merge pull request #5961 from thomastaylor312/fix/wait
fix(pkg/kube): Fixes wait functionality
2019-07-02 16:53:36 -06:00
Taylor Thomas
c8c854a35c fix(pkg/kube): Fixes wait functionality
This reenables wait functionality and fixes some small bugs in the logic. Please
note that there are still some naive assumptions made about pods belonging to
DaemonSets and StatefulSets, but that is how the logic was before, so it was not
in scope to modify it for this PR. I will improve this logic in a follow up PR

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-02 16:45:34 -06:00