From c466bffa1e2eca8288ede30b1415d278664dbc81 Mon Sep 17 00:00:00 2001
From: marbarta <MARBARTA@cisco.com>
Date: Wed, 5 Oct 2022 13:44:26 +0200
Subject: [PATCH] Fix replace-create crds at install

---
 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index a57253ced..653987b50 100644
--- a/Makefile
+++ b/Makefile
@@ -104,11 +104,7 @@ run: generate fmt vet manifests
 # Install CRDs into a cluster by manually creating or replacing the CRD depending on whether is currently existing
 # Apply is not applicable as the last-applied-configuration annotation would exceed the size limit enforced by the api server
 install: manifests
-ifeq ($(shell kubectl get -f config/base/crds >/dev/null 2>&1; echo $$?), 1)
-	kubectl create -f config/base/crds
-else
-	kubectl replace -f config/base/crds
-endif
+	kubectl create -f config/base/crds || kubectl replace -f config/base/crds
 
 # Deploy controller in the configured Kubernetes cluster in ~/.kube/config
 deploy: install-kustomize install