kruise-game
kruise-game copied to clipboard
[Feat] User-defined GameServer’s recycle strategy
API
type GameServerTemplate struct {
corev1.PodTemplateSpec `json:",inline"`
VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
// new
Owner GameServerOwner `json:"owner"`
}
type GameServerOwner string
const (
OwnerPod GameServerOwner = "Pod"
OwnerGameServerSet GameServerOwner = "GameServerSet"
)
Introduction
-
The owner is the Pod - created when the pod is created and deleted when the pod is deleted, consistent with the pod life cycle.
-
The owner is GameServerSet - created before the pod is created and deleted after the pod is actually deleted. Specific examples:
- When the game server is generated, because the webhook verification fails, even if the pod is not generated, the gs will be generated.
- Abnormal eviction of the game server, manual deletion of pods, rebuilding and updating, etc. are deletions that occur without changing replicas, and gs will not delete them.
Default Owner is Pod.