v2alpha1

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// ReadyCondition represents the fact that the HelmRelease has been successfully reconciled.
	ReadyCondition string = "Ready"

	// ReleasedCondition represents the fact that the HelmRelease has been successfully released.
	ReleasedCondition string = "Released"

	// TestSuccessCondition represents the fact that the tests for the HelmRelease are succeeding.
	TestSuccessCondition string = "TestSuccess"

	// RemediatedCondition represents the fact that the HelmRelease has been successfully remediated.
	RemediatedCondition string = "Remediated"
)
View Source
const (
	// ReconciliationSucceededReason represents the fact that the reconciliation of the HelmRelease has succeeded.
	ReconciliationSucceededReason string = "ReconciliationSucceeded"

	// ReconciliationFailedReason represents the fact that the reconciliation of the HelmRelease has failed.
	ReconciliationFailedReason string = "ReconciliationFailed"

	// 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 = "TestsFailed"

	// 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"

	// ProgressingReason represents the fact that the reconciliation for the resource is underway.
	ProgressingReason string = "Progressing"

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

	// SuspendedReason represents the fact that the reconciliation of the HelmRelease is suspended.
	SuspendedReason string = "Suspended"
)
View Source
const HelmReleaseFinalizer = "finalizers.fluxcd.io"
View Source
const HelmReleaseKind = "HelmRelease"
View Source
const (
	// SourceIndexKey is the key used for indexing HelmReleases based on
	// their sources.
	SourceIndexKey string = ".metadata.source"
)

Variables

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

	// 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

func DeleteHelmReleaseCondition added in v0.0.9

func DeleteHelmReleaseCondition(hr *HelmRelease, condition string)

DeleteHelmReleaseCondition deletes the given condition of the given HelmRelease if present.

func SetHelmReleaseCondition

func SetHelmReleaseCondition(hr *HelmRelease, condition string, status corev1.ConditionStatus, reason, message string)

SetHelmReleaseCondition sets the given condition with the given status, reason and message on the HelmRelease.

Types

type Condition

type Condition struct {
	// Type of the condition, one of ('Ready', 'Install', 'Upgrade', 'Test', 'Rollback', 'Uninstall').
	// +required
	Type string `json:"type"`

	// Status of the condition, one of ('True', 'False', 'Unknown').
	// +required
	Status corev1.ConditionStatus `json:"status"`

	// LastTransitionTime is the timestamp corresponding to the last status
	// change of this condition.
	// +required
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason is a brief machine readable explanation for the condition's last
	// transition.
	// +required
	Reason string `json:"reason,omitempty"`

	// Message is a human readable description of the details of the last
	// transition, complementing reason.
	// +optional
	Message string `json:"message,omitempty"`
}

Condition contains condition information for a HelmRelease.

func GetHelmReleaseCondition added in v0.0.9

func GetHelmReleaseCondition(hr HelmRelease, condition string) *Condition

GetHelmReleaseCondition return the given condition of the given HelmRelease or nil if not present.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

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

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

func (*CrossNamespaceObjectReference) DeepCopyInto

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

type DeploymentAction added in v0.0.5

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 v1alpha1.HelmChartSpec for this HelmRelease.
	// +required
	Spec HelmChartTemplateSpec `json:"spec"`
}

HelmChartTemplate defines the template from which the controller will generate a v1alpha1.HelmChart object in the same namespace as the referenced v1alpha1.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 v1alpha1.HelmChart, or the given default.

func (HelmChartTemplate) GetNamespace

func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string

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

type HelmChartTemplateSpec added in v0.0.6

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 GitRepository and
	// Bucket sources. Defaults to latest when omitted.
	// +optional
	Version string `json:"version,omitempty"`

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

	// Interval at which to check the v1alpha1.Source for updates.
	// Defaults to 'HelmReleaseSpec.Interval'.
	// +optional
	Interval *metav1.Duration `json:"interval,omitempty"`

	// Alternative values file to use as the default chart values, expected to be
	// a relative path in the SourceRef. Ignored when omitted.
	// +optional
	ValuesFile string `json:"valuesFile,omitempty"`
}

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

func (*HelmChartTemplateSpec) DeepCopy added in v0.0.6

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

func (*HelmChartTemplateSpec) DeepCopyInto added in v0.0.6

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"`
	Status HelmReleaseStatus `json:"status,omitempty"`
}

HelmRelease is the Schema for the helmreleases API

func HelmReleaseAttempted added in v0.0.5

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 ReadyCondition to ConditionUnknown for 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 added in v0.0.9

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) 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 v1alpha1.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"`

	// 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"`

	// 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"`

	// 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"`
}

HelmReleaseSpec defines the desired state of HelmRelease.

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 added in v0.0.5

func (in HelmReleaseSpec) GetInstall() Install

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

func (HelmReleaseSpec) GetRollback added in v0.0.5

func (in HelmReleaseSpec) GetRollback() Rollback

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

func (HelmReleaseSpec) GetTest added in v0.0.5

func (in HelmReleaseSpec) GetTest() Test

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

func (HelmReleaseSpec) GetUninstall added in v0.0.5

func (in HelmReleaseSpec) GetUninstall() Uninstall

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

