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

Introduce hacky support for kind composition #31

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

Conversation

sdboyer
Copy link
Contributor

@sdboyer sdboyer commented Aug 3, 2023

This PR introduces (hacky! early!) support for composition of Composable kinds into Resource kinds.

The eventual goal is that we can describe kind composition declaratively in enough detail that all the work of doing composed validation can be handled generically here in the base kind implementations provided by kindsys. Doing so is prerequisite to doing full, composed validation on the apiserver, rather than having to rely webhooks (which would get pretty noisy).

For now, though, the implementations have to be hardcoded per-kind. I'm pulling up a corresponding PR in Grafana that does that for dashboards.

@sdboyer sdboyer added the enhancement New feature or request label Aug 3, 2023
@sdboyer sdboyer marked this pull request as ready for review August 4, 2023 12:53
@sdboyer
Copy link
Contributor Author

sdboyer commented Aug 4, 2023

Need to fix up tests, but this is working as-is for composed dashboard validation over in grafana/grafana

@sdboyer
Copy link
Contributor Author

sdboyer commented Aug 4, 2023

CI passing now.

We don't have a direct way of testing this in kindsys right now, but we will once we have a corpus. For now, best thing is just knowing that it works in core, for dashboards (see grafana/grafana#72934)

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


sam boyer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

2 participants