From ba8ce6c92da00c9099b1ef90587082636866c06d Mon Sep 17 00:00:00 2001 From: ChrisLiu <70144550+chrisliu1995@users.noreply.github.com> Date: Wed, 19 Apr 2023 19:50:39 +0800 Subject: [PATCH] feat: add default serviceName for asts (#51) Signed-off-by: ChrisLiu --- pkg/util/gameserver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/util/gameserver.go b/pkg/util/gameserver.go index 0dd9a28d..81c915ca 100644 --- a/pkg/util/gameserver.go +++ b/pkg/util/gameserver.go @@ -99,6 +99,8 @@ func GetIndexListFromGsList(gsList []gameKruiseV1alpha1.GameServer) []int { func GetNewAstsFromGss(gss *gameKruiseV1alpha1.GameServerSet, asts *kruiseV1beta1.StatefulSet) *kruiseV1beta1.StatefulSet { // default: set ParallelPodManagement asts.Spec.PodManagementPolicy = apps.ParallelPodManagement + // default: set ServiceName as GameServerSet name + asts.Spec.ServiceName = gss.Name // set pod labels podLabels := gss.Spec.GameServerTemplate.GetLabels()