Documentation ¶
Index ¶
- func CalculateRolloutPhase(spec v1alpha1.RolloutSpec, status v1alpha1.RolloutStatus) (v1alpha1.RolloutPhase, string)
- func CanaryStepString(c v1alpha1.CanaryStep) string
- func GetRolloutPhase(ro *v1alpha1.Rollout) (v1alpha1.RolloutPhase, string)
- func IsFullyPromoted(ro *v1alpha1.Rollout) bool
- func IsUnpausing(ro *v1alpha1.Rollout) bool
- func ShouldVerifyWeight(ro *v1alpha1.Rollout, desiredWeight int32) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateRolloutPhase ¶
func CalculateRolloutPhase(spec v1alpha1.RolloutSpec, status v1alpha1.RolloutStatus) (v1alpha1.RolloutPhase, string)
CalculateRolloutPhase calculates a rollout phase and message for the given rollout based on rollout spec and status. This function is intended to be used by the controller (and not by clients). Clients should instead call GetRolloutPhase, which takes into consideration status.observedGeneration
func CanaryStepString ¶
func CanaryStepString(c v1alpha1.CanaryStep) string
CanaryStepString returns a string representation of a canary step
func GetRolloutPhase ¶
func GetRolloutPhase(ro *v1alpha1.Rollout) (v1alpha1.RolloutPhase, string)
GetRolloutPhase returns a status and message for a rollout. Takes into consideration whether or not metadata.generation was observed in status.observedGeneration use this instead of CalculateRolloutPhase
func IsFullyPromoted ¶ added in v1.1.0
IsFullyPromoted returns whether or not the given rollout is in a fully promoted state. (versus being in the middle of an update). This is determined by checking if stable hash == desired hash
func IsUnpausing ¶ added in v1.2.0
IsUnpausing detects if we are in the process of unpausing a rollout. This is determined by seeing if status.controllerPause is true, but the list of pause conditions (status.pauseConditions) is empty. This implies that a user cleared the pause conditions but controller has not yet observed or reacted to it. NOTE: this function is necessary because unlike metadata.generation & status.observedGeneration status.controllerPause & status.pauseConditions are both status fields and does not benefit from the auto-incrementing behavior of metadata.generation.
Types ¶
This section is empty.