func ApplyEtcdDefaultTemplate(e *v1alpha1.EtcdCluster, app *tAppV1.TApp) {
	app.Spec.Template = DefaultTAppTemplateForEtcd(e)
	app.Spec.ForceDeletePod = true
	for i := 0; i < int(app.Spec.Replicas); i++ {
		if app.Spec.TemplatePool == nil {
			app.Spec.TemplatePool = make(map[string]corev1.PodTemplateSpec)
		}
		tpl := DefaultTAppTemplateForEtcd(e)
		if len(e.Spec.Learners) != 0 && e.Spec.Learners[0] == fmt.Sprint(i) {
			tpl.Labels[constants.LabelEtcdVotingMemberSelector] = "false"
		}
		app.Spec.TemplatePool[fmt.Sprint(i)] = tpl
		if app.Spec.Templates == nil {
			app.Spec.Templates = make(map[string]string)
		}
		app.Spec.Templates[fmt.Sprint(i)] = fmt.Sprint(i)
	}
}
// ApplyEtcdDefaultTemplate set default TApp template with the EtcdCluster template
ApplyEtcdDefaultTemplate set default TApp template with the EtcdCluster template
// ApplyEtcdDefaultTemplate set default TApp template with the EtcdCluster template
func ApplyEtcdDefaultTemplate(e *v1alpha1.EtcdCluster, app *tAppV1.TApp) {
	app.Spec.Template = DefaultTAppTemplateForEtcd(e)
	app.Spec.ForceDeletePod = true
	for i := 0; i < int(app.Spec.Replicas); i++ {
		if app.Spec.TemplatePool == nil {
			app.Spec.TemplatePool = make(map[string]corev1.PodTemplateSpec)
		}
		tpl := DefaultTAppTemplateForEtcd(e)
		if len(e.Spec.Learners) != 0 && e.Spec.Learners[0] == fmt.Sprint(i) {
			tpl.Labels[constants.LabelEtcdVotingMemberSelector] = "false"
		}
		app.Spec.TemplatePool[fmt.Sprint(i)] = tpl
		if app.Spec.Templates == nil {
			app.Spec.Templates = make(map[string]string)
		}
		app.Spec.Templates[fmt.Sprint(i)] = fmt.Sprint(i)
	}
}
func ApplyEtcdDefaultTemplate ( e * v1alpha1 . EtcdCluster , app * tAppV1 . TApp ) { app . Spec . Template = DefaultTAppTemplateForEtcd ( e ) app . Spec . ForceDeletePod = true for i := 0 ; i < int ( app . Spec . Replicas ) ; i ++ { if app . Spec . TemplatePool == nil { app . Spec . TemplatePool = make ( map [ string ] corev1 . PodTemplateSpec ) } tpl := DefaultTAppTemplateForEtcd ( e ) if len ( e . Spec . Learners ) != 0 && e . Spec . Learners [ 0 ] == fmt . Sprint ( i ) { tpl . Labels [ constants . LabelEtcdVotingMemberSelector ] = " " } app . Spec . TemplatePool [ fmt . Sprint ( i ) ] = tpl if app . Spec . Templates == nil { app . Spec . Templates = make ( map [ string ] string ) } app . Spec . Templates [ fmt . Sprint ( i ) ] = fmt . Sprint ( i ) } }
ApplyEtcdDefaultTemplate set default TApp template with the EtcdCluster template
ApplyEtcdDefaultTemplate set default TApp template with the EtcdCluster template