* This was initiated by new versions from Masterminds
* Linting was set to check for the same chart version as the other
checks of this were. >0.0.0-0. The -0 is important to pull in
prereleases. The latest version of semver Validate now finds
errors here properly where some were missed before
* 0.0.0 is a valid semantic version. Instead of expecting it to be
invalid in the tests to check validation now using an invalid
semantic version
Signed-off-by: Matt Farina <matt@mattfarina.com>
When waiting for resources use the `ListWatchUntil` instead of
`UntilWithoutRetry` so that if the connection drops between tiller and
the API while waiting the operation can still succeed.
Signed-off-by: Richard Connon <richard.connon@oracle.com>
Probably since K8s 1.13.x, `converter.ConvertToVersion(info.Object, groupVersioner)` which is the body of `asVersioned` doesn't return an error or an "unstructured" object, but `apiextensions/v1beta1.CustomResourceDefinition`.
The result was `helm upgrade` with any changes in CRD consistently failing.
This fixes that by adding an additional case of the conversion result being `v1beta1.CustomResourceDefinition`.
This is a backward-compatible change as it doesn't remove existing switch cases for older K8s versions.
Fixes#5853
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
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: https://github.com/helm/helm/issues/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>
- These are the capabilities as of k8s 1.14
- They are generated because getting them at runtime uses so much
memory it causes CI errors
Signed-off-by: Matt Farina <matt@mattfarina.com>