This commit adds support for HelmRelease v1 resources with backwards
compatability for v1beta1 resources, it also reintroduces some of
the removed `integrations/` packages, as those resources have been
removed from the Helm operator.
The v1 resource is prioritized over v1beta1 resources, as Flux is
only aware of the resource kind and not the api version. The
prioritization means that if there are two resources with the same
namespace and name, Flux will only see the v1 resource. The fallback
is based on returned errors from the API, this comes at a cost, as
errors during the first try may actually be relevant.
The version of `github.com/fluxcd/helm-operator` has been pinpointed
on `1.0.0-rc1`.
Instead of requiring people to cut across from the old version of the
helm operator to the new, support both in fluxd.
This means you can not only have different versions of the custom
resources, you can keep running the old operator, while you transition
to the new.
To keep the `kind` part of Resource IDs unambiguous, I have renamed
the new custom resource to `HelmRelease` (it was already in the API
`flux.weave.works/v1beta`). This is the same as the kind bitnami's
helm operator uses, but the `apiVersion` is different (so Kubernetes
won't confuse them), and it's unlikely you'd be running both
operators.
- change the API group to flux.weave.works, which is shorter and
well, lots shorter.
- move the API types into integrations/apis
- change the FluxHelmRelease type (go) and definition (YAML) so you
can refer to charts either as a path in the git repo supplied to
the operator, or as a reference to a chart in an external chart
repo
- bump the version to v1beta1
- regenerate the deepcopy (integrations/apis/) and client
(integrations/client/) code
The old definition of helm.integrations.flux.weave.works are kept
around (though also moved into integrations/apis), so we can deal with
those resources in flux if we want to.
Reasons:
- Incorrect initial API vesrion, inconsistent with the Kubernetes one
- Breaking change in the FluxHelmRelease schema
(https://github.com/weaveworks/flux/pull/1035)
Note:
Associated changes made also in the example user repo
weaveworks/flux-helm-test