Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix make install #828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Akrog
Copy link
Contributor

@Akrog Akrog commented Jun 5, 2024

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.

@openshift-ci openshift-ci bot requested review from olliewalsh and stuggi June 5, 2024 16:16
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.
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://review.rdoproject.org/zuul/buildset/088dd60260974073bd6efa6b490daefe

openstack-k8s-operators-content-provider FAILURE in 14m 18s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@Akrog
Copy link
Contributor Author

Akrog commented Jun 5, 2024

recheck

Copy link
Contributor

openshift-ci bot commented Jun 7, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Akrog, slagle
Once this PR has been reviewed and has the lgtm label, please assign frenzyfriday for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -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 -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why force is needed? that also removes CRDs and custom resources

Copy link
Contributor Author

@Akrog Akrog Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I've seen it fail otherwise during development complaining about some incompatibility.
It also solves the problem of trying to replace a CRD that doesn't exist. For example if we run make uninstall install.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to understand first what were those incompatibility because when i tried it i didn't faced it, but yes it possible based on the version installed and what being installed.
If it fails due to incompatibility, i think user can be provided an option to force it with details about what to expect with force option and not do it by default because of the above concerns as there can be requirement to not wipe out installed control plane services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants