Skip to content

Generalize/deduplicate shared CRD definitions #356

@orf

Description

@orf

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions