From a4058f8452ebdad85a9dd6deb80fd0e201ce27f2 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Wed, 5 Jun 2024 18:11:26 +0200 Subject: [PATCH] Fix make install Running `make install` fails with error: The CustomResourceDefinition "openstackcontrolplanes.core.openstack.org" is invalid: metadata.annotations: Too long: must have at most 262144 bytes This patch fixes this problem by using `kubectl replace` instead of `kubectl apply`. Replace was chosen over `kubectl apply --server-side` because the apply may fail to merge with the existing CRD, whereas replace will not fail. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 59d8f65b3..6e303cea7 100644 --- a/Makefile +++ b/Makefile @@ -188,7 +188,7 @@ endif .PHONY: install install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/crd | kubectl apply -f - + $(KUSTOMIZE) build config/crd | kubectl replace --force -f - .PHONY: uninstall uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.