...

Package v2beta1

import "github.com/fluxcd/helm-controller/api/v2beta1"
Overview
Index

Overview ▾

Package v2beta1 contains API Schema definitions for the helm v2beta1 API group +kubebuilder:object:generate=true +groupName=helm.toolkit.fluxcd.io

Index ▾

Constants
Variables
func HelmReleaseChanged(hr HelmRelease, revision string, releaseRevision int, valuesChecksums ...string) bool
func HelmReleaseRecordAttempt(hr *HelmRelease, revision string, releaseRevision int, valuesChecksum string)
type CRDsPolicy
type CrossNamespaceObjectReference
    func (in *CrossNamespaceObjectReference) DeepCopy() *CrossNamespaceObjectReference
    func (in *CrossNamespaceObjectReference) DeepCopyInto(out *CrossNamespaceObjectReference)
type DeploymentAction
type HelmChartTemplate
    func (in *HelmChartTemplate) DeepCopy() *HelmChartTemplate
    func (in *HelmChartTemplate) DeepCopyInto(out *HelmChartTemplate)
    func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1.Duration
    func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string
type HelmChartTemplateObjectMeta
    func (in *HelmChartTemplateObjectMeta) DeepCopy() *HelmChartTemplateObjectMeta
    func (in *HelmChartTemplateObjectMeta) DeepCopyInto(out *HelmChartTemplateObjectMeta)
type HelmChartTemplateSpec
    func (in *HelmChartTemplateSpec) DeepCopy() *HelmChartTemplateSpec
    func (in *HelmChartTemplateSpec) DeepCopyInto(out *HelmChartTemplateSpec)
type HelmChartTemplateVerification
    func (in *HelmChartTemplateVerification) DeepCopy() *HelmChartTemplateVerification
    func (in *HelmChartTemplateVerification) DeepCopyInto(out *HelmChartTemplateVerification)
type HelmRelease
    func HelmReleaseAttempted(hr HelmRelease, revision string, releaseRevision int, valuesChecksum string) (HelmRelease, bool)
    func HelmReleaseNotReady(hr HelmRelease, reason, message string) HelmRelease
    func HelmReleaseProgressing(hr HelmRelease) HelmRelease
    func HelmReleaseReady(hr HelmRelease) HelmRelease
    func (in *HelmRelease) DeepCopy() *HelmRelease
    func (in *HelmRelease) DeepCopyInto(out *HelmRelease)
    func (in *HelmRelease) DeepCopyObject() runtime.Object
    func (in HelmRelease) GetConditions() []metav1.Condition
    func (in HelmRelease) GetDependsOn() []meta.NamespacedObjectReference
    func (in HelmRelease) GetHelmChartName() string
    func (in HelmRelease) GetMaxHistory() int
    func (in HelmRelease) GetReleaseName() string
    func (in HelmRelease) GetReleaseNamespace() string
    func (in HelmRelease) GetRequeueAfter() time.Duration
    func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition
    func (in HelmRelease) GetStorageNamespace() string
    func (in HelmRelease) GetTimeout() metav1.Duration
    func (in HelmRelease) GetValues() map[string]interface{}
    func (in *HelmRelease) SetConditions(conditions []metav1.Condition)
    func (in HelmRelease) UsePersistentClient() bool
type HelmReleaseList
    func (in *HelmReleaseList) DeepCopy() *HelmReleaseList
    func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList)
    func (in *HelmReleaseList) DeepCopyObject() runtime.Object
type HelmReleaseSpec
    func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec
    func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec)
    func (in HelmReleaseSpec) GetInstall() Install
    func (in HelmReleaseSpec) GetRollback() Rollback
    func (in HelmReleaseSpec) GetTest() Test
    func (in HelmReleaseSpec) GetUninstall() Uninstall
    func (in HelmReleaseSpec) GetUpgrade() Upgrade
type HelmReleaseStatus
    func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus
    func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus)
    func (in HelmReleaseStatus) GetHelmChart() (string, string)
type Install
    func (in *Install) DeepCopy() *Install
    func (in *Install) DeepCopyInto(out *Install)
    func (in Install) GetDescription() string
    func (in Install) GetRemediation() Remediation
    func (in Install) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration
type InstallRemediation
    func (in *InstallRemediation) DeepCopy() *InstallRemediation
    func (in *InstallRemediation) DeepCopyInto(out *InstallRemediation)
    func (in InstallRemediation) GetFailureCount(hr HelmRelease) int64
    func (in InstallRemediation) GetRetries() int
    func (in InstallRemediation) GetStrategy() RemediationStrategy
    func (in InstallRemediation) IncrementFailureCount(hr *HelmRelease)
    func (in InstallRemediation) MustIgnoreTestFailures(def bool) bool
    func (in InstallRemediation) MustRemediateLastFailure() bool
    func (in InstallRemediation) RetriesExhausted(hr HelmRelease) bool
type Kustomize
    func (in *Kustomize) DeepCopy() *Kustomize
    func (in *Kustomize) DeepCopyInto(out *Kustomize)
type PostRenderer
    func (in *PostRenderer) DeepCopy() *PostRenderer
    func (in *PostRenderer) DeepCopyInto(out *PostRenderer)
type Remediation
type RemediationStrategy
type Rollback
    func (in *Rollback) DeepCopy() *Rollback
    func (in *Rollback) DeepCopyInto(out *Rollback)
    func (in Rollback) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration
type Test
    func (in *Test) DeepCopy() *Test
    func (in *Test) DeepCopyInto(out *Test)
    func (in Test) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration
type Uninstall
    func (in *Uninstall) DeepCopy() *Uninstall
    func (in *Uninstall) DeepCopyInto(out *Uninstall)
    func (in Uninstall) GetDeletionPropagation() string
    func (in Uninstall) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration
type Upgrade
    func (in *Upgrade) DeepCopy() *Upgrade
    func (in *Upgrade) DeepCopyInto(out *Upgrade)
    func (in Upgrade) GetDescription() string
    func (in Upgrade) GetRemediation() Remediation
    func (in Upgrade) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration
type UpgradeRemediation
    func (in *UpgradeRemediation) DeepCopy() *UpgradeRemediation
    func (in *UpgradeRemediation) DeepCopyInto(out *UpgradeRemediation)
    func (in UpgradeRemediation) GetFailureCount(hr HelmRelease) int64
    func (in UpgradeRemediation) GetRetries() int
    func (in UpgradeRemediation) GetStrategy() RemediationStrategy
    func (in UpgradeRemediation) IncrementFailureCount(hr *HelmRelease)
    func (in UpgradeRemediation) MustIgnoreTestFailures(def bool) bool
    func (in UpgradeRemediation) MustRemediateLastFailure() bool
    func (in UpgradeRemediation) RetriesExhausted(hr HelmRelease) bool
