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

feat: enable v2alpha1 API with conversion webhook #107

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Nov 12, 2023

This PR makes the new v2alpha1 version of the API served and enables the conversion webhook using logic established in #96.

After this, I will suggest changing the SubNamespace controller to watch/reconcile version v1alpha1 (using SSA). When the controller watches v2alpha1 version, I think it also makes sense to switch the stored version.

@erikgb
Copy link
Contributor Author

erikgb commented Nov 12, 2023

@zoetrope @ymmt2005 Do you have any suggestions on how to solve the CRD issue in the Helm chart? It won't work as it stands now, and an additional problem is that Helm is unable to template CRD. For this reason, several open-source projects have moved the CRDs out of the Helm crds folder. And provides a Helm value to control if CRDs are provisioned or not. Helm has never had proper support for CRDs, and I think they have given up now. Please take a look at how cert-manager, which I know pretty well "solves" the Helm issue: https://cert-manager.io/docs/installation/helm/#3-install-customresourcedefinitions

If you think that's a good approach, I can prepare a preparation PR making the CRDs possible to template. And then I can progress on this PR.

@erikgb erikgb force-pushed the conversion-webhook branch 2 times, most recently from 2e5757d to 2c7c35d Compare November 13, 2023 09:09
@zoetrope
Copy link
Member

@erikgb
I had a look at the cert-manager technique.
https://github.com/cert-manager/cert-manager/blob/d2f6bbe579fd9d5f88b82f9a4bfe9241709e9eb8/make/manifests.mk#L107-L110

I agree that it seems like a very good approach.
Let's proceed with this method.

@erikgb
Copy link
Contributor Author

erikgb commented Nov 14, 2023

I agree that it seems like a very good approach. Let's proceed with this method.

Thanks for the feedback. I will prepare a PR.

@erikgb erikgb force-pushed the conversion-webhook branch 3 times, most recently from 977c797 to 9679ae2 Compare November 15, 2023 16:40
@erikgb erikgb force-pushed the conversion-webhook branch from 9679ae2 to aec6020 Compare November 15, 2023 17:00
@erikgb erikgb changed the title WIP: feat: enable v2alpha1 API with conversion webhook feat: enable v2alpha1 API with conversion webhook Nov 15, 2023
@erikgb erikgb marked this pull request as ready for review November 15, 2023 17:11
@erikgb
Copy link
Contributor Author

erikgb commented Nov 15, 2023

@zoetrope I think this PR is ready for review now. I have also added a simple e2e-test to check conversion works. Next PR will be a lot more interesting - I think. 😸

Copy link
Member

@zoetrope zoetrope left a comment

Choose a reason for hiding this comment

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

LGTM

@zoetrope zoetrope merged commit 0432061 into cybozu-go:main Nov 20, 2023
8 checks passed
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.

2 participants