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

Feature: Dedicated structs for Shared/Common options #1754

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Baarsgaard
Copy link
Contributor

@Baarsgaard Baarsgaard commented Nov 12, 2024

I decided to open this draft in order to better illustrate what I meant with a common options struct, specifically:

  • ResyncPeriod
  • InstanceSelector
  • AllowCrossNamespaceImport

Notice that the CRDs have not changed at all, except for the descriptions and the default value for ResyncPeriod on some resources, the only exception being GrafanaNotificationPolicy which now has a AllowCrossNamespaceImport field

From what I can tell, this does not clash with using Interfaces for ensuring functions are defined for structs.

I included the GrafanaCommonStatus struct with a partial implementation as well in the second commit.
The expectation is that this one would help simplify the implementation of Statuses across CRDs (Conditions and more)

I fully expect this to not get merged in case you do not want to go in this direction.

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.

1 participant