Documentation
¶
Index ¶
- Constants
- func Add(mgr manager.Manager, runtimeConfig config.RuntimeConfig) error
- func IsRollingUpdate(stormService *orchestrationv1alpha1.StormService) bool
- func MaxSurge(stormService *orchestrationv1alpha1.StormService) int32
- func MaxUnavailable(stormService orchestrationv1alpha1.StormService) int32
- func MinAvailable(stormService *orchestrationv1alpha1.StormService) int32
- func RemoveStormServiceCondition(status *orchestrationv1alpha1.StormServiceStatus, ...)
- func ResolveFenceposts(maxSurge, maxUnavailable *intstrutil.IntOrString, desired int32) (int32, int32, error)
- func SetStormServiceCondition(status *orchestrationv1alpha1.StormServiceStatus, ...)
- type StormServiceReconciler
Constants ¶
const ( ControllerName = "stormservice-controller" DefaultRequeueAfter = 15 * time.Second DefaultRevisionHistoryLimit = 10 StormServiceFinalizer = "orchestration.aibrix.ai/stormservice-finalizer" )
const ( ScalingEventType = "Scaling" RolloutEventType = "Rollout" HeadlessServiceEventType = "HeadlessServiceSynced" )
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(mgr manager.Manager, runtimeConfig config.RuntimeConfig) error
Add creates a new ModelAdapter Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func IsRollingUpdate ¶
func IsRollingUpdate(stormService *orchestrationv1alpha1.StormService) bool
IsRollingUpdate returns true if the strategy type is a rolling update.
func MaxSurge ¶
func MaxSurge(stormService *orchestrationv1alpha1.StormService) int32
MaxSurge returns the maximum surge roleSets a rolling stormService can take.
func MaxUnavailable ¶
func MaxUnavailable(stormService orchestrationv1alpha1.StormService) int32
MaxUnavailable returns the maximum unavailable roleSets a rolling stormService can take.
func MinAvailable ¶
func MinAvailable(stormService *orchestrationv1alpha1.StormService) int32
MinAvailable returns the minimum available roleSets of a given stormService
func RemoveStormServiceCondition ¶
func RemoveStormServiceCondition(status *orchestrationv1alpha1.StormServiceStatus, condType orchestrationv1alpha1.ConditionType)
RemoveStormServiceCondition removes the stormService condition with the provided type.
func ResolveFenceposts ¶
func ResolveFenceposts(maxSurge, maxUnavailable *intstrutil.IntOrString, desired int32) (int32, int32, error)
ResolveFenceposts resolves both maxSurge and maxUnavailable. This needs to happen in one step. For example:
2 desired, max unavailable 1%, surge 0% - should scale old(-1), then new(+1), then old(-1), then new(+1) 1 desired, max unavailable 1%, surge 0% - should scale old(-1), then new(+1) 2 desired, max unavailable 25%, surge 1% - should scale new(+1), then old(-1), then new(+1), then old(-1) 1 desired, max unavailable 25%, surge 1% - should scale new(+1), then old(-1) 2 desired, max unavailable 0%, surge 1% - should scale new(+1), then old(-1), then new(+1), then old(-1) 1 desired, max unavailable 0%, surge 1% - should scale new(+1), then old(-1)
func SetStormServiceCondition ¶
func SetStormServiceCondition(status *orchestrationv1alpha1.StormServiceStatus, condition orchestrationv1alpha1.Condition)
SetStormServiceCondition updates the stormService 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.
Types ¶
type StormServiceReconciler ¶
type StormServiceReconciler struct { client.Client Scheme *runtime.Scheme EventRecorder record.EventRecorder }
StormServiceReconciler reconciles a StormService object