Documentation
¶
Index ¶
- Constants
- func ComputeGenerationHash(spec v1alpha1.RolloutSpec) string
- func GetRolloutCondition(status v1alpha1.RolloutStatus, condType v1alpha1.RolloutConditionType) *v1alpha1.RolloutCondition
- func HasRevisionHistoryLimit(r *v1alpha1.Rollout) bool
- func NewRolloutCondition(condType v1alpha1.RolloutConditionType, status corev1.ConditionStatus, ...) *v1alpha1.RolloutCondition
- func RemoveRolloutCondition(status *v1alpha1.RolloutStatus, condType v1alpha1.RolloutConditionType)
- func RolloutComplete(rollout *v1alpha1.Rollout, newStatus *v1alpha1.RolloutStatus) bool
- func SetRolloutCondition(status *v1alpha1.RolloutStatus, condition v1alpha1.RolloutCondition)
- func VerifyRolloutSpec(rollout *v1alpha1.Rollout, prevCond *v1alpha1.RolloutCondition) *v1alpha1.RolloutCondition
Constants ¶
const ( // FailedRSCreateReason is added in a rollout when it cannot create a new replica set. FailedRSCreateReason = "ReplicaSetCreateError" // MissingFieldMessage the message to indicate rollout is missing a field MissingFieldMessage = "Rollout has missing field '%s'" // SameServicesMessage the message to indicate that the rollout uses the same service for the active and preview services SameServicesMessage = "This rollout uses the same service for the active and preview services, but two different services are required." // SelectAllMessage the message to indicate that the rollout has an empty selector SelectAllMessage = "This rollout is selecting all pods. A non-empty selector is required." // MissingStrategyTypeReason the reason to indicate that the rollout is missing the strategy field MissingStrategyTypeReason = "MissingStrategy" // MissingSelectorReason the reason to indicate that the rollout is missing the selector field MissingSelectorReason = "MissingSelector" // MissingBlueGreenStrategyReason the reason to indicate that the rollout is missing the .spec.strategy.blueGreen field MissingBlueGreenStrategyReason = "MissingBlueGreen" // MissingActiveServiceReason the reason to indicate that the rollout is missing the active service field MissingActiveServiceReason = "MissingActive" // InvalidSelectorReason the reason to indicate the selector is selecting all the pods InvalidSelectorReason = "InvalidSelector" // SameServicesReason the reason to indicate that the rollout uses the same service for the active and preview services SameServicesReason = "SameService" // Available the reason to indicate that the rollout is serving traffic from the active service Available = "Available" )
Variables ¶
This section is empty.
Functions ¶
func ComputeGenerationHash ¶
func ComputeGenerationHash(spec v1alpha1.RolloutSpec) string
ComputeGenerationHash returns a hash value calculated from the Rollout Spec. The hash will be safe encoded to avoid bad words.
func GetRolloutCondition ¶
func GetRolloutCondition(status v1alpha1.RolloutStatus, condType v1alpha1.RolloutConditionType) *v1alpha1.RolloutCondition
GetRolloutCondition returns the condition with the provided type.
func HasRevisionHistoryLimit ¶
HasRevisionHistoryLimit checks if the RevisionHistoryLimit field is set
func NewRolloutCondition ¶
func NewRolloutCondition(condType v1alpha1.RolloutConditionType, status corev1.ConditionStatus, reason, message string) *v1alpha1.RolloutCondition
NewRolloutCondition creates a new rollout condition.
func RemoveRolloutCondition ¶
func RemoveRolloutCondition(status *v1alpha1.RolloutStatus, condType v1alpha1.RolloutConditionType)
RemoveRolloutCondition removes the rollout condition with the provided type.
func RolloutComplete ¶
func RolloutComplete(rollout *v1alpha1.Rollout, newStatus *v1alpha1.RolloutStatus) bool
RolloutComplete considers a rollout to be complete once all of its desired replicas are updated, available, and receiving traffic from the active service, and no old pods are running.
func SetRolloutCondition ¶
func SetRolloutCondition(status *v1alpha1.RolloutStatus, condition v1alpha1.RolloutCondition)
SetRolloutCondition updates the rollout to include the provided condition. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.
func VerifyRolloutSpec ¶
func VerifyRolloutSpec(rollout *v1alpha1.Rollout, prevCond *v1alpha1.RolloutCondition) *v1alpha1.RolloutCondition
VerifyRolloutSpec Checks for a valid spec otherwise returns a invalidSpec condition.
Types ¶
This section is empty.