func NewSeedTApp(e *v1alpha1.EtcdCluster) (*tAppV1.TApp, error) {
	app := &tAppV1.TApp{
		ObjectMeta: v1.ObjectMeta{
			Namespace: e.Namespace,
			Name:      helpers.NameForTApp(e),
		},
		Spec: tAppV1.TAppSpec{
			Selector: &v1.LabelSelector{
				MatchLabels: map[string]string{
					constants.LabelEtcdClusterNameSelector: e.Name,
				},
			},
			UpdateStrategy: tAppV1.TAppUpdateStrategy{
				MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 1},
				ForceUpdate: tAppV1.ForceUpdateStrategy{
					MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 1},
				},
			},
			AutoDeleteUnusedTemplate: true,
			Replicas:                 1,
			ServiceName:              helpers.NameForHeadlessService(e),
		},
	}

	for _, f := range []func(*v1alpha1.EtcdCluster, *tAppV1.TApp){
		ApplyEtcdDefaultTemplate,
		ApplyEtcdTLSOptions,
		ApplyEtcdPersistentVolume,
		ApplyEtcdNodeInitArgs,
		ApplyEtcdExtraArgs,
	} {
		f(e, app)
	}

	controller.SetEtcdOwnerReference(&app.ObjectMeta, e)

	return app, nil
}
// NewSeedTApp create a new TApp from an EtcdCluster template
NewSeedTApp create a new TApp from an EtcdCluster template
// NewSeedTApp create a new TApp from an EtcdCluster template
func NewSeedTApp(e *v1alpha1.EtcdCluster) (*tAppV1.TApp, error) {
	app := &tAppV1.TApp{
		ObjectMeta: v1.ObjectMeta{
			Namespace: e.Namespace,
			Name:      helpers.NameForTApp(e),
		},
		Spec: tAppV1.TAppSpec{
			Selector: &v1.LabelSelector{
				MatchLabels: map[string]string{
					constants.LabelEtcdClusterNameSelector: e.Name,
				},
			},
			UpdateStrategy: tAppV1.TAppUpdateStrategy{
				MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 1},
				ForceUpdate: tAppV1.ForceUpdateStrategy{
					MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 1},
				},
			},
			AutoDeleteUnusedTemplate: true,
			Replicas:                 1,
			ServiceName:              helpers.NameForHeadlessService(e),
		},
	}
	for _, f := range []func(*v1alpha1.EtcdCluster, *tAppV1.TApp){
		ApplyEtcdDefaultTemplate,
		ApplyEtcdTLSOptions,
		ApplyEtcdPersistentVolume,
		ApplyEtcdNodeInitArgs,
		ApplyEtcdExtraArgs,
	} {
		f(e, app)
	}
	controller.SetEtcdOwnerReference(&app.ObjectMeta, e)
	return app, nil
}
func NewSeedTApp ( e * v1alpha1 . EtcdCluster ) ( * tAppV1 . TApp , error ) { app := & tAppV1 . TApp { ObjectMeta : v1 . ObjectMeta { Namespace : e . Namespace , Name : helpers . NameForTApp ( e ) , } , Spec : tAppV1 . TAppSpec { Selector : & v1 . LabelSelector { MatchLabels : map [ string ] string { constants . LabelEtcdClusterNameSelector : e . Name , } , } , UpdateStrategy : tAppV1 . TAppUpdateStrategy { MaxUnavailable : & intstr . IntOrString { Type : intstr . Int , IntVal : 1 } , ForceUpdate : tAppV1 . ForceUpdateStrategy { MaxUnavailable : & intstr . IntOrString { Type : intstr . Int , IntVal : 1 } , } , } , AutoDeleteUnusedTemplate : true , Replicas : 1 , ServiceName : helpers . NameForHeadlessService ( e ) , } , } for _ , f := range [ ] func ( * v1alpha1 . EtcdCluster , * tAppV1 . TApp ) { ApplyEtcdDefaultTemplate , ApplyEtcdTLSOptions , ApplyEtcdPersistentVolume , ApplyEtcdNodeInitArgs , ApplyEtcdExtraArgs , } { f ( e , app ) } controller . SetEtcdOwnerReference ( & app . ObjectMeta , e ) return app , nil }
NewSeedTApp create a new TApp from an EtcdCluster template
NewSeedTApp create a new TApp from an EtcdCluster template