func (serviceAccountTemplateFactory) NewExisting(name string, c client.Interface, gc interfaces.GraphContext) interfaces.Resource {
	return report.SimpleReporter{BaseResource: existingServiceAccount{Name: name, Client: c.ServiceAccounts()}}
}
NewExisting returns ServiceAccount controller for existing resource by its name
package resources
import (
	"log"
	"github.com/Mirantis/k8s-AppController/pkg/client"
	"github.com/Mirantis/k8s-AppController/pkg/interfaces"
	"github.com/Mirantis/k8s-AppController/pkg/report"
	corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
	"k8s.io/client-go/pkg/api/v1"
)
var serviceAccountParamFields = []string{
	"Secrets",
	"ImagePullSecrets",
}
type newServiceAccount struct {
	Base
	ServiceAccount *v1.ServiceAccount
	Client         corev1.ServiceAccountInterface
}
type existingServiceAccount struct {
	Base
	Name   string
	Client corev1.ServiceAccountInterface
}
type serviceAccountTemplateFactory struct{}
func (serviceAccountTemplateFactory) ShortName(definition client.ResourceDefinition) string {
	if definition.ServiceAccount == nil {
		return ""
	}
	return definition.ServiceAccount.Name
}
func (serviceAccountTemplateFactory) Kind() string {
	return "serviceaccount"
}
func (serviceAccountTemplateFactory) New(def client.ResourceDefinition, c client.Interface, gc interfaces.GraphContext) interfaces.Resource {
	serviceAccount := parametrizeResource(def.ServiceAccount, gc, serviceAccountParamFields).(*v1.ServiceAccount)
	return report.SimpleReporter{
		BaseResource: newServiceAccount{Base: Base{def.Meta}, ServiceAccount: serviceAccount, Client: c.ServiceAccounts()},
	}
}