func (rm *RsrcManager) WithScheme(v *runtime.Scheme) *RsrcManager {
	rm.scheme = v
	return rm
}
WithScheme adds scheme
package k8s
import (
	"bufio"
	"bytes"
	"context"
	"errors"
	"fmt"
	corev1 "k8s.io/api/core/v1"
	policyv1 "k8s.io/api/policy/v1beta1"
	"k8s.io/apimachinery/pkg/api/meta"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	serializer "k8s.io/apimachinery/pkg/runtime/serializer"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/apimachinery/pkg/util/validation/field"
	"k8s.io/apimachinery/pkg/util/yaml"
	"log"
	"os"
	"reflect"
	"sigs.k8s.io/controller-reconciler/pkg/reconciler"
	"sigs.k8s.io/controller-reconciler/pkg/reconciler/manager"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"strings"
	"text/template"
)
const (
	Type = "k8s"
)
var Codecs serializer.CodecFactory
type RsrcManager struct {
	name   string
	client client.Client
	scheme *runtime.Scheme
	codecs serializer.CodecFactory
}
type FileResource struct {
	Path    string
	ObjList metav1.ListInterface
}
func Getter(ctx context.Context, c client.Client, v *runtime.Scheme) func() (string, manager.Manager, error) {
	return func() (string, manager.Manager, error) {
		rm := &RsrcManager{}
		rm.WithClient(c).WithName(Type + "Mgr").WithScheme(v)
		return Type, rm, nil
	}
}
func NewRsrcManager(ctx context.Context, c client.Client, v *runtime.Scheme) *RsrcManager {
	rm := &RsrcManager{}
	rm.WithClient(c).WithName(Type + "Mgr").WithScheme(v).WithCodec(nil)
	return rm
}
func (rm *RsrcManager) WithCodec(codec *serializer.CodecFactory) *RsrcManager {
	if codec != nil {
		rm.codecs = *codec
		Codecs = *codec
	} else {
		rm.codecs = serializer.NewCodecFactory(rm.scheme)
		Codecs = rm.codecs
	}
	return rm
}
func (rm *RsrcManager) WithName(v string) *RsrcManager {
	rm.name = v
	return rm
}
func (rm *RsrcManager) WithClient(v client.Client) *RsrcManager {
	rm.client = v
	return rm
}