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

Make generated CRDs directly available for testing and development #214

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Nov 26, 2024

This is a new attempt at what was started in #209, but accidentally got merged before being fully reviewed (and then reverted in #213).

I think the CRDs generated by controller-gen should be available in our projects, not just temporary files used as input to Helm CRD templates. While this will semi-duplicate the CRDs in project repositories, I think it has a lot of benefits (not limited to):

I have suggested the default kubebuilder path for CRD manifests, even if we don't use/require kubebuilder in our projects. Open for other suggestions, but I think the term "bases" is important - as I think we can use kustomize to transform CRD in other use cases. When deciding on the path, please keep in mind that:

  • We probably want to continue using the generated files as input to Helm chart templates.
  • Leave room for possibly generating more than just CRDs.

@cert-manager-prow cert-manager-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Nov 26, 2024
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from erikgb. 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

@cert-manager-prow cert-manager-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 26, 2024
modules/helm/crds.mk Outdated Show resolved Hide resolved
Copy link
Contributor

@ThatsMrTalbot ThatsMrTalbot left a comment

Choose a reason for hiding this comment

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

Can you update the path to something like deploy/crds as discussed in the earlier thread, I also think we should drop a README in that dir with something like:

cert-manager recommends the CRDs are deployed as part of the Helm chart, these CRDs exist for reference and development.

After this merges we can create an github issue to refactor it out the helm module.

@erikgb
Copy link
Contributor Author

erikgb commented Nov 29, 2024

Can you update the path to something like deploy/crds as discussed in the earlier thread, I also think we should drop a README in that dir with something like:

cert-manager recommends the CRDs are deployed as part of the Helm chart, these CRDs exist for reference and development.

After this merges we can create an github issue to refactor it out the helm module.

Will do! Thanks for reviewing @ThatsMrTalbot!

@erikgb erikgb force-pushed the new-gen-crds branch 3 times, most recently from 6d334d8 to ad706f3 Compare November 30, 2024 09:01
@erikgb
Copy link
Contributor Author

erikgb commented Nov 30, 2024

@ThatsMrTalbot, your initial review comments should be addressed now. I have also created a WIP PR to verify/test that this would actually work in our projects: cert-manager/trust-manager#493. Rhere are probably additional (minor) details that need to be adjusted. PTAL!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants