Skip to content

Commit

Permalink
Fix make install
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Akrog committed Jun 5, 2024
1 parent 92d942c commit 57d3020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 -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.
Expand Down

0 comments on commit 57d3020

Please sign in to comment.