type ValuesReference
    func (in *ValuesReference) DeepCopy() *ValuesReference
    func (in *ValuesReference) DeepCopyInto(out *ValuesReference)
    func (in ValuesReference) GetValuesKey() string

Package files

condition_types.go doc.go groupversion_info.go helmrelease_types.go reference_types.go zz_generated.deepcopy.go

Constants

const (
    // ReleasedCondition represents the status of the last release attempt
    // (install/upgrade/test) against the latest desired state.
    ReleasedCondition string = "Released"

    // TestSuccessCondition represents the status of the last test attempt against
    // the latest desired state.
    TestSuccessCondition string = "TestSuccess"

    // RemediatedCondition represents the status of the last remediation attempt
    // (uninstall/rollback) due to a failure of the last release attempt against the
    // latest desired state.
    RemediatedCondition string = "Remediated"
)
const (
    // InstallSucceededReason represents the fact that the Helm install for the
    // HelmRelease succeeded.
    InstallSucceededReason string = "InstallSucceeded"

    // InstallFailedReason represents the fact that the Helm install for the
    // HelmRelease failed.
    InstallFailedReason string = "InstallFailed"

    // UpgradeSucceededReason represents the fact that the Helm upgrade for the
    // HelmRelease succeeded.
    UpgradeSucceededReason string = "UpgradeSucceeded"

    // UpgradeFailedReason represents the fact that the Helm upgrade for the
    // HelmRelease failed.
    UpgradeFailedReason string = "UpgradeFailed"

    // TestSucceededReason represents the fact that the Helm tests for the
    // HelmRelease succeeded.
    TestSucceededReason string = "TestSucceeded"

    // TestFailedReason represents the fact that the Helm tests for the HelmRelease
    // failed.
    TestFailedReason string = "TestFailed"

    // RollbackSucceededReason represents the fact that the Helm rollback for the
    // HelmRelease succeeded.
    RollbackSucceededReason string = "RollbackSucceeded"

    // RollbackFailedReason represents the fact that the Helm test for the
    // HelmRelease failed.
    RollbackFailedReason string = "RollbackFailed"

    // UninstallSucceededReason represents the fact that the Helm uninstall for the
    // HelmRelease succeeded.
    UninstallSucceededReason string = "UninstallSucceeded"

    // UninstallFailedReason represents the fact that the Helm uninstall for the
    // HelmRelease failed.
    UninstallFailedReason string = "UninstallFailed"

    // ArtifactFailedReason represents the fact that the artifact download for the
    // HelmRelease failed.
    ArtifactFailedReason string = "ArtifactFailed"

    // InitFailedReason represents the fact that the initialization of the Helm
    // configuration failed.
    InitFailedReason string = "InitFailed"

    // GetLastReleaseFailedReason represents the fact that observing the last
    // release failed.
    GetLastReleaseFailedReason string = "GetLastReleaseFailed"

    // DependencyNotReadyReason represents the fact that
    // one of the dependencies is not ready.
    DependencyNotReadyReason string = "DependencyNotReady"

    // ReconciliationSucceededReason represents the fact that
    // the reconciliation succeeded.
    ReconciliationSucceededReason string = "ReconciliationSucceeded"

    // ReconciliationFailedReason represents the fact that
    // the reconciliation failed.
    ReconciliationFailedReason string = "ReconciliationFailed"
)
const HelmReleaseFinalizer = "finalizers.fluxcd.io"
const HelmReleaseKind = "HelmRelease"
const (
    // SourceIndexKey is the key used for indexing HelmReleases based on
    // their sources.
    SourceIndexKey string = ".metadata.source"
)

Variables

var (
    // GroupVersion is group version used to register these objects
    GroupVersion = schema.GroupVersion{Group: "helm.toolkit.fluxcd.io", Version: "v2beta1"}

    // SchemeBuilder is used to add go types to the GroupVersionKind scheme
    SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

    // AddToScheme adds the types in this group-version to the given scheme.
    AddToScheme = SchemeBuilder.AddToScheme
)

func HelmReleaseChanged

func HelmReleaseChanged(hr HelmRelease, revision string, releaseRevision int, valuesChecksums ...string) bool

HelmReleaseChanged returns if the HelmRelease has changed compared to the provided values.

func HelmReleaseRecordAttempt

func HelmReleaseRecordAttempt(hr *HelmRelease, revision string, releaseRevision int, valuesChecksum string)

HelmReleaseRecordAttempt returns an attempt of the given HelmRelease with the given state in the Status of the provided object.

type CRDsPolicy

CRDsPolicy defines the install/upgrade approach to use for CRDs when installing or upgrading a HelmRelease.

type CRDsPolicy string
const (
    // Skip CRDs do neither install nor replace (update) any CRDs.
    Skip CRDsPolicy = "Skip"
    // Create CRDs which do not already exist, do not replace (update) already existing
    // CRDs and keep (do not delete) CRDs which no longer exist in the current release.
    Create CRDsPolicy = "Create"
    // Create CRDs which do not already exist, Replace (update) already existing CRDs
    // and keep (do not delete) CRDs which no longer exist in the current release.
    CreateReplace CRDsPolicy = "CreateReplace"
)

type CrossNamespaceObjectReference

CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level.

type CrossNamespaceObjectReference struct {
    // APIVersion of the referent.
    // +optional
    APIVersion string `json:"apiVersion,omitempty"`

    // Kind of the referent.
    // +kubebuilder:validation:Enum=HelmRepository;GitRepository;Bucket
    // +required
    Kind string `json:"kind,omitempty"`

    // Name of the referent.
    // +kubebuilder:validation:MinLength=1
    // +kubebuilder:validation:MaxLength=253
    // +required
    Name string `json:"name"`

    // Namespace of the referent.
    // +kubebuilder:validation:MinLength=1
    // +kubebuilder:validation:MaxLength=63
    // +kubebuilder:validation:Optional
    // +optional
    Namespace string `json:"namespace,omitempty"`
}

func (*CrossNamespaceObjectReference) DeepCopy

func (in *CrossNamespaceObjectReference) DeepCopy() *CrossNamespaceObjectReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceObjectReference.

func (*CrossNamespaceObjectReference) DeepCopyInto

