func NewResourceQuota(name, namespace string, requests, limits *Resources) (*ResourceQuota, error) {
	if name == "" || namespace == "" {
		return nil, ErrInvalidResource
	}
	rq := &ResourceQuota{
		Name:      name,
		Namespace: namespace,
		Requests:  defaultRequests,
		Limits:    defaultLimits,
	}
	if requests != nil {
		rq.Requests = requests
	}
	if limits != nil {
		rq.Limits = limits
	}
	return rq, nil
}
NewResourceQuota mints a new resourcequota
package runtime
import "fmt"
const (
	TypeNamespace     = "namespace"
	TypeNetworkPolicy = "networkpolicy"
	TypeResourceQuota = "resourcequota"
	TypeService       = "service"
)
var (
	defaultRequests = &Resources{
		Mem:  2000,  
		Disk: 5000,  
	}
	defaultLimits = &Resources{
		Mem:  4000,   
		Disk: 10000,  
	}
)
type Resource interface {
	String() string
	Type() string
}
type Namespace struct {
	Name string
}
func NewNamespace(name string) (*Namespace, error) {
	if name == "" {
		return nil, ErrInvalidResource
	}
	return &Namespace{
		Name: name,
	}, nil
}
func (r *Namespace) String() string {
	return r.Name
}
func (*Namespace) Type() string {
	return TypeNamespace
}
type NetworkPolicy struct {
	AllowedLabels map[string]string
	Name string
	Namespace string
}
func NewNetworkPolicy(name, namespace string, allowedLabels map[string]string) (*NetworkPolicy, error) {
	if name == "" || namespace == "" {
		return nil, ErrInvalidResource
	}
	if allowedLabels == nil {
		allowedLabels = map[string]string{
			"origin": "micro",
		}
	}
	return &NetworkPolicy{
		AllowedLabels: allowedLabels,
		Name:          name,
		Namespace:     namespace,
	}, nil
}
func (r *NetworkPolicy) String() string {
	return fmt.Sprintf("%s.%s", r.Namespace, r.Name)
}
func (*NetworkPolicy) Type() string {
	return TypeNetworkPolicy
}
type ResourceQuota struct {
	Name string
	Namespace string
	Requests *Resources
	Limits *Resources
}