kubebuilder icon indicating copy to clipboard operation
kubebuilder copied to clipboard

:bug: fix: Remove make build-installer duplication

Open mateusoliveira43 opened this issue 1 year ago • 3 comments
trafficstars

Why the changes were made

Noticed that when running make build-installer in my project, CRDs were being included twice. This PR fixes this.

How the changes were made

Searched for the commit that introduced logic (https://github.com/kubernetes-sigs/kubebuilder/commit/f39e53e65a6661f1e6e63fe722f8267466c8363d#diff-e5d6d4f9d67174f1f3764674eb786688353c77cef8514e24d1323e55e5a4a7e8) to study it.

I believe the if statement is not necessary, because if you run kubebuilder init, you will have no config/crd folder; but once you run kubebuilder create api, ../crd is uncommented in resources field of config/default/kustomization.yaml file:


 resources:
-#- ../crd
+- ../crd
 - ../rbac

Which, will trigger CRDs being included when running kustomize build config/default.

After removing if block, ran make generate.

How to test the changes made

Confirm the changes do not break any use case.

mateusoliveira43 avatar Mar 07 '24 19:03 mateusoliveira43

Hi @mateusoliveira43. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 07 '24 19:03 k8s-ci-robot

/ok-to-test

camilamacedo86 avatar Mar 11 '24 13:03 camilamacedo86

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, lukas016, mateusoliveira43

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

The pull request process is described 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

k8s-ci-robot avatar Mar 29 '24 08:03 k8s-ci-robot

It is passing in the tests the issue here is faced in the legacy check which is removed and no longer exist on master branch so for we do not ask for the author have extra effort I am forcing the merge which seems very safe in this case.

camilamacedo86 avatar Mar 29 '24 19:03 camilamacedo86