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

Generalize/deduplicate shared CRD definitions #356

Open
orf opened this issue Jan 6, 2025 · 1 comment
Open

Generalize/deduplicate shared CRD definitions #356

orf opened this issue Jan 6, 2025 · 1 comment

Comments

@orf
Copy link

orf commented Jan 6, 2025

Hey, me again 😅.

And, as always, thanks for this amazing library. I'm working with the external-secrets.io CRDs, and I've come up against something pretty annoying.

Within the CRDs, there exists two identical enums: ClusterSecretStores and SecretStores.

Aside from the description these are the same enums with the same members, but as they are represented as different types it becomes convoluted to write code to work on, say, a BeyondTrust provider: it's either a ClusterSecretStoreProviderBeyondtrustServer or a ClusterSecretStoreProviderBeyondtrustServer.

Solving this in the general case seems non-trivial. I have yet to dig into it, but perhaps it could be solved at the API schema generation step? I'd be surprised if somewhere down the stack these two enums are represented as the same type, but that information is lost somewhere during processing which results in the types being duplicated.

I'm implementing something for my company with this library and so I can spend some work time tinkering with this, if you think it's at all possible.

So I'd love your thoughts here!

@orf
Copy link
Author

orf commented Jan 6, 2025

Related: kube-rs/kopium#298

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

No branches or pull requests

1 participant