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

WIP: Proposed API changes for ClusterBundle migration #486

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

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Nov 24, 2024

After getting feedback on the migration proposal, I believe the proposed (one-way) migration from Bundle to ClusterBundle could represent an opportunity to improve the API of trust-manager. So I did a little experiment and drafted some of the changes I think make sense. Relates to #485.

  • The proposed changes to the API will address Don't sync targets to all namespaces by default #39 (simple).
  • Changes will also make the target(s) specification a lot more consistent IMO, and address More flexible and better organized target specification in API #243. The proposed target spec will remove the need for many complex and error-prone webhook validations by making the api-server validate more.
  • With this changed target structure, it will also be easier to replace even more webhook validations with CEL. I have an open PR suggesting exactly this, WIP: Replace webhook validations with CEL validation #475. Some of the CEL expressions are now rather complex but will become a lot simpler after this change.
  • In addition, it will make testing simpler, and require less code to test (since we are using standard Kubernetes validations).
  • Last but not least, the new API will also provides a new feature: the ability to get multiple keys of the same trust-bundle format in a target.

Since the proposed migration represents a one-way "conversion", I believe the conversion logic will be quite simple, as opposed to a round-trippable conversion webhook.

@cert-manager-prow
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cert-manager-prow cert-manager-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Nov 24, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 24, 2024
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/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant