// NewSystemResources returns executor that creates system Kubernetes resources.
NewSystemResources returns executor that creates system Kubernetes resources.
// NewSystemResources returns executor that creates system Kubernetes resources .
func NewSystemResources(p fsm.ExecutorParams, operator ops.Operator, client *kubernetes.Clientset) (fsm.PhaseExecutor, error) {
	logger := &fsm.Logger{
		FieldLogger: logrus.WithField(constants.FieldPhase, p.Phase.ID),
		Key:         opKey(p.Plan),
		Operator:    operator,
	}
	cluster, err := operator.GetSite(ops.SiteKey{
		AccountID:  defaults.SystemAccountID,
		SiteDomain: p.Plan.ClusterName,
	})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return &systemResources{
		FieldLogger:    logger,
		ExecutorParams: p,
		Client:         client,
		Cluster:        ops.ConvertOpsSite(*cluster),
	}, nil
}
func NewSystemResources ( p fsm . ExecutorParams , operator ops . Operator , client * kubernetes . Clientset ) ( fsm . PhaseExecutor , error ) { logger := & fsm . Logger { FieldLogger : logrus . WithField ( constants . FieldPhase , p . Phase . ID ) , Key : opKey ( p . Plan ) , Operator : operator , } cluster , err := operator . GetSite ( ops . SiteKey { AccountID : defaults . SystemAccountID , SiteDomain : p . Plan . ClusterName , } ) if err != nil { return nil , trace . Wrap ( err ) } return & systemResources { FieldLogger : logger , ExecutorParams : p , Client : client , Cluster : ops . ConvertOpsSite ( * cluster ) , } , nil }
NewSystemResources returns executor that creates system Kubernetes resources.
NewSystemResources returns executor that creates system Kubernetes resources .