diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 384c955e..06b29cde 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v2 with: - go-version: ^1.17 + go-version: 1.17 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/controllers/providers/kubernetes/utils.go b/controllers/providers/kubernetes/utils.go index b1c24f9c..13bb31d1 100644 --- a/controllers/providers/kubernetes/utils.go +++ b/controllers/providers/kubernetes/utils.go @@ -218,7 +218,7 @@ func GetKubernetesLocalConfig() (*rest.Config, error) { } func CRDExists(kubeClient dynamic.Interface, name string) bool { - CRDSchema := schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1beta1", Resource: "customresourcedefinitions"} + CRDSchema := schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1", Resource: "customresourcedefinitions"} _, err := kubeClient.Resource(CRDSchema).Get(context.Background(), name, metav1.GetOptions{}) if err != nil { return false diff --git a/controllers/provisioners/eks/eks_test.go b/controllers/provisioners/eks/eks_test.go index b39ebb82..acba0f85 100644 --- a/controllers/provisioners/eks/eks_test.go +++ b/controllers/provisioners/eks/eks_test.go @@ -281,7 +281,7 @@ func MockCustomResourceSpec() *unstructured.Unstructured { func MockCustomResourceDefinition() *unstructured.Unstructured { return &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "apiextensions.k8s.io/v1beta1", + "apiVersion": "apiextensions.k8s.io/v1", "kind": "CustomResourceDefinition", "metadata": map[string]interface{}{ "name": "dogs.instancemgr.keikoproj.io",