1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 18:06:55 +00:00
kyverno/test/e2e/framework/resource/clustered.go

27 lines
575 B
Go
Raw Normal View History

package resource
import (
"github.com/kyverno/kyverno/test/e2e/framework/gvr"
"k8s.io/apimachinery/pkg/runtime/schema"
)
func Clustered(gvr schema.GroupVersionResource, raw []byte) Resource {
return Resource{gvr, "", raw}
}
func ClusterPolicy(raw []byte) Resource {
return Clustered(gvr.ClusterPolicy, raw)
}
func ClusterRole(raw []byte) Resource {
return Clustered(gvr.ClusterRole, raw)
}
func ClusterRoleBinding(raw []byte) Resource {
return Clustered(gvr.ClusterRoleBinding, raw)
}
func Namespace(raw []byte) Resource {
return Clustered(gvr.Namespace, raw)
}