Skip to content

Commit

Permalink
fix: use non-deprecated CRD api (#355)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonah Back <[email protected]>
  • Loading branch information
backjo authored Apr 5, 2022
1 parent d1cd32a commit 7a1acf1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion controllers/providers/kubernetes/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion controllers/provisioners/eks/eks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7a1acf1

Please sign in to comment.