Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func SyncGameServer(gss *gameKruiseV1alpha1.GameServerSet, c client.Client, ...) error
- type Control
- type GameServerSetManager
- func (manager *GameServerSetManager) GameServerScale() error
- func (manager *GameServerSetManager) GetReplicasAfterKilling() *int32
- func (manager *GameServerSetManager) IsNeedToScale() bool
- func (manager *GameServerSetManager) IsNeedToUpdateWorkload() bool
- func (manager *GameServerSetManager) SyncPodProbeMarker() error
- func (manager *GameServerSetManager) SyncStatus() error
- func (manager *GameServerSetManager) UpdateWorkload() error
- type GameServerSetReconciler
Constants ¶
View Source
const ( ScaleReason = "Scale" CreatePPMReason = "CreatePpm" UpdatePPMReason = "UpdatePpm" CreateWorkloadReason = "CreateWorkload" UpdateWorkloadReason = "UpdateWorkload" )
Variables ¶
This section is empty.
Functions ¶
func SyncGameServer ¶ added in v0.7.0
func SyncGameServer(gss *gameKruiseV1alpha1.GameServerSet, c client.Client, newManageIds, oldManageIds []int) error
Types ¶
type Control ¶
type Control interface { GameServerScale() error UpdateWorkload() error SyncStatus() error IsNeedToScale() bool IsNeedToUpdateWorkload() bool SyncPodProbeMarker() error GetReplicasAfterKilling() *int32 }
func NewGameServerSetManager ¶
func NewGameServerSetManager(gss *gameKruiseV1alpha1.GameServerSet, asts *kruiseV1beta1.StatefulSet, gsList []corev1.Pod, c client.Client, recorder record.EventRecorder) Control
type GameServerSetManager ¶
type GameServerSetManager struct {
// contains filtered or unexported fields
}
func (*GameServerSetManager) GameServerScale ¶
func (manager *GameServerSetManager) GameServerScale() error
func (*GameServerSetManager) GetReplicasAfterKilling ¶ added in v0.5.0
func (manager *GameServerSetManager) GetReplicasAfterKilling() *int32
func (*GameServerSetManager) IsNeedToScale ¶
func (manager *GameServerSetManager) IsNeedToScale() bool
func (*GameServerSetManager) IsNeedToUpdateWorkload ¶
func (manager *GameServerSetManager) IsNeedToUpdateWorkload() bool
func (*GameServerSetManager) SyncPodProbeMarker ¶
func (manager *GameServerSetManager) SyncPodProbeMarker() error
func (*GameServerSetManager) SyncStatus ¶
func (manager *GameServerSetManager) SyncStatus() error
func (*GameServerSetManager) UpdateWorkload ¶
func (manager *GameServerSetManager) UpdateWorkload() error
type GameServerSetReconciler ¶
type GameServerSetReconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
GameServerSetReconciler reconciles a GameServerSet object
func (*GameServerSetReconciler) Reconcile ¶
func (r *GameServerSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the GameServerSet object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile
func (*GameServerSetReconciler) SetupWithManager ¶
func (r *GameServerSetReconciler) SetupWithManager(mgr ctrl.Manager) (c controller.Controller, err error)
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.