Documentation ¶
Overview ¶
Package v2beta2 contains API Schema definitions for the helm v2beta2 API group +kubebuilder:object:generate=true +groupName=helm.toolkit.fluxcd.io
Index ¶
- Constants
- Variables
- func ShouldHandleForceRequest(obj *HelmRelease) bool
- func ShouldHandleResetRequest(obj *HelmRelease) bool
- type CRDsPolicy
- type CrossNamespaceObjectReference
- type CrossNamespaceSourceReference
- type DriftDetection
- type DriftDetectionMode
- type Filter
- type HelmChartTemplate
- type HelmChartTemplateObjectMeta
- type HelmChartTemplateSpec
- type HelmChartTemplateVerification
- type HelmRelease
- func (in *HelmRelease) DeepCopy() *HelmRelease
- func (in *HelmRelease) DeepCopyInto(out *HelmRelease)
- func (in *HelmRelease) DeepCopyObject() runtime.Object
- func (in HelmRelease) GetActiveRemediation() Remediation
- func (in HelmRelease) GetConditions() []metav1.Condition
- func (in HelmRelease) GetDependsOn() []meta.NamespacedObjectReference
- func (in *HelmRelease) GetDriftDetection() DriftDetection
- func (in HelmRelease) GetHelmChartName() string
- func (in *HelmRelease) GetInstall() Install
- func (in HelmRelease) GetMaxHistory() int
- func (in HelmRelease) GetReleaseName() string
- func (in HelmRelease) GetReleaseNamespace() string
- func (in HelmRelease) GetRequeueAfter() time.Duration
- func (in *HelmRelease) GetRollback() Rollback
- func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition
- func (in HelmRelease) GetStorageNamespace() string
- func (in *HelmRelease) GetTest() Test
- func (in HelmRelease) GetTimeout() metav1.Duration
- func (in *HelmRelease) GetUninstall() Uninstall
- func (in *HelmRelease) GetUpgrade() Upgrade
- func (in HelmRelease) GetValues() map[string]interface{}
- func (in *HelmRelease) HasChartRef() bool
- func (in *HelmRelease) HasChartTemplate() bool
- func (in *HelmRelease) SetConditions(conditions []metav1.Condition)
- func (in HelmRelease) UsePersistentClient() bool
- type HelmReleaseList
- type HelmReleaseSpec
- type HelmReleaseStatus
- func (in *HelmReleaseStatus) ClearFailures()
- func (in *HelmReleaseStatus) ClearHistory()
- func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus
- func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus)
- func (in HelmReleaseStatus) GetHelmChart() (string, string)
- func (in *HelmReleaseStatus) GetLastAttemptedRevision() string
- type IgnoreRule
- 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 Kustomize
- type PostRenderer
- type ReleaseAction
- type Remediation
- type RemediationStrategy
- type Rollback
- type Snapshot
- func (in *Snapshot) DeepCopy() *Snapshot
- func (in *Snapshot) DeepCopyInto(out *Snapshot)
- func (in *Snapshot) FullReleaseName() string
- func (in *Snapshot) GetTestHooks() map[string]*TestHookStatus
- func (in *Snapshot) HasBeenTested() bool
- func (in *Snapshot) HasTestInPhase(phase string) bool
- func (in *Snapshot) SetTestHooks(hooks map[string]*TestHookStatus)
- func (in *Snapshot) Targets(name, namespace string, version int) bool
- func (in *Snapshot) VersionedChartName() string
- type Snapshots
- type Test
- type TestHookStatus
- 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 ( // ForceRequestAnnotation is the annotation used for triggering a one-off forced // Helm release, even when there are no new changes in the HelmRelease. // The value is interpreted as a token, and must equal the value of // meta.ReconcileRequestAnnotation in order to trigger a release. ForceRequestAnnotation string = "reconcile.fluxcd.io/forceAt" // ResetRequestAnnotation is the annotation used for resetting the failure counts // of a HelmRelease, so that it can be retried again. // The value is interpreted as a token, and must equal the value of // meta.ReconcileRequestAnnotation in order to reset the failure counts. ResetRequestAnnotation string = "reconcile.fluxcd.io/resetAt" )
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 ( // HelmReleaseKind is the kind in string format. HelmReleaseKind = "HelmRelease" // HelmReleaseFinalizer is set on a HelmRelease when it is first handled by // the controller, and removed when this object is deleted. HelmReleaseFinalizer = "finalizers.fluxcd.io" )
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: "v2beta2"} // 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 )
var ( // DriftDetectionMetadataKey is the label or annotation key used to disable // the diffing of an object. DriftDetectionMetadataKey = GroupVersion.Group + "/driftDetection" // DriftDetectionDisabledValue is the value used to disable the diffing of // an object using DriftDetectionMetadataKey. DriftDetectionDisabledValue = "disabled" )
Functions ¶
func ShouldHandleForceRequest ¶
func ShouldHandleForceRequest(obj *HelmRelease) bool
ShouldHandleForceRequest returns true if the HelmRelease has a force request annotation, and the value of the annotation matches the value of the meta.ReconcileRequestAnnotation annotation.
To ensure that the force request is handled only once, the value of HelmReleaseStatus.LastHandledForceAt is updated to match the value of the force request annotation (even if the force request is not handled because the value of the meta.ReconcileRequestAnnotation annotation does not match).
func ShouldHandleResetRequest ¶
func ShouldHandleResetRequest(obj *HelmRelease) bool
ShouldHandleResetRequest returns true if the HelmRelease has a reset request annotation, and the value of the annotation matches the value of the meta.ReconcileRequestAnnotation annotation.
To ensure that the reset request is handled only once, the value of HelmReleaseStatus.LastHandledResetAt is updated to match the value of the reset request annotation (even if the reset request is not handled because the value of the meta.ReconcileRequestAnnotation annotation does not match).
Types ¶
type CRDsPolicy ¶
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 CrossNamespaceSourceReference ¶ added in v1.0.0
type CrossNamespaceSourceReference struct { // APIVersion of the referent. // +optional APIVersion string `json:"apiVersion,omitempty"` // Kind of the referent. // +kubebuilder:validation:Enum=OCIRepository;HelmChart // +required Kind string `json:"kind"` // Name of the referent. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +required Name string `json:"name"` // Namespace of the referent, defaults to the namespace of the Kubernetes // resource object that contains the reference. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Optional // +optional Namespace string `json:"namespace,omitempty"` }
CrossNamespaceSourceReference contains enough information to let you locate the typed referenced object at cluster level.
func (*CrossNamespaceSourceReference) DeepCopy ¶ added in v1.0.0
func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.
func (*CrossNamespaceSourceReference) DeepCopyInto ¶ added in v1.0.0
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DriftDetection ¶
type DriftDetection struct { // Mode defines how differences should be handled between the Helm manifest // and the manifest currently applied to the cluster. // If not explicitly set, it defaults to DiffModeDisabled. // +kubebuilder:validation:Enum=enabled;warn;disabled // +optional Mode DriftDetectionMode `json:"mode,omitempty"` // Ignore contains a list of rules for specifying which changes to ignore // during diffing. // +optional Ignore []IgnoreRule `json:"ignore,omitempty"` }
DriftDetection defines the strategy for performing differential analysis and provides a way to define rules for ignoring specific changes during this process.
func (*DriftDetection) DeepCopy ¶
func (in *DriftDetection) DeepCopy() *DriftDetection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriftDetection.
func (*DriftDetection) DeepCopyInto ¶
func (in *DriftDetection) DeepCopyInto(out *DriftDetection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (DriftDetection) GetMode ¶
func (d DriftDetection) GetMode() DriftDetectionMode
GetMode returns the DiffMode set on the Diff, or DiffModeDisabled if not set.
func (DriftDetection) MustDetectChanges ¶
func (d DriftDetection) MustDetectChanges() bool
MustDetectChanges returns true if the DiffMode is set to DiffModeEnabled or DiffModeWarn.
type DriftDetectionMode ¶
type DriftDetectionMode string
DriftDetectionMode represents the modes in which a controller can detect and handle differences between the manifest in the Helm storage and the resources currently existing in the cluster.
var ( // DriftDetectionEnabled instructs the controller to actively detect any // changes between the manifest in the Helm storage and the resources // currently existing in the cluster. // If any differences are detected, the controller will automatically // correct the cluster state by performing a Helm upgrade. DriftDetectionEnabled DriftDetectionMode = "enabled" // DriftDetectionWarn instructs the controller to actively detect any // changes between the manifest in the Helm storage and the resources // currently existing in the cluster. // If any differences are detected, the controller will emit a warning // without automatically correcting the cluster state. DriftDetectionWarn DriftDetectionMode = "warn" // DriftDetectionDisabled instructs the controller to skip detection of // differences entirely. // This is the default behavior, and the controller will not actively // detect or respond to differences between the manifest in the Helm // storage and the resources currently existing in the cluster. DriftDetectionDisabled DriftDetectionMode = "disabled" )
type Filter ¶
type Filter struct { // Name is the name of the test. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +required Name string `json:"name"` // Exclude specifies whether the named test should be excluded. // +optional Exclude bool `json:"exclude,omitempty"` }
Filter holds the configuration for individual Helm test filters.
func (*Filter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (*Filter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmChartTemplate ¶
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"` }
HelmChartTemplate defines the template from which the controller will generate a v1beta2.HelmChart object in the same namespace as the referenced v1.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 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 ¶
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"` }
HelmChartTemplateObjectMeta defines the template for the ObjectMeta of a v1beta2.HelmChart.
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 ¶
type HelmChartTemplateSpec struct { // The name or path the Helm chart is available at in the SourceRef. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=2048 // +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 v1.Source the chart is available at. // +required SourceRef CrossNamespaceObjectReference `json:"sourceRef"` // Interval at which to check the v1.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"` // IgnoreMissingValuesFiles controls whether to silently ignore missing values files rather than failing. // +optional IgnoreMissingValuesFiles bool `json:"ignoreMissingValuesFiles,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"` }
HelmChartTemplateSpec defines the template from which the controller will generate a v1beta2.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 HelmChartTemplateVerification ¶
type HelmChartTemplateVerification struct { // Provider specifies the technology used to sign the OCI Helm chart. // +kubebuilder:validation:Enum=cosign;notation // +kubebuilder:default:=cosign Provider string `json:"provider"` // SecretRef specifies the Kubernetes Secret containing the // trusted public keys. // +optional SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` }
HelmChartTemplateVerification verifies the authenticity of an OCI Helm chart.
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 ¶
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 (*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) GetActiveRemediation ¶
func (in HelmRelease) GetActiveRemediation() Remediation
GetActiveRemediation returns the active Remediation configuration for the HelmRelease.
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) GetDriftDetection ¶
func (in *HelmRelease) GetDriftDetection() DriftDetection
GetDriftDetection returns the configuration for detecting and handling differences between the manifest in the Helm storage and the resources currently existing in the cluster.
func (HelmRelease) GetHelmChartName ¶
func (in HelmRelease) GetHelmChartName() string
GetHelmChartName returns the name used by the controller for the HelmChart creation.
func (*HelmRelease) GetInstall ¶
func (in *HelmRelease) GetInstall() Install
GetInstall returns the configuration for Helm install actions for the HelmRelease.
func (HelmRelease) GetMaxHistory ¶
func (in HelmRelease) GetMaxHistory() int
GetMaxHistory returns the configured MaxHistory, or the default of 5.
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) GetRollback ¶
func (in *HelmRelease) GetRollback() Rollback
GetRollback returns the configuration for Helm rollback actions for this HelmRelease.
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) GetTest ¶
func (in *HelmRelease) GetTest() Test
GetTest returns the configuration for Helm test actions for this HelmRelease.
func (HelmRelease) GetTimeout ¶
func (in HelmRelease) GetTimeout() metav1.Duration
GetTimeout returns the configured Timeout, or the default of 300s.
func (*HelmRelease) GetUninstall ¶
func (in *HelmRelease) GetUninstall() Uninstall
GetUninstall returns the configuration for Helm uninstall actions for this HelmRelease.
func (*HelmRelease) GetUpgrade ¶
func (in *HelmRelease) GetUpgrade() Upgrade
GetUpgrade returns the configuration for Helm upgrade actions for this HelmRelease.
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) HasChartRef ¶ added in v1.0.0
func (in *HelmRelease) HasChartRef() bool
IsChartRefPresent returns true if the HelmRelease has a ChartRef.
func (*HelmRelease) HasChartTemplate ¶ added in v1.0.0
func (in *HelmRelease) HasChartTemplate() bool
IsChartTemplatePresent returns true if the HelmRelease has a ChartTemplate.
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 ¶
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 v1beta2.HelmChart that should be created // for this HelmRelease. // +optional 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 v2beta2 HelmReleases. // +optional ChartRef *CrossNamespaceSourceReference `json:"chartRef,omitempty"` // Interval at which to reconcile the Helm release. // +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 '5'. // +optional MaxHistory *int `json:"maxHistory,omitempty"` // The name of the Kubernetes service account to impersonate // when reconciling this HelmRelease. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +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. // +optional DriftDetection *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"` }
HelmReleaseSpec defines the desired state of a Helm release. +kubebuilder:validation:XValidation:rule="(has(self.chart) && !has(self.chartRef)) || (!has(self.chart) && has(self.chartRef))", message="either chart or chartRef must be set"
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.
type HelmReleaseStatus ¶
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"` // LastAttemptedGeneration is the last generation the controller attempted // to reconcile. // +optional LastAttemptedGeneration int64 `json:"lastAttemptedGeneration,omitempty"` // Conditions holds the conditions for the HelmRelease. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // HelmChart is the namespaced name of the HelmChart resource created by // the controller for the HelmRelease. // +optional HelmChart string `json:"helmChart,omitempty"` // StorageNamespace is the namespace of the Helm release storage for the // current release. // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Optional // +optional StorageNamespace string `json:"storageNamespace,omitempty"` // History holds the history of Helm releases performed for this HelmRelease // up to the last successfully completed release. // +optional History v2.Snapshots `json:"history,omitempty"` // LastAttemptedReleaseAction is the last release action performed for this // HelmRelease. It is used to determine the active remediation strategy. // +kubebuilder:validation:Enum=install;upgrade // +optional LastAttemptedReleaseAction ReleaseAction `json:"lastAttemptedReleaseAction,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"` // LastAppliedRevision is the revision of the last successfully applied // source. // Deprecated: the revision can now be found in the History. // +optional LastAppliedRevision string `json:"lastAppliedRevision,omitempty"` // LastAttemptedRevision is the Source revision of the last reconciliation // attempt. For OCIRepository sources, the 12 first characters of the digest are // appended to the chart version e.g. "1.2.3+1234567890ab". // +optional LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"` // LastAttemptedRevisionDigest is the digest of the last reconciliation attempt. // This is only set for OCIRepository sources. // +optional LastAttemptedRevisionDigest string `json:"lastAttemptedRevisionDigest,omitempty"` // LastAttemptedValuesChecksum is the SHA1 checksum for the values of the last // reconciliation attempt. // Deprecated: Use LastAttemptedConfigDigest instead. // +optional LastAttemptedValuesChecksum string `json:"lastAttemptedValuesChecksum,omitempty"` // LastReleaseRevision is the revision of the last successful Helm release. // Deprecated: Use History instead. // +optional LastReleaseRevision int `json:"lastReleaseRevision,omitempty"` // LastAttemptedConfigDigest is the digest for the config (better known as // "values") of the last reconciliation attempt. // +optional LastAttemptedConfigDigest string `json:"lastAttemptedConfigDigest,omitempty"` // LastHandledForceAt holds the value of the most recent force request // value, so a change of the annotation value can be detected. // +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. // +optional LastHandledResetAt string `json:"lastHandledResetAt,omitempty"` meta.ReconcileRequestStatus `json:",inline"` }
HelmReleaseStatus defines the observed state of a HelmRelease.
func (*HelmReleaseStatus) ClearFailures ¶
func (in *HelmReleaseStatus) ClearFailures()
ClearFailures clears the failure counters.
func (*HelmReleaseStatus) ClearHistory ¶
func (in *HelmReleaseStatus) ClearHistory()
ClearHistory clears the History.
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.
func (*HelmReleaseStatus) GetLastAttemptedRevision ¶ added in v1.0.0
func (in *HelmReleaseStatus) GetLastAttemptedRevision() string
type IgnoreRule ¶
type IgnoreRule struct { // Paths is a list of JSON Pointer (RFC 6901) paths to be excluded from // consideration in a Kubernetes object. // +required Paths []string `json:"paths"` // Target is a selector for specifying Kubernetes objects to which this // rule applies. // If Target is not set, the Paths will be ignored for all Kubernetes // objects within the manifest of the Helm release. // +optional Target *kustomize.Selector `json:"target,omitempty"` }
IgnoreRule defines a rule to selectively disregard specific changes during the drift detection process.
func (*IgnoreRule) DeepCopy ¶
func (in *IgnoreRule) DeepCopy() *IgnoreRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnoreRule.
func (*IgnoreRule) DeepCopyInto ¶
func (in *IgnoreRule) DeepCopyInto(out *IgnoreRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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'. // +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"` }
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) 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 Kustomize ¶
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. // Deprecated: use Patches instead. // +optional PatchesStrategicMerge []apiextensionsv1.JSON `json:"patchesStrategicMerge,omitempty"` // JSON 6902 patches, defined as inline YAML objects. // Deprecated: use Patches instead. // +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" json:"images,omitempty"` }
Kustomize Helm PostRenderer specification.
func (*Kustomize) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kustomize.
func (*Kustomize) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostRenderer ¶
type PostRenderer struct { // Kustomization to apply as PostRenderer. // +optional Kustomize *Kustomize `json:"kustomize,omitempty"` }
PostRenderer contains a Helm PostRenderer specification.
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 ReleaseAction ¶
type ReleaseAction string
ReleaseAction is the action to perform a Helm release.
const ( // ReleaseActionInstall represents a Helm install action. ReleaseActionInstall ReleaseAction = "install" // ReleaseActionUpgrade represents a Helm upgrade action. ReleaseActionUpgrade ReleaseAction = "upgrade" )
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'. // +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"` }
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 Snapshot ¶
type Snapshot struct { // APIVersion is the API version of the Snapshot. // Provisional: when the calculation method of the Digest field is changed, // this field will be used to distinguish between the old and new methods. // +optional APIVersion string `json:"apiVersion,omitempty"` // Digest is the checksum of the release object in storage. // It has the format of `<algo>:<checksum>`. // +required Digest string `json:"digest"` // Name is the name of the release. // +required Name string `json:"name"` // Namespace is the namespace the release is deployed to. // +required Namespace string `json:"namespace"` // Version is the version of the release object in storage. // +required Version int `json:"version"` // Status is the current state of the release. // +required Status string `json:"status"` // ChartName is the chart name of the release object in storage. // +required ChartName string `json:"chartName"` // ChartVersion is the chart version of the release object in // storage. // +required ChartVersion string `json:"chartVersion"` // ConfigDigest is the checksum of the config (better known as // "values") of the release object in storage. // It has the format of `<algo>:<checksum>`. // +required ConfigDigest string `json:"configDigest"` // FirstDeployed is when the release was first deployed. // +required FirstDeployed metav1.Time `json:"firstDeployed"` // LastDeployed is when the release was last deployed. // +required LastDeployed metav1.Time `json:"lastDeployed"` // Deleted is when the release was deleted. // +optional Deleted metav1.Time `json:"deleted,omitempty"` // TestHooks is the list of test hooks for the release as observed to be // run by the controller. // +optional TestHooks *map[string]*TestHookStatus `json:"testHooks,omitempty"` // OCIDigest is the digest of the OCI artifact associated with the release. // +optional OCIDigest string `json:"ociDigest,omitempty"` }
Snapshot captures a point-in-time copy of the status information for a Helm release, as managed by the controller.
func (*Snapshot) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.
func (*Snapshot) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Snapshot) FullReleaseName ¶
FullReleaseName returns the full name of the release in the format of '<namespace>/<name>.<version>
func (*Snapshot) GetTestHooks ¶
func (in *Snapshot) GetTestHooks() map[string]*TestHookStatus
GetTestHooks returns the TestHooks for the release if not nil.
func (*Snapshot) HasBeenTested ¶
HasBeenTested returns true if TestHooks is not nil. This includes an empty map, which indicates the chart has no tests.
func (*Snapshot) HasTestInPhase ¶
HasTestInPhase returns true if any of the TestHooks is in the given phase.
func (*Snapshot) SetTestHooks ¶
func (in *Snapshot) SetTestHooks(hooks map[string]*TestHookStatus)
SetTestHooks sets the TestHooks for the release.
func (*Snapshot) VersionedChartName ¶
VersionedChartName returns the full name of the chart in the format of '<name>@<version>'.
type Snapshots ¶
type Snapshots []*Snapshot
Snapshots is a list of Snapshot objects.
func (Snapshots) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshots.
func (Snapshots) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Snapshots) Previous ¶
Previous returns the most recent Snapshot before the Latest that has a status of "deployed" or "superseded", or nil if there is no such Snapshot. Unless ignoreTests is true, Snapshots with a test in the "Failed" phase are ignored.
func (Snapshots) SortByVersion ¶
func (in Snapshots) SortByVersion()
SortByVersion sorts the Snapshots by version, in descending order.
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'. // +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"` // Filters is a list of tests to run or exclude from running. Filters *[]Filter `json:"filters,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.
func (Test) GetFilters ¶
GetFilters returns the configured filters for the Helm test action/
type TestHookStatus ¶
type TestHookStatus struct { // LastStarted is the time the test hook was last started. // +optional LastStarted metav1.Time `json:"lastStarted,omitempty"` // LastCompleted is the time the test hook last completed. // +optional LastCompleted metav1.Time `json:"lastCompleted,omitempty"` // Phase the test hook was observed to be in. // +optional Phase string `json:"phase,omitempty"` }
TestHookStatus holds the status information for a test hook as observed to be run by the controller.
func (*TestHookStatus) DeepCopy ¶
func (in *TestHookStatus) DeepCopy() *TestHookStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestHookStatus.
func (*TestHookStatus) DeepCopyInto ¶
func (in *TestHookStatus) DeepCopyInto(out *TestHookStatus)
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'. // +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"` }
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.
func (Uninstall) GetDeletionPropagation ¶
GetDeletionPropagation returns the configured deletion propagation policy for the Helm uninstall action, or 'background'.
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'. // +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"` }
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) 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'. // +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"` }
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').