mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
a1b49f72a3
* fix gofmt and golint issues * add keys to structs * fix compile error * fix clusterrolebinding creation * fix test
11 lines
395 B
Go
11 lines
395 B
Go
package generate
|
|
|
|
import (
|
|
kyverno "github.com/nirmata/kyverno/pkg/api/kyverno/v1"
|
|
dclient "github.com/nirmata/kyverno/pkg/dclient"
|
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
|
)
|
|
|
|
func getResource(client *dclient.Client, resourceSpec kyverno.ResourceSpec) (*unstructured.Unstructured, error) {
|
|
return client.GetResource(resourceSpec.Kind, resourceSpec.Namespace, resourceSpec.Name)
|
|
}
|