Documentation ¶
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
- type CRDsPolicy
- type CrossNamespaceObjectReference
- type DeploymentAction
- type HelmChartTemplate
- type HelmChartTemplateSpec
- 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) GetDependsOn() (types.NamespacedName, []dependency.CrossNamespaceDependencyReference)
- func (in HelmRelease) GetHelmChartName() string
- func (in HelmRelease) GetMaxHistory() int
- func (in HelmRelease) GetReleaseName() string
- func (in HelmRelease) GetReleaseNamespace() string
- func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition
- func (in HelmRelease) GetStorageNamespace() string
- func (in HelmRelease) GetTimeout() metav1.Duration
- func (in HelmRelease) GetValues() map[string]interface{}
- type HelmReleaseList
- 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
- type Install
- 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 KubeConfig
- type Kustomize
- type PostRenderer
- type Remediation
- type RemediationStrategy
- type Rollback
- type Test
- type Uninstall
- type Upgrade
- 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
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" )
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 )
Functions ¶
This section is empty.
Types ¶
type CRDsPolicy ¶ added in v0.10.0
type CRDsPolicy string
CRDsPolicy defines the install/upgrade approach to use for CRDs when installing or upgrading a HelmRelease.
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 ¶
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"` }
CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level.
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 ¶
type DeploymentAction interface { GetDescription() string GetRemediation() Remediation }
DeploymentAction defines a consistent interface for Install and Upgrade. +kubebuilder:object:generate=false
type HelmChartTemplate ¶
type HelmChartTemplate struct { // Spec holds the template for the v1beta1.HelmChartSpec for this HelmRelease. // +required Spec HelmChartTemplateSpec `json:"spec"` }
HelmChartTemplate defines the template from which the controller will generate a v1beta1.HelmChart object in the same namespace as the referenced v1beta1.Source.
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 v1beta1.HelmChart, or the given default.
func (HelmChartTemplate) GetNamespace ¶
func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string
GetNamespace returns the namespace targeted namespace for the v1beta1.HelmChart, or the given default.
type HelmChartTemplateSpec ¶
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 v1beta1.GitRepository and // v1beta1.Bucket sources. Defaults to latest when omitted. // +kubebuilder:default:=* // +optional Version string `json:"version,omitempty"` // The name and namespace of the v1beta1.Source the chart is available at. // +required SourceRef CrossNamespaceObjectReference `json:"sourceRef"` // Interval at which to check the v1beta1.Source for updates. Defaults to // 'HelmReleaseSpec.Interval'. // +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"` }
HelmChartTemplateSpec defines the template from which the controller will generate a v1beta1.HelmChartSpec object.
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 HelmRelease ¶
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"` }
HelmRelease is the Schema for the helmreleases API
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.
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) GetDependsOn ¶
func (in HelmRelease) GetDependsOn() (types.NamespacedName, []dependency.CrossNamespaceDependencyReference)
GetDependsOn returns the types.NamespacedName of the HelmRelease, and a dependency.CrossNamespaceDependencyReference slice it depends on.
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) GetStatusConditions ¶ added in v0.3.0
func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition
GetStatusConditions returns a pointer to the Status.Conditions slice
func (HelmRelease) GetStorageNamespace ¶ added in v0.6.1
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.
type HelmReleaseList ¶
type HelmReleaseList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HelmRelease `json:"items"` }
HelmReleaseList contains a list of HelmRelease objects.
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 ¶
type HelmReleaseSpec struct { // Chart defines the template of the v1beta1.HelmChart that should be created // for this HelmRelease. // +required Chart HelmChartTemplate `json:"chart"` // Interval at which to reconcile the Helm release. // +required Interval metav1.Duration `json:"interval"` // KubeConfig for reconciling the HelmRelease on a remote cluster. // When specified, KubeConfig takes precedence over ServiceAccountName. // +optional KubeConfig *KubeConfig `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 dependency.CrossNamespaceDependencyReference slice with // references to HelmRelease resources that must be ready before this HelmRelease // can be reconciled. // +optional DependsOn []dependency.CrossNamespaceDependencyReference `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'. // +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"` // 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"` }
HelmReleaseSpec defines the desired state of a Helm release.
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 ¶
type HelmReleaseStatus struct { // ObservedGeneration is the last observed generation. // +optional ObservedGeneration int64 `json:"observedGeneration,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"` }
HelmReleaseStatus defines the observed state of a HelmRelease.
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 ¶
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'. // +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"` }
Install holds the configuration for Helm install actions performed for this HelmRelease.
func (*Install) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Install.
func (*Install) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Install) GetDescription ¶
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.
type InstallRemediation ¶
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"` }
InstallRemediation holds the configuration for Helm install remediation.
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 KubeConfig ¶ added in v0.2.0
type KubeConfig struct { // SecretRef holds the name to a secret that contains a 'value' key with // the kubeconfig file as the value. It must be in the same namespace as // the HelmRelease. // It is recommended that the kubeconfig is self-contained, and the secret // is regularly updated if credentials such as a cloud-access-token expire. // Cloud specific `cmd-path` auth helpers will not function without adding // binaries and credentials to the Pod that is responsible for reconciling // the HelmRelease. // +required SecretRef meta.LocalObjectReference `json:"secretRef,omitempty"` }
KubeConfig references a Kubernetes secret that contains a kubeconfig file.
func (*KubeConfig) DeepCopy ¶ added in v0.2.0
func (in *KubeConfig) DeepCopy() *KubeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeConfig.
func (*KubeConfig) DeepCopyInto ¶ added in v0.2.0
func (in *KubeConfig) DeepCopyInto(out *KubeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Kustomize ¶ added in v0.7.0
type Kustomize struct { // 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"` }
Kustomize Helm PostRenderer specification.
func (*Kustomize) DeepCopy ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kustomize.
func (*Kustomize) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostRenderer ¶ added in v0.7.0
type PostRenderer struct { // Kustomization to apply as PostRenderer. // +optional Kustomize *Kustomize `json:"kustomize,omitempty"` }
PostRenderer contains a Helm PostRenderer specification.
func (*PostRenderer) DeepCopy ¶ added in v0.7.0
func (in *PostRenderer) DeepCopy() *PostRenderer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostRenderer.
func (*PostRenderer) DeepCopyInto ¶ added in v0.7.0
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 ¶
type Remediation interface { GetRetries() int MustIgnoreTestFailures(bool) bool MustRemediateLastFailure() bool GetStrategy() RemediationStrategy GetFailureCount(hr HelmRelease) int64 IncrementFailureCount(hr *HelmRelease) RetriesExhausted(hr HelmRelease) bool }
Remediation defines a consistent interface for InstallRemediation and UpgradeRemediation. +kubebuilder:object:generate=false
type RemediationStrategy ¶
type RemediationStrategy string
RemediationStrategy returns the strategy to use to remediate a failed install or upgrade.
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 ¶
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'. // +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"` }
Rollback holds the configuration for Helm rollback actions for this HelmRelease.
func (*Rollback) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rollback.
func (*Rollback) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Test ¶
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'. // +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"` }
Test holds the configuration for Helm test actions for this HelmRelease.
func (*Test) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (*Test) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Uninstall ¶
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'. // +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"` }
Uninstall holds the configuration for Helm uninstall actions for this HelmRelease.
func (*Uninstall) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Uninstall.
func (*Uninstall) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Upgrade ¶
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'. // +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"` }
Upgrade holds the configuration for Helm upgrade actions for this HelmRelease.
func (*Upgrade) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upgrade.
func (*Upgrade) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Upgrade) GetDescription ¶
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.
type UpgradeRemediation ¶
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"` }
UpgradeRemediation holds the configuration for Helm upgrade remediation.
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 ¶
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'. // +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. // +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"` }
ValuesReference contains a reference to a resource containing Helm values, and optionally the key they can be found at.
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').