func (HelmReleaseSpec) GetUpgrade added in v0.0.5

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"`

	// LastObservedTime is the last time at which the HelmRelease was observed.
	// +optional
	LastObservedTime metav1.Time `json:"lastObservedTime,omitempty"`

	// Conditions holds the conditions for the HelmRelease.
	// +optional
	Conditions []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 observed state.
	// It is reset after a successful reconciliation.
	// +optional
	Failures int64 `json:"failures,omitempty"`

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

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

HelmReleaseStatus defines the observed state of 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"`

	// 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.
	// +optional
	SkipCRDs bool `json:"skipCRDs,omitempty"`
}

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

func (*Install) DeepCopy

func (in *Install) DeepCopy() *Install

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

func (*Install) DeepCopyInto

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

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

func (Install) GetDescription added in v0.0.5

func (in Install) GetDescription() string

GetDescription returns a description for the Helm install action.

func (Install) GetRemediation added in v0.0.5

func (in Install) GetRemediation() Remediation

GetRemediation returns the configured Remediation for the Helm install action.

func (Install) GetTimeout

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

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

type InstallRemediation added in v0.0.5

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 added in v0.0.5

func (in *InstallRemediation) DeepCopy() *InstallRemediation

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

func (*InstallRemediation) DeepCopyInto added in v0.0.5

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 added in v0.0.5

func (in InstallRemediation) GetFailureCount(hr HelmRelease) int64

GetFailureCount gets the failure count.

func (InstallRemediation) GetRetries added in v0.0.5

func (in InstallRemediation) GetRetries() int

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

func (InstallRemediation) GetStrategy added in v0.0.5

func (in InstallRemediation) GetStrategy() RemediationStrategy

GetStrategy returns the strategy to use for failure remediation.

func (InstallRemediation) IncrementFailureCount added in v0.0.5

func (in InstallRemediation) IncrementFailureCount(hr *HelmRelease)

IncrementFailureCount increments the failure count.

func (InstallRemediation) MustIgnoreTestFailures added in v0.0.5

func (in InstallRemediation) MustIgnoreTestFailures(def bool) bool

MustIgnoreTestFailures returns the configured IgnoreTestFailures or the given default.

func (InstallRemediation) MustRemediateLastFailure added in v0.0.5

func (in InstallRemediation) MustRemediateLastFailure() bool

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

func (InstallRemediation) RetriesExhausted added in v0.0.5

func (in InstallRemediation) RetriesExhausted(hr HelmRelease) bool

RetriesExhausted returns true if there are no remaining retries.

type Remediation added in v0.0.5

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 added in v0.0.5

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"`

	// 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

func (in *Rollback) DeepCopy() *Rollback

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

func (*Rollback) DeepCopyInto

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

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

func (Rollback) GetTimeout

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

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

type Test

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

func (in *Test) DeepCopy() *Test

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

func (*Test) DeepCopyInto

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

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

func (Test) GetTimeout

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

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

type Uninstall

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"`
}

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

func (*Uninstall) DeepCopy

func (in *Uninstall) DeepCopy() *Uninstall

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

func (*Uninstall) DeepCopyInto

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

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

func (Uninstall) GetTimeout

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

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

type Upgrade

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"`

	// 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"`
}

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

func (*Upgrade) DeepCopy

func (in *Upgrade) DeepCopy() *Upgrade

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

func (*Upgrade) DeepCopyInto

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

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

func (Upgrade) GetDescription added in v0.0.5

func (in Upgrade) GetDescription() string

GetDescription returns a description for the Helm upgrade action.

func (Upgrade) GetRemediation added in v0.0.5

func (in Upgrade) GetRemediation() Remediation

GetRemediation returns the configured Remediation for the Helm upgrade action.

func (Upgrade) GetTimeout

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

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

type UpgradeRemediation added in v0.0.5

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 added in v0.0.5

func (in *UpgradeRemediation) DeepCopy() *UpgradeRemediation

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

func (*UpgradeRemediation) DeepCopyInto added in v0.0.5

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 added in v0.0.5

func (in UpgradeRemediation) GetFailureCount(hr HelmRelease) int64

GetFailureCount gets the failure count.

func (UpgradeRemediation) GetRetries added in v0.0.5

func (in UpgradeRemediation) GetRetries() int

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

func (UpgradeRemediation) GetStrategy added in v0.0.5

func (in UpgradeRemediation) GetStrategy() RemediationStrategy

GetStrategy returns the strategy to use for failure remediation.

func (UpgradeRemediation) IncrementFailureCount added in v0.0.5

func (in UpgradeRemediation) IncrementFailureCount(hr *HelmRelease)

IncrementFailureCount increments the failure count.

func (UpgradeRemediation) MustIgnoreTestFailures added in v0.0.5

func (in UpgradeRemediation) MustIgnoreTestFailures(def bool) bool

MustIgnoreTestFailures returns the configured IgnoreTestFailures or the given default.

func (UpgradeRemediation) MustRemediateLastFailure added in v0.0.5

func (in UpgradeRemediation) MustRemediateLastFailure() bool

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

func (UpgradeRemediation) RetriesExhausted added in v0.0.5

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').

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL