stormservice

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName              = "stormservice-controller"
	DefaultRequeueAfter         = 15 * time.Second
	DefaultRevisionHistoryLimit = 10
	StormServiceFinalizer       = "orchestration.aibrix.ai/stormservice-finalizer"
)
View Source
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

func (*StormServiceReconciler) Reconcile

func (r *StormServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL