Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AllGroupAttribute represents the rolling strategy property // will cause the action to take place to all instances at the // same time. Potentially causing downtime in the cluster. AllGroupAttribute = "__all__" // NameGroupAttribute represents the rolling strategy porperty // will cause the action to take place on one instance at a time. NameGroupAttribute = "__name__" // ZoneGroupAttribute represents the rolling strategy porperty // will cause the action to take place on one instance at a time. ZoneGroupAttribute = "logical_zone_name" )
Variables ¶
View Source
var ( // DefaultPlanStrategy will use the "default", strategy // which defaults to Grow and Shrink DefaultPlanStrategy = &models.PlanStrategy{} // GrowAndShrinkStrategy will cause the plan to create new instances first // and once the changes are finished it will remove the old instances GrowAndShrinkStrategy = &models.PlanStrategy{ GrowAndShrink: new(models.RollingStrategyConfig), } // RollingGrowAndShrinkStrategy will cause the plan to perform a grow and shrink // but instead of creating all the new instances at once, it will do it rolling. // This reduces the amount of available capacity for any change on clusters 1>. RollingGrowAndShrinkStrategy = &models.PlanStrategy{ RollingGrowAndShrink: new(models.RollingStrategyConfig), } // MajorUpgradeStrategy represents the strategy that will // be used in Major version upgrades MajorUpgradeStrategy = &models.PlanStrategy{ Rolling: &models.RollingStrategyConfig{ GroupBy: AllGroupAttribute, }, } // RollingByNameStrategy represents the strategy that will // be used when the plan wants to be applied one node at a // time without causing downtime RollingByNameStrategy = &models.PlanStrategy{ Rolling: &models.RollingStrategyConfig{ GroupBy: NameGroupAttribute, }, } )
Functions ¶
This section is empty.
Types ¶
type ReapplyParams ¶
type ReapplyParams struct {
ID string
HidePlan bool `kebabcase:"Doesn't print the plan before reapplying"`
Default bool `kebabcase:"Overwrites the strategy to the default one"`
Rolling bool `kebabcase:"Overwrites the strategy to rolling"`
GrowAndShrink bool `kebabcase:"Overwrites the strategy to grow and shrink"`
RollingGrowAndShrink bool `kebabcase:"Overwrites the strategy to rolling grow and shrink (one at a time)"`
RollingAll bool `kebabcase:"Overwrites the strategy to apply the change in all the instances at a time (causes downtime)"`
Reallocate bool `kebabcase:"Forces creation of new instances"`
ExtendedMaintenance bool `kebabcase:"Stops routing to the cluster instances after the plan has been applied"`
OverrideFailsafe bool `kebabcase:"Overrides failsafe at the constructor level that prevent bad things from happening"`
}
ReapplyParams contains the parameters required to call a plan reapply action
func (ReapplyParams) Strategy ¶
func (p ReapplyParams) Strategy() *models.PlanStrategy
Strategy returns a plan strategy from the specified ReapplyParams If all strategies are false, nil will be returned, which won't alter the previously specified strategy.
func (ReapplyParams) Validate ¶
func (p ReapplyParams) Validate() error
Validate returns an error if the parameters are invalid
Click to show internal directories.
Click to hide internal directories.