Documentation ¶
Overview ¶
This package is for maintaining the link between `HelmRelease` resources and the Helm releases to which they correspond. Specifically,
updating the `HelmRelease` status based on the progress of syncing, and the state of the associated Helm release; and,
attributing each resource in a Helm release (under our control) to the associated `HelmRelease`.
Index ¶
- Constants
- Variables
- func ConditionsForPhase(hr *v1.HelmRelease, phase v1.HelmReleasePhase) ([]v1.HelmReleaseCondition, bool)
- func GetCondition(status v1.HelmReleaseStatus, conditionType v1.HelmReleaseConditionType) *v1.HelmReleaseCondition
- func HasRolledBack(hr *v1.HelmRelease) bool
- func HasSynced(hr *v1.HelmRelease) bool
- func ObserveReleaseConditions(old *v1.HelmRelease, new *v1.HelmRelease)
- func SetConditions(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, ...) error
- func SetObservedGeneration(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, generation int64) error
- func SetReleaseRevision(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, revision string) error
- func SetReleaseStatus(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, ...) error
- func SetStatusPhase(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, ...) error
- func SetStatusPhaseWithRevision(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, ...) error
- func ShouldRetryUpgrade(hr *v1.HelmRelease) bool
- type Updater
Constants ¶
const ( LabelTargetNamespace = "target_namespace" LabelReleaseName = "release_name" LabelCondition = "condition" )
Variables ¶
var Clock clock.Clock = clock.RealClock{}
Clock is defined as a var so it can be stubbed during tests.
Functions ¶
func ConditionsForPhase ¶ added in v1.1.0
func ConditionsForPhase(hr *v1.HelmRelease, phase v1.HelmReleasePhase) ([]v1.HelmReleaseCondition, bool)
ConditionsForPhrase returns conditions for the given phase.
func GetCondition ¶
func GetCondition(status v1.HelmReleaseStatus, conditionType v1.HelmReleaseConditionType) *v1.HelmReleaseCondition
func HasRolledBack ¶
func HasRolledBack(hr *v1.HelmRelease) bool
HasRolledBack returns if the current generation of the HelmRelease has been rolled back.
func HasSynced ¶
func HasSynced(hr *v1.HelmRelease) bool
HasSynced returns if the HelmRelease has been processed by the controller.
func ObserveReleaseConditions ¶ added in v1.1.0
func ObserveReleaseConditions(old *v1.HelmRelease, new *v1.HelmRelease)
func SetConditions ¶ added in v1.1.0
func SetConditions(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, conditions []v1.HelmReleaseCondition, setters ...func(*v1.HelmRelease)) error
func SetObservedGeneration ¶
func SetObservedGeneration(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, generation int64) error
SetObservedGeneration updates the observed generation status of the HelmRelease to the given generation.
func SetReleaseRevision ¶
func SetReleaseRevision(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, revision string) error
SetReleaseRevision updates the revision in the status of the HelmRelease to the given revision, and sets the current revision as the previous one.
func SetReleaseStatus ¶
func SetReleaseStatus(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, releaseName, releaseStatus string) error
SetReleaseStatus updates the status of the HelmRelease to the given release name and/or release status.
func SetStatusPhase ¶
func SetStatusPhase(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, phase v1.HelmReleasePhase, setters ...func(*v1.HelmRelease)) error
func SetStatusPhaseWithRevision ¶ added in v1.1.0
func SetStatusPhaseWithRevision(client v1client.HelmReleaseInterface, hr *v1.HelmRelease, phase v1.HelmReleasePhase, revision string) error
func ShouldRetryUpgrade ¶
func ShouldRetryUpgrade(hr *v1.HelmRelease) bool
ShouldRetryUpgrade returns if the upgrade of a rolled back release should be retried.