func (in *CrossNamespaceObjectReference) DeepCopyInto(out *CrossNamespaceObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeploymentAction

DeploymentAction defines a consistent interface for Install and Upgrade. +kubebuilder:object:generate=false

type DeploymentAction interface {
    GetDescription() string
    GetRemediation() Remediation
}

type HelmChartTemplate

HelmChartTemplate defines the template from which the controller will generate a v1beta2.HelmChart object in the same namespace as the referenced v1beta2.Source.

type HelmChartTemplate struct {
    // ObjectMeta holds the template for metadata like labels and annotations.
    // +optional
    ObjectMeta *HelmChartTemplateObjectMeta `json:"metadata,omitempty"`

    // Spec holds the template for the v1beta2.HelmChartSpec for this HelmRelease.
    // +required
    Spec HelmChartTemplateSpec `json:"spec"`
}

func (*HelmChartTemplate) DeepCopy

func (in *HelmChartTemplate) DeepCopy() *HelmChartTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplate.

func (*HelmChartTemplate) DeepCopyInto

func (in *HelmChartTemplate) DeepCopyInto(out *HelmChartTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (HelmChartTemplate) GetInterval

func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1.Duration

GetInterval returns the configured interval for the v1beta2.HelmChart, or the given default.

func (HelmChartTemplate) GetNamespace

func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string

GetNamespace returns the namespace targeted namespace for the v1beta2.HelmChart, or the given default.

type HelmChartTemplateObjectMeta

HelmChartTemplateObjectMeta defines the template for the ObjectMeta of a v1beta2.HelmChart.

type HelmChartTemplateObjectMeta struct {
    // Map of string keys and values that can be used to organize and categorize
    // (scope and select) objects.
    // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
    // +optional
    Labels map[string]string `json:"labels,omitempty"`

    // Annotations is an unstructured key value map stored with a resource that may be
    // set by external tools to store and retrieve arbitrary metadata. They are not
    // queryable and should be preserved when modifying objects.
    // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
    // +optional
    Annotations map[string]string `json:"annotations,omitempty"`
}

func (*HelmChartTemplateObjectMeta) DeepCopy

func (in *HelmChartTemplateObjectMeta) DeepCopy() *HelmChartTemplateObjectMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateObjectMeta.

func (*HelmChartTemplateObjectMeta) DeepCopyInto

func (in *HelmChartTemplateObjectMeta) DeepCopyInto(out *HelmChartTemplateObjectMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HelmChartTemplateSpec

HelmChartTemplateSpec defines the template from which the controller will generate a v1beta2.HelmChartSpec object.

type HelmChartTemplateSpec struct {
    // The name or path the Helm chart is available at in the SourceRef.
    // +required
    Chart string `json:"chart"`

    // Version semver expression, ignored for charts from v1beta2.GitRepository and
    // v1beta2.Bucket sources. Defaults to latest when omitted.
    // +kubebuilder:default:=*
    // +optional
    Version string `json:"version,omitempty"`

    // The name and namespace of the v1beta2.Source the chart is available at.
    // +required
    SourceRef CrossNamespaceObjectReference `json:"sourceRef"`

    // Interval at which to check the v1beta2.Source for updates. Defaults to
    // 'HelmReleaseSpec.Interval'.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +optional
    Interval *metav1.Duration `json:"interval,omitempty"`

    // Determines what enables the creation of a new artifact. Valid values are
    // ('ChartVersion', 'Revision').
    // See the documentation of the values for an explanation on their behavior.
    // Defaults to ChartVersion when omitted.
    // +kubebuilder:validation:Enum=ChartVersion;Revision
    // +kubebuilder:default:=ChartVersion
    // +optional
    ReconcileStrategy string `json:"reconcileStrategy,omitempty"`

    // Alternative list of values files to use as the chart values (values.yaml
    // is not included by default), expected to be a relative path in the SourceRef.
    // Values files are merged in the order of this list with the last file overriding
    // the first. Ignored when omitted.
    // +optional
    ValuesFiles []string `json:"valuesFiles,omitempty"`

    // Alternative values file to use as the default chart values, expected to
    // be a relative path in the SourceRef. Deprecated in favor of ValuesFiles,
    // for backwards compatibility the file defined here is merged before the
    // ValuesFiles items. Ignored when omitted.
    // +optional
    // +deprecated
    ValuesFile string `json:"valuesFile,omitempty"`

    // Verify contains the secret name containing the trusted public keys
    // used to verify the signature and specifies which provider to use to check
    // whether OCI image is authentic.
    // This field is only supported for OCI sources.
    // Chart dependencies, which are not bundled in the umbrella chart artifact, are not verified.
    // +optional
    Verify *HelmChartTemplateVerification `json:"verify,omitempty"`
}

func (*HelmChartTemplateSpec) DeepCopy

func (in *HelmChartTemplateSpec) DeepCopy() *HelmChartTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateSpec.

func (*HelmChartTemplateSpec) DeepCopyInto

func (in *HelmChartTemplateSpec) DeepCopyInto(out *HelmChartTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HelmChartTemplateVerification

HelmChartTemplateVerification verifies the authenticity of an OCI Helm chart.

type HelmChartTemplateVerification struct {
    // Provider specifies the technology used to sign the OCI Helm chart.
    // +kubebuilder:validation:Enum=cosign
    // +kubebuilder:default:=cosign
    Provider string `json:"provider"`

    // SecretRef specifies the Kubernetes Secret containing the
    // trusted public keys.
    // +optional
    SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
}

func (*HelmChartTemplateVerification) DeepCopy

func (in *HelmChartTemplateVerification) DeepCopy() *HelmChartTemplateVerification

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateVerification.

func (*HelmChartTemplateVerification) DeepCopyInto

func (in *HelmChartTemplateVerification) DeepCopyInto(out *HelmChartTemplateVerification)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HelmRelease

HelmRelease is the Schema for the helmreleases API

type HelmRelease struct {
    metav1.TypeMeta   `json:",inline"`
    metav1.ObjectMeta `json:"metadata,omitempty"`

    Spec HelmReleaseSpec `json:"spec,omitempty"`
    // +kubebuilder:default:={"observedGeneration":-1}
    Status HelmReleaseStatus `json:"status,omitempty"`
}

func HelmReleaseAttempted

func HelmReleaseAttempted(hr HelmRelease, revision string, releaseRevision int, valuesChecksum string) (HelmRelease, bool)

HelmReleaseAttempted registers an attempt of the given HelmRelease with the given state. and returns the modified HelmRelease and a boolean indicating a state change.

Deprecated: in favor of HelmReleaseChanged and HelmReleaseRecordAttempt.

func HelmReleaseNotReady

func HelmReleaseNotReady(hr HelmRelease, reason, message string) HelmRelease

HelmReleaseNotReady registers a failed reconciliation of the given HelmRelease.

func HelmReleaseProgressing

func HelmReleaseProgressing(hr HelmRelease) HelmRelease

HelmReleaseProgressing resets any failures and registers progress toward reconciling the given HelmRelease by setting the meta.ReadyCondition to 'Unknown' for meta.ProgressingReason.

func HelmReleaseReady

func HelmReleaseReady(hr HelmRelease) HelmRelease

HelmReleaseReady registers a successful reconciliation of the given HelmRelease.

func (*HelmRelease) DeepCopy

func (in *HelmRelease) DeepCopy() *HelmRelease

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease.

func (*HelmRelease) DeepCopyInto

func (in *HelmRelease) DeepCopyInto(out *HelmRelease)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HelmRelease) DeepCopyObject

func (in *HelmRelease) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (HelmRelease) GetConditions

func (in HelmRelease) GetConditions() []metav1.Condition

GetConditions returns the status conditions of the object.

func (HelmRelease) GetDependsOn

func (in HelmRelease) GetDependsOn() []meta.NamespacedObjectReference

GetDependsOn returns the list of dependencies across-namespaces.

func (HelmRelease) GetHelmChartName

func (in HelmRelease) GetHelmChartName() string

GetHelmChartName returns the name used by the controller for the HelmChart creation.

func (HelmRelease) GetMaxHistory

func (in HelmRelease) GetMaxHistory() int

GetMaxHistory returns the configured MaxHistory, or the default of 10.

func (HelmRelease) GetReleaseName

func (in HelmRelease) GetReleaseName() string

GetReleaseName returns the configured release name, or a composition of '[TargetNamespace-]Name'.

func (HelmRelease) GetReleaseNamespace

func (in HelmRelease) GetReleaseNamespace() string

GetReleaseNamespace returns the configured TargetNamespace, or the namespace of the HelmRelease.

func (HelmRelease) GetRequeueAfter

func (in HelmRelease) GetRequeueAfter() time.Duration

GetRequeueAfter returns the duration after which the HelmRelease must be reconciled again.

func (*HelmRelease) GetStatusConditions

func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition

GetStatusConditions returns a pointer to the Status.Conditions slice. Deprecated: use GetConditions instead.

func (HelmRelease) GetStorageNamespace

func (in HelmRelease) GetStorageNamespace() string

GetStorageNamespace returns the configured StorageNamespace for helm, or the namespace of the HelmRelease.

func (HelmRelease) GetTimeout

func (in HelmRelease) GetTimeout() metav1.Duration

GetTimeout returns the configured Timeout, or the default of 300s.

func (HelmRelease) GetValues

func (in HelmRelease) GetValues() map[string]interface{}

GetValues unmarshals the raw values to a map[string]interface{} and returns the result.

func (*HelmRelease) SetConditions

func (in *HelmRelease) SetConditions(conditions []metav1.Condition)

SetConditions sets the status conditions on the object.

func (HelmRelease) UsePersistentClient

func (in HelmRelease) UsePersistentClient() bool

UsePersistentClient returns the configured PersistentClient, or the default of true.

type HelmReleaseList

HelmReleaseList contains a list of HelmRelease objects.

type HelmReleaseList struct {
    metav1.TypeMeta `json:",inline"`
    metav1.ListMeta `json:"metadata,omitempty"`
    Items           []HelmRelease `json:"items"`
}

func (*HelmReleaseList) DeepCopy

func (in *HelmReleaseList) DeepCopy() *HelmReleaseList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList.

func (*HelmReleaseList) DeepCopyInto

func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HelmReleaseList) DeepCopyObject

func (in *HelmReleaseList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HelmReleaseSpec

HelmReleaseSpec defines the desired state of a Helm release.

type HelmReleaseSpec struct {
    // Chart defines the template of the v1beta2.HelmChart that should be created
    // for this HelmRelease.
    // +required
    Chart *HelmChartTemplate `json:"chart,omitempty"`

    // ChartRef holds a reference to a source controller resource containing the
    // Helm chart artifact.
    //
    // Note: this field is provisional to the v2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    ChartRef *v2.CrossNamespaceSourceReference `json:"chartRef,omitempty"`

    // Interval at which to reconcile the Helm release.
    // This interval is approximate and may be subject to jitter to ensure
    // efficient use of resources.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +required
    Interval metav1.Duration `json:"interval"`

    // KubeConfig for reconciling the HelmRelease on a remote cluster.
    // When used in combination with HelmReleaseSpec.ServiceAccountName,
    // forces the controller to act on behalf of that Service Account at the
    // target cluster.
    // If the --default-service-account flag is set, its value will be used as
    // a controller level fallback for when HelmReleaseSpec.ServiceAccountName
    // is empty.
    // +optional
    KubeConfig *meta.KubeConfigReference `json:"kubeConfig,omitempty"`

    // Suspend tells the controller to suspend reconciliation for this HelmRelease,
    // it does not apply to already started reconciliations. Defaults to false.
    // +optional
    Suspend bool `json:"suspend,omitempty"`

    // ReleaseName used for the Helm release. Defaults to a composition of
    // '[TargetNamespace-]Name'.
    // +kubebuilder:validation:MinLength=1
    // +kubebuilder:validation:MaxLength=53
    // +kubebuilder:validation:Optional
    // +optional
    ReleaseName string `json:"releaseName,omitempty"`

    // TargetNamespace to target when performing operations for the HelmRelease.
    // Defaults to the namespace of the HelmRelease.
    // +kubebuilder:validation:MinLength=1
    // +kubebuilder:validation:MaxLength=63
    // +kubebuilder:validation:Optional
    // +optional
    TargetNamespace string `json:"targetNamespace,omitempty"`

    // StorageNamespace used for the Helm storage.
    // Defaults to the namespace of the HelmRelease.
    // +kubebuilder:validation:MinLength=1
    // +kubebuilder:validation:MaxLength=63
    // +kubebuilder:validation:Optional
    // +optional
    StorageNamespace string `json:"storageNamespace,omitempty"`

    // DependsOn may contain a meta.NamespacedObjectReference slice with
    // references to HelmRelease resources that must be ready before this HelmRelease
    // can be reconciled.
    // +optional
    DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty"`

    // Timeout is the time to wait for any individual Kubernetes operation (like Jobs
    // for hooks) during the performance of a Helm action. Defaults to '5m0s'.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +optional
    Timeout *metav1.Duration `json:"timeout,omitempty"`

    // MaxHistory is the number of revisions saved by Helm for this HelmRelease.
    // Use '0' for an unlimited number of revisions; defaults to '10'.
    // +optional
    MaxHistory *int `json:"maxHistory,omitempty"`

    // The name of the Kubernetes service account to impersonate
    // when reconciling this HelmRelease.
    // +optional
    ServiceAccountName string `json:"serviceAccountName,omitempty"`

    // PersistentClient tells the controller to use a persistent Kubernetes
    // client for this release. When enabled, the client will be reused for the
    // duration of the reconciliation, instead of being created and destroyed
    // for each (step of a) Helm action.
    //
    // This can improve performance, but may cause issues with some Helm charts
    // that for example do create Custom Resource Definitions during installation
    // outside Helm's CRD lifecycle hooks, which are then not observed to be
    // available by e.g. post-install hooks.
    //
    // If not set, it defaults to true.
    //
    // +optional
    PersistentClient *bool `json:"persistentClient,omitempty"`

    // DriftDetection holds the configuration for detecting and handling
    // differences between the manifest in the Helm storage and the resources
    // currently existing in the cluster.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    DriftDetection *v2beta2.DriftDetection `json:"driftDetection,omitempty"`

    // Install holds the configuration for Helm install actions for this HelmRelease.
    // +optional
    Install *Install `json:"install,omitempty"`

    // Upgrade holds the configuration for Helm upgrade actions for this HelmRelease.
    // +optional
    Upgrade *Upgrade `json:"upgrade,omitempty"`

    // Test holds the configuration for Helm test actions for this HelmRelease.
    // +optional
    Test *Test `json:"test,omitempty"`

    // Rollback holds the configuration for Helm rollback actions for this HelmRelease.
    // +optional
    Rollback *Rollback `json:"rollback,omitempty"`

    // Uninstall holds the configuration for Helm uninstall actions for this HelmRelease.
    // +optional
    Uninstall *Uninstall `json:"uninstall,omitempty"`

    // ValuesFrom holds references to resources containing Helm values for this HelmRelease,
    // and information about how they should be merged.
    ValuesFrom []ValuesReference `json:"valuesFrom,omitempty"`

    // Values holds the values for this Helm release.
    // +optional
    Values *apiextensionsv1.JSON `json:"values,omitempty"`

    // PostRenderers holds an array of Helm PostRenderers, which will be applied in order
    // of their definition.
    // +optional
    PostRenderers []PostRenderer `json:"postRenderers,omitempty"`
}

func (*HelmReleaseSpec) DeepCopy

func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec.

func (*HelmReleaseSpec) DeepCopyInto

func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (HelmReleaseSpec) GetInstall

func (in HelmReleaseSpec) GetInstall() Install

GetInstall returns the configuration for Helm install actions for the HelmRelease.

func (HelmReleaseSpec) GetRollback

func (in HelmReleaseSpec) GetRollback() Rollback

GetRollback returns the configuration for Helm rollback actions for this HelmRelease.

func (HelmReleaseSpec) GetTest

func (in HelmReleaseSpec) GetTest() Test

GetTest returns the configuration for Helm test actions for this HelmRelease.

func (HelmReleaseSpec) GetUninstall

func (in HelmReleaseSpec) GetUninstall() Uninstall

GetUninstall returns the configuration for Helm uninstall actions for this HelmRelease.

func (HelmReleaseSpec) GetUpgrade

func (in HelmReleaseSpec) GetUpgrade() Upgrade

GetUpgrade returns the configuration for Helm upgrade actions for this HelmRelease.

type HelmReleaseStatus

HelmReleaseStatus defines the observed state of a HelmRelease.

type HelmReleaseStatus struct {
    // ObservedGeneration is the last observed generation.
    // +optional
    ObservedGeneration int64 `json:"observedGeneration,omitempty"`

    // ObservedPostRenderersDigest is the digest for the post-renderers of
    // the last successful reconciliation attempt.
    // +optional
    ObservedPostRenderersDigest string `json:"observedPostRenderersDigest,omitempty"`

    meta.ReconcileRequestStatus `json:",inline"`

    // Conditions holds the conditions for the HelmRelease.
    // +optional
    Conditions []metav1.Condition `json:"conditions,omitempty"`

    // LastAppliedRevision is the revision of the last successfully applied source.
    // +optional
    LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`

    // LastAttemptedRevision is the revision of the last reconciliation attempt.
    // +optional
    LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`

    // LastAttemptedValuesChecksum is the SHA1 checksum of the values of the last
    // reconciliation attempt.
    // +optional
    LastAttemptedValuesChecksum string `json:"lastAttemptedValuesChecksum,omitempty"`

    // LastReleaseRevision is the revision of the last successful Helm release.
    // +optional
    LastReleaseRevision int `json:"lastReleaseRevision,omitempty"`

    // HelmChart is the namespaced name of the HelmChart resource created by
    // the controller for the HelmRelease.
    // +optional
    HelmChart string `json:"helmChart,omitempty"`

    // Failures is the reconciliation failure count against the latest desired
    // state. It is reset after a successful reconciliation.
    // +optional
    Failures int64 `json:"failures,omitempty"`

    // InstallFailures is the install failure count against the latest desired
    // state. It is reset after a successful reconciliation.
    // +optional
    InstallFailures int64 `json:"installFailures,omitempty"`

    // UpgradeFailures is the upgrade failure count against the latest desired
    // state. It is reset after a successful reconciliation.
    // +optional
    UpgradeFailures int64 `json:"upgradeFailures,omitempty"`

    // StorageNamespace is the namespace of the Helm release storage for the
    // current release.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    StorageNamespace string `json:"storageNamespace,omitempty"`

    // History holds the history of Helm releases performed for this HelmRelease
    // up to the last successfully completed release.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    History v2.Snapshots `json:"history,omitempty"`

    // LastAttemptedGeneration is the last generation the controller attempted
    // to reconcile.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    LastAttemptedGeneration int64 `json:"lastAttemptedGeneration,omitempty"`

    // LastAttemptedConfigDigest is the digest for the config (better known as
    // "values") of the last reconciliation attempt.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    LastAttemptedConfigDigest string `json:"lastAttemptedConfigDigest,omitempty"`

    // LastAttemptedReleaseAction is the last release action performed for this
    // HelmRelease. It is used to determine the active remediation strategy.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    LastAttemptedReleaseAction string `json:"lastAttemptedReleaseAction,omitempty"`

    // LastHandledForceAt holds the value of the most recent force request
    // value, so a change of the annotation value can be detected.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    LastHandledForceAt string `json:"lastHandledForceAt,omitempty"`

    // LastHandledResetAt holds the value of the most recent reset request
    // value, so a change of the annotation value can be detected.
    //
    // Note: this field is provisional to the v2beta2 API, and not actively used
    // by v2beta1 HelmReleases.
    // +optional
    LastHandledResetAt string `json:"lastHandledResetAt,omitempty"`
}

func (*HelmReleaseStatus) DeepCopy

func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus.

func (*HelmReleaseStatus) DeepCopyInto

func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (HelmReleaseStatus) GetHelmChart

func (in HelmReleaseStatus) GetHelmChart() (string, string)

GetHelmChart returns the namespace and name of the HelmChart.

type Install

Install holds the configuration for Helm install actions performed for this HelmRelease.

type Install struct {
    // Timeout is the time to wait for any individual Kubernetes operation (like
    // Jobs for hooks) during the performance of a Helm install action. Defaults to
    // 'HelmReleaseSpec.Timeout'.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +optional
    Timeout *metav1.Duration `json:"timeout,omitempty"`

    // Remediation holds the remediation configuration for when the Helm install
    // action for the HelmRelease fails. The default is to not perform any action.
    // +optional
    Remediation *InstallRemediation `json:"remediation,omitempty"`

    // DisableWait disables the waiting for resources to be ready after a Helm
    // install has been performed.
    // +optional
    DisableWait bool `json:"disableWait,omitempty"`

    // DisableWaitForJobs disables waiting for jobs to complete after a Helm
    // install has been performed.
    // +optional
    DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`

    // DisableHooks prevents hooks from running during the Helm install action.
    // +optional
    DisableHooks bool `json:"disableHooks,omitempty"`

    // DisableOpenAPIValidation prevents the Helm install action from validating
    // rendered templates against the Kubernetes OpenAPI Schema.
    // +optional
    DisableOpenAPIValidation bool `json:"disableOpenAPIValidation,omitempty"`

    // Replace tells the Helm install action to re-use the 'ReleaseName', but only
    // if that name is a deleted release which remains in the history.
    // +optional
    Replace bool `json:"replace,omitempty"`

    // SkipCRDs tells the Helm install action to not install any CRDs. By default,
    // CRDs are installed if not already present.
    //
    // Deprecated use CRD policy (`crds`) attribute with value `Skip` instead.
    //
    // +deprecated
    // +optional
    SkipCRDs bool `json:"skipCRDs,omitempty"`

    // CRDs upgrade CRDs from the Helm Chart's crds directory according
    // to the CRD upgrade policy provided here. Valid values are `Skip`,
    // `Create` or `CreateReplace`. Default is `Create` and if omitted
    // CRDs are installed but not updated.
    //
    // Skip: do neither install nor replace (update) any CRDs.
    //
    // Create: new CRDs are created, existing CRDs are neither updated nor deleted.
    //
    // CreateReplace: new CRDs are created, existing CRDs are updated (replaced)
    // but not deleted.
    //
    // By default, CRDs are applied (installed) during Helm install action.
    // With this option users can opt-in to CRD replace existing CRDs on Helm
    // install actions, which is not (yet) natively supported by Helm.
    // https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
    //
    // +kubebuilder:validation:Enum=Skip;Create;CreateReplace
    // +optional
    CRDs CRDsPolicy `json:"crds,omitempty"`

    // CreateNamespace tells the Helm install action to create the
    // HelmReleaseSpec.TargetNamespace if it does not exist yet.
    // On uninstall, the namespace will not be garbage collected.
    // +optional
    CreateNamespace bool `json:"createNamespace,omitempty"`
}

func (*Install) DeepCopy

func (in *Install) DeepCopy() *Install

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Install.

func (*Install) DeepCopyInto

func (in *Install) DeepCopyInto(out *Install)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Install) GetDescription

func (in Install) GetDescription() string

GetDescription returns a description for the Helm install action.

func (Install) GetRemediation

func (in Install) GetRemediation() Remediation

GetRemediation returns the configured Remediation for the Helm install action.

func (Install) GetTimeout

func (in Install) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration

GetTimeout returns the configured timeout for the Helm install action, or the given default.

type InstallRemediation

InstallRemediation holds the configuration for Helm install remediation.

type InstallRemediation struct {
    // Retries is the number of retries that should be attempted on failures before
    // bailing. Remediation, using an uninstall, is performed between each attempt.
    // Defaults to '0', a negative integer equals to unlimited retries.
    // +optional
    Retries int `json:"retries,omitempty"`

    // IgnoreTestFailures tells the controller to skip remediation when the Helm
    // tests are run after an install action but fail. Defaults to
    // 'Test.IgnoreFailures'.
    // +optional
    IgnoreTestFailures *bool `json:"ignoreTestFailures,omitempty"`

    // RemediateLastFailure tells the controller to remediate the last failure, when
    // no retries remain. Defaults to 'false'.
    // +optional
    RemediateLastFailure *bool `json:"remediateLastFailure,omitempty"`
}

func (*InstallRemediation) DeepCopy

func (in *InstallRemediation) DeepCopy() *InstallRemediation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallRemediation.

func (*InstallRemediation) DeepCopyInto

func (in *InstallRemediation) DeepCopyInto(out *InstallRemediation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (InstallRemediation) GetFailureCount

func (in InstallRemediation) GetFailureCount(hr HelmRelease) int64

GetFailureCount gets the failure count.

func (InstallRemediation) GetRetries

func (in InstallRemediation) GetRetries() int

GetRetries returns the number of retries that should be attempted on failures.

func (InstallRemediation) GetStrategy

func (in InstallRemediation) GetStrategy() RemediationStrategy

GetStrategy returns the strategy to use for failure remediation.

func (InstallRemediation) IncrementFailureCount

func (in InstallRemediation) IncrementFailureCount(hr *HelmRelease)

IncrementFailureCount increments the failure count.

func (InstallRemediation) MustIgnoreTestFailures

func (in InstallRemediation) MustIgnoreTestFailures(def bool) bool

MustIgnoreTestFailures returns the configured IgnoreTestFailures or the given default.

func (InstallRemediation) MustRemediateLastFailure

func (in InstallRemediation) MustRemediateLastFailure() bool

MustRemediateLastFailure returns whether to remediate the last failure when no retries remain.

func (InstallRemediation) RetriesExhausted

func (in InstallRemediation) RetriesExhausted(hr HelmRelease) bool

RetriesExhausted returns true if there are no remaining retries.

type Kustomize

Kustomize Helm PostRenderer specification.

type Kustomize struct {
    // Strategic merge and JSON patches, defined as inline YAML objects,
    // capable of targeting objects based on kind, label and annotation selectors.
    // +optional
    Patches []kustomize.Patch `json:"patches,omitempty"`

    // Strategic merge patches, defined as inline YAML objects.
    // +optional
    PatchesStrategicMerge []apiextensionsv1.JSON `json:"patchesStrategicMerge,omitempty"`

    // JSON 6902 patches, defined as inline YAML objects.
    // +optional
    PatchesJSON6902 []kustomize.JSON6902Patch `json:"patchesJson6902,omitempty"`

    // Images is a list of (image name, new name, new tag or digest)
    // for changing image names, tags or digests. This can also be achieved with a
    // patch, but this operator is simpler to specify.
    // +optional
    Images []kustomize.Image `json:"images,omitempty" yaml:"images,omitempty"`
}

func (*Kustomize) DeepCopy

func (in *Kustomize) DeepCopy() *Kustomize

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kustomize.

func (*Kustomize) DeepCopyInto

func (in *Kustomize) DeepCopyInto(out *Kustomize)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostRenderer

PostRenderer contains a Helm PostRenderer specification.

type PostRenderer struct {
    // Kustomization to apply as PostRenderer.
    // +optional
    Kustomize *Kustomize `json:"kustomize,omitempty"`
}

func (*PostRenderer) DeepCopy

func (in *PostRenderer) DeepCopy() *PostRenderer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostRenderer.

func (*PostRenderer) DeepCopyInto

func (in *PostRenderer) DeepCopyInto(out *PostRenderer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Remediation

Remediation defines a consistent interface for InstallRemediation and UpgradeRemediation. +kubebuilder:object:generate=false

type Remediation interface {
    GetRetries() int
    MustIgnoreTestFailures(bool) bool
    MustRemediateLastFailure() bool
    GetStrategy() RemediationStrategy
    GetFailureCount(hr HelmRelease) int64
    IncrementFailureCount(hr *HelmRelease)
    RetriesExhausted(hr HelmRelease) bool
}

type RemediationStrategy

RemediationStrategy returns the strategy to use to remediate a failed install or upgrade.

type RemediationStrategy string
const (
    // RollbackRemediationStrategy represents a Helm remediation strategy of Helm
    // rollback.
    RollbackRemediationStrategy RemediationStrategy = "rollback"

    // UninstallRemediationStrategy represents a Helm remediation strategy of Helm
    // uninstall.
    UninstallRemediationStrategy RemediationStrategy = "uninstall"
)

type Rollback

Rollback holds the configuration for Helm rollback actions for this HelmRelease.

type Rollback struct {
    // Timeout is the time to wait for any individual Kubernetes operation (like
    // Jobs for hooks) during the performance of a Helm rollback action. Defaults to
    // 'HelmReleaseSpec.Timeout'.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +optional
    Timeout *metav1.Duration `json:"timeout,omitempty"`

    // DisableWait disables the waiting for resources to be ready after a Helm
    // rollback has been performed.
    // +optional
    DisableWait bool `json:"disableWait,omitempty"`

    // DisableWaitForJobs disables waiting for jobs to complete after a Helm
    // rollback has been performed.
    // +optional
    DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`

    // DisableHooks prevents hooks from running during the Helm rollback action.
    // +optional
    DisableHooks bool `json:"disableHooks,omitempty"`

    // Recreate performs pod restarts for the resource if applicable.
    // +optional
    Recreate bool `json:"recreate,omitempty"`

    // Force forces resource updates through a replacement strategy.
    // +optional
    Force bool `json:"force,omitempty"`

    // CleanupOnFail allows deletion of new resources created during the Helm
    // rollback action when it fails.
    // +optional
    CleanupOnFail bool `json:"cleanupOnFail,omitempty"`
}

func (*Rollback) DeepCopy

func (in *Rollback) DeepCopy() *Rollback

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rollback.

func (*Rollback) DeepCopyInto

func (in *Rollback) DeepCopyInto(out *Rollback)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Rollback) GetTimeout

func (in Rollback) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration

GetTimeout returns the configured timeout for the Helm rollback action, or the given default.

type Test

Test holds the configuration for Helm test actions for this HelmRelease.

type Test struct {
    // Enable enables Helm test actions for this HelmRelease after an Helm install
    // or upgrade action has been performed.
    // +optional
    Enable bool `json:"enable,omitempty"`

    // Timeout is the time to wait for any individual Kubernetes operation during
    // the performance of a Helm test action. Defaults to 'HelmReleaseSpec.Timeout'.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +optional
    Timeout *metav1.Duration `json:"timeout,omitempty"`

    // IgnoreFailures tells the controller to skip remediation when the Helm tests
    // are run but fail. Can be overwritten for tests run after install or upgrade
    // actions in 'Install.IgnoreTestFailures' and 'Upgrade.IgnoreTestFailures'.
    // +optional
    IgnoreFailures bool `json:"ignoreFailures,omitempty"`
}

func (*Test) DeepCopy

func (in *Test) DeepCopy() *Test

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.

func (*Test) DeepCopyInto

func (in *Test) DeepCopyInto(out *Test)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Test) GetTimeout

func (in Test) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration

GetTimeout returns the configured timeout for the Helm test action, or the given default.

type Uninstall

Uninstall holds the configuration for Helm uninstall actions for this HelmRelease.

type Uninstall struct {
    // Timeout is the time to wait for any individual Kubernetes operation (like
    // Jobs for hooks) during the performance of a Helm uninstall action. Defaults
    // to 'HelmReleaseSpec.Timeout'.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +optional
    Timeout *metav1.Duration `json:"timeout,omitempty"`

    // DisableHooks prevents hooks from running during the Helm rollback action.
    // +optional
    DisableHooks bool `json:"disableHooks,omitempty"`

    // KeepHistory tells Helm to remove all associated resources and mark the
    // release as deleted, but retain the release history.
    // +optional
    KeepHistory bool `json:"keepHistory,omitempty"`

    // DisableWait disables waiting for all the resources to be deleted after
    // a Helm uninstall is performed.
    // +optional
    DisableWait bool `json:"disableWait,omitempty"`

    // DeletionPropagation specifies the deletion propagation policy when
    // a Helm uninstall is performed.
    // +kubebuilder:default=background
    // +kubebuilder:validation:Enum=background;foreground;orphan
    // +optional
    DeletionPropagation *string `json:"deletionPropagation,omitempty"`
}

func (*Uninstall) DeepCopy

func (in *Uninstall) DeepCopy() *Uninstall

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Uninstall.

func (*Uninstall) DeepCopyInto

func (in *Uninstall) DeepCopyInto(out *Uninstall)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Uninstall) GetDeletionPropagation

