func GeneratePlaceholderName(taskGroupName, appID string, index int32) string {
	shortTaskGroupName := fmt.Sprintf("%.20s", taskGroupName)
	shortAppID := fmt.Sprintf("%.28s", appID)
	return "tg-" + shortTaskGroupName + "-" + shortAppID + fmt.Sprintf("-%d", index)
}
the placeholder name is the pod name, pod name can not be longer than 63 chars,
taskGroup name and appID will be truncated if they go over 20/28 chars respectively,
each taskGroup is assigned with an incremental index starting from 0.
package utils
import (
	"encoding/json"
	"fmt"
	"strconv"
	"strings"
	"go.uber.org/zap"
	v1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/resource"
	"github.com/apache/incubator-yunikorn-k8shim/pkg/apis/yunikorn.apache.org/v1alpha1"
	"github.com/apache/incubator-yunikorn-k8shim/pkg/appmgmt/interfaces"
	"github.com/apache/incubator-yunikorn-k8shim/pkg/common/constants"
	"github.com/apache/incubator-yunikorn-k8shim/pkg/log"
)
func FindAppTaskGroup(appTaskGroups []*v1alpha1.TaskGroup, groupName string) (*v1alpha1.TaskGroup, error) {
	if groupName == "" {
		return nil, nil
	}
	if len(appTaskGroups) == 0 {
		return nil, nil
	}
	for _, tg := range appTaskGroups {
		if tg.Name == groupName {
			return tg, nil
		}
	}
	return nil, fmt.Errorf("taskGroup %s is not defined in the application", groupName)
}