roleset

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            = "roleset-controller"
	RoleSetFinalizer          = "orchestration.aibrix.ai/roleset-finalizer"
	DefaultRequeueAfter       = 15 * time.Second
	DefaultRetryDelay         = 1 * time.Second
	PodBurst                  = 500
	PodOperationInitBatchSize = 16
)
View Source
const (
	ReadyConditionType       = "Ready"
	ProgressingConditionType = "Progressing"
	FailureConditionType     = "Failure"

	PodGroupSyncedEventType = "PodGroupSynced"
	PodSyncedEventType      = "PodSynced"
	FailureEventType        = "Failure"
)

Variables

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 GetReadyReplicaCountForRole

func GetReadyReplicaCountForRole(pods []*v1.Pod) int32

GetReadyReplicaCountForRole returns the number of ready roleSets corresponding to the given replica sets.

func MaxSurge

func MaxSurge(role *orchestrationv1alpha1.RoleSpec) int32

func MaxUnavailable

func MaxUnavailable(role *orchestrationv1alpha1.RoleSpec) int32

func RemoveRoleSetCondition

func RemoveRoleSetCondition(status *orchestrationv1alpha1.RoleSetStatus, condType orchestrationv1alpha1.ConditionType)

RemoveRoleSetCondition removes the roleSet condition with the provided type.

func SetRoleSetCondition

func SetRoleSetCondition(status *orchestrationv1alpha1.RoleSetStatus, condition orchestrationv1alpha1.Condition)

SetRoleSetCondition updates the roleSet 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 RoleSetReconciler

type RoleSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	EventRecorder record.EventRecorder
}

RoleSetReconciler reconciles a RoleSet object

func (*RoleSetReconciler) Reconcile

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

type RollingManager

type RollingManager interface {
	Next(ctx context.Context, roleSet *orchestrationv1alpha1.RoleSet) error
}

type RollingManagerInterleave

type RollingManagerInterleave struct {
	// contains filtered or unexported fields
}

func (*RollingManagerInterleave) Next

Interleaved rollout: update roles in alternating steps, using (maxSurge + maxUnavailable) as the step size for all roles

type RollingManagerParallel

type RollingManagerParallel struct {
	// contains filtered or unexported fields
}

func (*RollingManagerParallel) Next

type RollingManagerSequential

type RollingManagerSequential struct {
	// contains filtered or unexported fields
}

func (*RollingManagerSequential) Next

type StatefulRoleSyncer

type StatefulRoleSyncer struct {
	// contains filtered or unexported fields
}

func (*StatefulRoleSyncer) AllReady

func (*StatefulRoleSyncer) CheckCurrentStep

func (*StatefulRoleSyncer) Rollout

func (*StatefulRoleSyncer) RolloutByStep

func (s *StatefulRoleSyncer) RolloutByStep(ctx context.Context, roleSet *orchestrationv1alpha1.RoleSet, role *orchestrationv1alpha1.RoleSpec, currentStep int32) error

func (*StatefulRoleSyncer) Scale

type StatelessRoleSyncer

type StatelessRoleSyncer struct {
	// contains filtered or unexported fields
}

func (*StatelessRoleSyncer) AllReady

func (*StatelessRoleSyncer) CheckCurrentStep

CheckCurrentStep determines which step the current role is in

func (*StatelessRoleSyncer) Rollout

func (*StatelessRoleSyncer) RolloutByStep

func (s *StatelessRoleSyncer) RolloutByStep(ctx context.Context, roleSet *orchestrationv1alpha1.RoleSet, role *orchestrationv1alpha1.RoleSpec, currentStep int32) error

RolloutByStep performs rollout in steps based on the defined step size

func (*StatelessRoleSyncer) Scale

Jump to

Keyboard shortcuts

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