1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

kind to lowercase before check

This commit is contained in:
shivdudhani 2019-05-20 18:19:13 -07:00
parent 459be76eb5
commit d606935ad3

View file

@ -4,6 +4,7 @@ import (
"fmt"
"log"
"os"
"strings"
"time"
types "github.com/nirmata/kube-policy/pkg/apis/policy/v1alpha1"
@ -309,6 +310,7 @@ func (c *Client) waitUntilNamespaceIsCreated(name string) error {
// KindIsSupported checks if the kind is a registerd GVK
func (c *Client) KindIsSupported(kind string) bool {
kind = strings.ToLower(kind) + "s"
buildGVKMapper(c.clientConfig, false)
_, ok := getValue(kind)
return ok