func (in Uninstall) GetDeletionPropagation() string

GetDeletionPropagation returns the configured deletion propagation policy for the Helm uninstall action, or 'background'.

func (Uninstall) GetTimeout

func (in Uninstall) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration

GetTimeout returns the configured timeout for the Helm uninstall action, or the given default.

type Upgrade

Upgrade holds the configuration for Helm upgrade actions for this HelmRelease.

type Upgrade struct {
    // Timeout is the time to wait for any individual Kubernetes operation (like
    // Jobs for hooks) during the performance of a Helm upgrade action. Defaults to
    // 'HelmReleaseSpec.Timeout'.
    // +kubebuilder:validation:Type=string
    // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
    // +optional
    Timeout *metav1.Duration `json:"timeout,omitempty"`

    // Remediation holds the remediation configuration for when the Helm upgrade
    // action for the HelmRelease fails. The default is to not perform any action.
    // +optional
    Remediation *UpgradeRemediation `json:"remediation,omitempty"`

    // DisableWait disables the waiting for resources to be ready after a Helm
    // upgrade has been performed.
    // +optional
    DisableWait bool `json:"disableWait,omitempty"`

    // DisableWaitForJobs disables waiting for jobs to complete after a Helm
    // upgrade has been performed.
    // +optional
    DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`

    // DisableHooks prevents hooks from running during the Helm upgrade action.
    // +optional
    DisableHooks bool `json:"disableHooks,omitempty"`

    // DisableOpenAPIValidation prevents the Helm upgrade action from validating
    // rendered templates against the Kubernetes OpenAPI Schema.
    // +optional
    DisableOpenAPIValidation bool `json:"disableOpenAPIValidation,omitempty"`

    // Force forces resource updates through a replacement strategy.
    // +optional
    Force bool `json:"force,omitempty"`

    // PreserveValues will make Helm reuse the last release's values and merge in
    // overrides from 'Values'. Setting this flag makes the HelmRelease
    // non-declarative.
    // +optional
    PreserveValues bool `json:"preserveValues,omitempty"`

    // CleanupOnFail allows deletion of new resources created during the Helm
    // upgrade action when it fails.
    // +optional
    CleanupOnFail bool `json:"cleanupOnFail,omitempty"`

    // CRDs upgrade CRDs from the Helm Chart's crds directory according
    // to the CRD upgrade policy provided here. Valid values are `Skip`,
    // `Create` or `CreateReplace`. Default is `Skip` and if omitted
    // CRDs are neither installed nor upgraded.
    //
    // Skip: do neither install nor replace (update) any CRDs.
    //
    // Create: new CRDs are created, existing CRDs are neither updated nor deleted.
    //
    // CreateReplace: new CRDs are created, existing CRDs are updated (replaced)
    // but not deleted.
    //
    // By default, CRDs are not applied during Helm upgrade action. With this
    // option users can opt-in to CRD upgrade, which is not (yet) natively supported by Helm.
    // https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
    //
    // +kubebuilder:validation:Enum=Skip;Create;CreateReplace
    // +optional
    CRDs CRDsPolicy `json:"crds,omitempty"`
}

func (*Upgrade) DeepCopy

func (in *Upgrade) DeepCopy() *Upgrade

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upgrade.

func (*Upgrade) DeepCopyInto

func (in *Upgrade) DeepCopyInto(out *Upgrade)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Upgrade) GetDescription

func (in Upgrade) GetDescription() string

GetDescription returns a description for the Helm upgrade action.

func (Upgrade) GetRemediation

func (in Upgrade) GetRemediation() Remediation

GetRemediation returns the configured Remediation for the Helm upgrade action.

func (Upgrade) GetTimeout

func (in Upgrade) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration

GetTimeout returns the configured timeout for the Helm upgrade action, or the given default.

type UpgradeRemediation

UpgradeRemediation holds the configuration for Helm upgrade remediation.

type UpgradeRemediation struct {
    // Retries is the number of retries that should be attempted on failures before
    // bailing. Remediation, using 'Strategy', is performed between each attempt.
    // Defaults to '0', a negative integer equals to unlimited retries.
    // +optional
    Retries int `json:"retries,omitempty"`

    // IgnoreTestFailures tells the controller to skip remediation when the Helm
    // tests are run after an upgrade action but fail.
    // Defaults to 'Test.IgnoreFailures'.
    // +optional
    IgnoreTestFailures *bool `json:"ignoreTestFailures,omitempty"`

    // RemediateLastFailure tells the controller to remediate the last failure, when
    // no retries remain. Defaults to 'false' unless 'Retries' is greater than 0.
    // +optional
    RemediateLastFailure *bool `json:"remediateLastFailure,omitempty"`

    // Strategy to use for failure remediation. Defaults to 'rollback'.
    // +kubebuilder:validation:Enum=rollback;uninstall
    // +optional
    Strategy *RemediationStrategy `json:"strategy,omitempty"`
}

func (*UpgradeRemediation) DeepCopy

func (in *UpgradeRemediation) DeepCopy() *UpgradeRemediation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeRemediation.

func (*UpgradeRemediation) DeepCopyInto

func (in *UpgradeRemediation) DeepCopyInto(out *UpgradeRemediation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (UpgradeRemediation) GetFailureCount

func (in UpgradeRemediation) GetFailureCount(hr HelmRelease) int64

GetFailureCount gets the failure count.

func (UpgradeRemediation) GetRetries

func (in UpgradeRemediation) GetRetries() int

GetRetries returns the number of retries that should be attempted on failures.

func (UpgradeRemediation) GetStrategy

func (in UpgradeRemediation) GetStrategy() RemediationStrategy

GetStrategy returns the strategy to use for failure remediation.

func (UpgradeRemediation) IncrementFailureCount

func (in UpgradeRemediation) IncrementFailureCount(hr *HelmRelease)

IncrementFailureCount increments the failure count.

func (UpgradeRemediation) MustIgnoreTestFailures

func (in UpgradeRemediation) MustIgnoreTestFailures(def bool) bool

MustIgnoreTestFailures returns the configured IgnoreTestFailures or the given default.

func (UpgradeRemediation) MustRemediateLastFailure

func (in UpgradeRemediation) MustRemediateLastFailure() bool

MustRemediateLastFailure returns whether to remediate the last failure when no retries remain.

func (UpgradeRemediation) RetriesExhausted

func (in UpgradeRemediation) RetriesExhausted(hr HelmRelease) bool

RetriesExhausted returns true if there are no remaining retries.

type ValuesReference

ValuesReference contains a reference to a resource containing Helm values, and optionally the key they can be found at.

type ValuesReference struct {
    // Kind of the values referent, valid values are ('Secret', 'ConfigMap').
    // +kubebuilder:validation:Enum=Secret;ConfigMap
    // +required
    Kind string `json:"kind"`

    // Name of the values referent. Should reside in the same namespace as the
    // referring resource.
    // +kubebuilder:validation:MinLength=1
    // +kubebuilder:validation:MaxLength=253
    // +required
    Name string `json:"name"`

    // ValuesKey is the data key where the values.yaml or a specific value can be
    // found at. Defaults to 'values.yaml'.
    // When set, must be a valid Data Key, consisting of alphanumeric characters,
    // '-', '_' or '.'.
    // +kubebuilder:validation:MaxLength=253
    // +kubebuilder:validation:Pattern=`^[\-._a-zA-Z0-9]+$`
    // +optional
    ValuesKey string `json:"valuesKey,omitempty"`

    // TargetPath is the YAML dot notation path the value should be merged at. When
    // set, the ValuesKey is expected to be a single flat value. Defaults to 'None',
    // which results in the values getting merged at the root.
    // +kubebuilder:validation:MaxLength=250
    // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
    // +optional
    TargetPath string `json:"targetPath,omitempty"`

    // Optional marks this ValuesReference as optional. When set, a not found error
    // for the values reference is ignored, but any ValuesKey, TargetPath or
    // transient error will still result in a reconciliation failure.
    // +optional
    Optional bool `json:"optional,omitempty"`
}

func (*ValuesReference) DeepCopy

func (in *ValuesReference) DeepCopy() *ValuesReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValuesReference.

func (*ValuesReference) DeepCopyInto

func (in *ValuesReference) DeepCopyInto(out *ValuesReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ValuesReference) GetValuesKey

func (in ValuesReference) GetValuesKey() string

GetValuesKey returns the defined ValuesKey, or the default ('values.yaml').