Documentation ¶
Index ¶
- Constants
- Variables
- func IsInstallationConditionTrue(conditions []shipper.ClusterInstallationCondition, ...) bool
- func SetCapacityCondition(conditions []shipper.ClusterCapacityCondition, ...) []shipper.ClusterCapacityCondition
- func SetInstallationCondition(conditions []shipper.ClusterInstallationCondition, ...) []shipper.ClusterInstallationCondition
- func SetTrafficCondition(conditions []shipper.ClusterTrafficCondition, typ shipper.ClusterConditionType, ...) []shipper.ClusterTrafficCondition
- type NotFound
- type StrategyConditionsMap
- func (sc StrategyConditionsMap) AllTrue(step int32) bool
- func (sc StrategyConditionsMap) AsReleaseStrategyConditions() []shipper.ReleaseStrategyCondition
- func (sc StrategyConditionsMap) AsReleaseStrategyState(step int32, hasIncumbent bool, isLastStep bool) shipper.ReleaseStrategyState
- func (sc StrategyConditionsMap) GetCondition(conditionType shipper.StrategyConditionType) (shipper.ReleaseStrategyCondition, bool)
- func (sc StrategyConditionsMap) GetStatus(conditionType shipper.StrategyConditionType) (corev1.ConditionStatus, bool)
- func (sc StrategyConditionsMap) IsFalse(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) IsNotTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) IsTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) IsUnknown(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) Merge(other StrategyConditionsMap)
- func (sc StrategyConditionsMap) Set(conditions ...shipper.ReleaseStrategyCondition)
- func (sc StrategyConditionsMap) SetFalse(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
- func (sc StrategyConditionsMap) SetTrue(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
- func (sc StrategyConditionsMap) SetUnknown(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
- type StrategyConditionsUpdate
Constants ¶
const ( ClustersNotOperational = "ClustersNotOperational" ClustersNotReady = "ClustersNotReady" )
const ( // Operational. ServerError = "ServerError" // Capacity Ready. MissingDeployment = "MissingDeployment" TooManyDeployments = "TooManyDeployments" PodsNotReady = "PodsNotReady" WrongPodCount = "WrongPodCount" MissingObjects = "MissingObjects" InvalidObjects = "InvalidObjects" MissingService = "MissingService" UnknownError = "UnknownError" InternalError = "InternalError" TargetClusterClientError = "TargetClusterClientError" CreateReleaseFailed = "CreateReleaseFailed" ChartVersionResolutionFailed = "ChartVersionResolutionFailed" FetchReleaseFailed = "FetchReleaseFailed" BrokenReleaseGeneration = "BrokenReleaseGeneration" BrokenApplicationObservedGeneration = "BrokenApplicationObservedGeneration" StrategyExecutionFailed = "StrategyExecutionFailed" ChartError = "ChartError" ClientError = "ClientError" )
Variables ¶
var CapacityConditionsShouldDiscardTimestamps = false
var InstallationConditionsShouldDiscardTimestamps = false
var StrategyConditionsShouldDiscardTimestamps = false
StrategyConditionsShouldDiscardTimestamps can be used to skip timestamps in condition transitions in tests.
var TrafficConditionsShouldDiscardTimestamps = false
Functions ¶
func IsInstallationConditionTrue ¶
func IsInstallationConditionTrue( conditions []shipper.ClusterInstallationCondition, typ shipper.ClusterConditionType, ) bool
func SetCapacityCondition ¶
func SetCapacityCondition( conditions []shipper.ClusterCapacityCondition, typ shipper.ClusterConditionType, status corev1.ConditionStatus, reason string, message string, ) []shipper.ClusterCapacityCondition
func SetInstallationCondition ¶
func SetInstallationCondition( conditions []shipper.ClusterInstallationCondition, typ shipper.ClusterConditionType, status corev1.ConditionStatus, reason string, message string, ) []shipper.ClusterInstallationCondition
func SetTrafficCondition ¶
func SetTrafficCondition( conditions []shipper.ClusterTrafficCondition, typ shipper.ClusterConditionType, status corev1.ConditionStatus, reason string, message string, ) []shipper.ClusterTrafficCondition
Types ¶
type StrategyConditionsMap ¶
type StrategyConditionsMap map[shipper.StrategyConditionType]shipper.ReleaseStrategyCondition
StrategyConditionsMap is used to manage a list of ReleaseStrategyConditions.
func NewStrategyConditions ¶
func NewStrategyConditions(conditions ...shipper.ReleaseStrategyCondition) StrategyConditionsMap
NewStrategyConditions returns a new StrategyConditionsMap object with the given list of ReleaseStrategyConditions.
func (StrategyConditionsMap) AllTrue ¶
func (sc StrategyConditionsMap) AllTrue(step int32) bool
AllTrue returns true if all the existing conditions in the receiver have their status True.
func (StrategyConditionsMap) AsReleaseStrategyConditions ¶
func (sc StrategyConditionsMap) AsReleaseStrategyConditions() []shipper.ReleaseStrategyCondition
AsReleaseStrategyConditions returns an ordered list of v1.ReleaseStrategyCondition values. This list is sorted by ReleaseStrategyCondition type.
func (StrategyConditionsMap) AsReleaseStrategyState ¶
func (sc StrategyConditionsMap) AsReleaseStrategyState( step int32, hasIncumbent bool, isLastStep bool, ) shipper.ReleaseStrategyState
AsReleaseStrategyState returns a ReleaseStrategyState computed from the conditions in the receiver.
func (StrategyConditionsMap) GetCondition ¶
func (sc StrategyConditionsMap) GetCondition(conditionType shipper.StrategyConditionType) (shipper.ReleaseStrategyCondition, bool)
func (StrategyConditionsMap) GetStatus ¶
func (sc StrategyConditionsMap) GetStatus(conditionType shipper.StrategyConditionType) (corev1.ConditionStatus, bool)
GetStatus returns the status of condition from the receiver.
func (StrategyConditionsMap) IsFalse ¶
func (sc StrategyConditionsMap) IsFalse(step int32, conditionTypes ...shipper.StrategyConditionType) bool
IsFalse returns true if all the given conditions have their status False in the receiver.
func (StrategyConditionsMap) IsNotTrue ¶
func (sc StrategyConditionsMap) IsNotTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
func (StrategyConditionsMap) IsTrue ¶
func (sc StrategyConditionsMap) IsTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
IsTrue returns true if all the given conditions have their status True in the receiver.
func (StrategyConditionsMap) IsUnknown ¶
func (sc StrategyConditionsMap) IsUnknown(step int32, conditionTypes ...shipper.StrategyConditionType) bool
IsUnknown returns true if all the given conditions have their status Unknown in the receiver.
func (StrategyConditionsMap) Merge ¶
func (sc StrategyConditionsMap) Merge(other StrategyConditionsMap)
Merge merges another StrategyConditionsMap object into the receiver. Conditions from "other" can override existing conditions in the receiver.
func (StrategyConditionsMap) Set ¶
func (sc StrategyConditionsMap) Set(conditions ...shipper.ReleaseStrategyCondition)
Set adds conditions to the receiver. Added conditions can override existing conditions in the receiver.
func (StrategyConditionsMap) SetFalse ¶
func (sc StrategyConditionsMap) SetFalse(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
SetFalse transitions an existing condition from its current status to False.
func (StrategyConditionsMap) SetTrue ¶
func (sc StrategyConditionsMap) SetTrue(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
SetTrue transitions an existing condition from its current status to True.
func (StrategyConditionsMap) SetUnknown ¶
func (sc StrategyConditionsMap) SetUnknown(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
SetUnknown transitions an existing condition from its current status to Unknown.