Documentation
¶
Index ¶
- Constants
- func ObserveRelease(start time.Time, action Action, dryRun, success bool, ...)
- func Values(corev1 k8sclientv1.CoreV1Interface, ns string, chartPath string, ...) (chartutil.Values, error)
- func ValuesChecksum(rawValues []byte) string
- type Action
- type DeployInfo
- type InstallOptions
- type Release
- func (r *Release) Delete(name string) error
- func (r *Release) GetUpgradableRelease(name string) (*hapi_release.Release, error)
- func (r *Release) Install(chartPath, releaseName string, hr helmfluxv1.HelmRelease, action Action, ...) (release *hapi_release.Release, checksum string, err error)
- func (r *Release) OwnedByHelmRelease(release *hapi_release.Release, hr helmfluxv1.HelmRelease) bool
- func (r *Release) Rollback(releaseName string, hr helmfluxv1.HelmRelease) (*hapi_release.Release, error)
- type Releaser
Constants ¶
const ( LabelAction = "action" LabelDryRun = "dry_run" LabelSuccess = "success" LabelNamespace = "namespace" LabelReleaseName = "release_name" )
Variables ¶
This section is empty.
Functions ¶
func ObserveRelease ¶
func Values ¶
func Values(corev1 k8sclientv1.CoreV1Interface, ns string, chartPath string, valuesFromSource []helmfluxv1.ValuesFromSource, values chartutil.Values) (chartutil.Values, error)
Values tries to resolve all given value file sources and merges them into one Values struct. It returns the merged Values.
func ValuesChecksum ¶
ValuesChecksum calculates the SHA256 checksum of the given raw values.
Types ¶
type DeployInfo ¶
type DeployInfo struct {
Name string
}
type InstallOptions ¶
type Release ¶
Release contains clients needed to provide functionality related to helm releases
func (*Release) GetUpgradableRelease ¶
func (r *Release) GetUpgradableRelease(name string) (*hapi_release.Release, error)
GetUpgradableRelease returns a release if the current state of it allows an upgrade, a descriptive error if it is not allowed, or nil if the release does not exist.
func (*Release) Install ¶
func (r *Release) Install(chartPath, releaseName string, hr helmfluxv1.HelmRelease, action Action, opts InstallOptions, kubeClient *kubernetes.Clientset) (release *hapi_release.Release, checksum string, err error)
Install performs a Chart release given the directory containing the charts, and the HelmRelease specifying the release. Depending on the release type, this is either a new release, or an upgrade of an existing one.
TODO(michael): cloneDir is only relevant if installing from git; either split this procedure into two varieties, or make it more general and calculate the path to the chart in the caller.
func (*Release) OwnedByHelmRelease ¶
func (r *Release) OwnedByHelmRelease(release *hapi_release.Release, hr helmfluxv1.HelmRelease) bool
OwnedByHelmRelease validates the release is managed by the given HelmRelease, by looking for the resource ID in the antecedent annotation. This validation is necessary because we can not validate the uniqueness of a release name on the creation of a HelmRelease, which would result in the operator attempting to upgrade a release indefinitely when multiple HelmReleases with the same release name exist.
To be able to migrate existing releases to a HelmRelease, empty (missing) annotations are handled as true / owned by.
func (*Release) Rollback ¶
func (r *Release) Rollback(releaseName string, hr helmfluxv1.HelmRelease) (*hapi_release.Release, error)
Rollback rolls back a Chart release if required
type Releaser ¶
type Releaser interface { GetUpgradableRelease(name string) (*hapi_release.Release, error) Install(dir string, releaseName string, hr helmfluxv1.HelmRelease, action Action, opts InstallOptions) (*hapi_release.Release, error) }