func (w *ClusterDynamicClient) WithResource(resource schema.GroupVersionResource) DClient {
	w.resource = resource
	return w
}
WithResource returns a client with resource.
package k8s
import (
	"context"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/apimachinery/pkg/watch"
	"k8s.io/client-go/dynamic"
	"k8s.io/client-go/rest"
	"k8s.io/client-go/tools/clientcmd"
	"os"
	"path/filepath"
)
func WrapDClient(client dynamic.Interface) DClient {
	return &ClusterDynamicClient{
		dClient: client,
	}
}
type DClient interface {
	WithResource(resource schema.GroupVersionResource) DClient
	WithNamespace(namespace string) DClient
	WithContext(ctx context.Context) DClient
	Create(obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
	Update(obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
	Delete(name string, options metav1.DeleteOptions, subresources ...string) error
	Get(name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
	List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
}
type ClusterDynamicClient struct {
	dClient   dynamic.Interface
	namespace string
	resource  schema.GroupVersionResource
	ctx       context.Context
}