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

Refactor: Common opts structs and ResyncPeriod #1765

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Baarsgaard
Copy link
Contributor

@Baarsgaard Baarsgaard commented Nov 18, 2024

This PR takes the first step towards refactoring the reconciliation loops for all CRs.

I've added a GrafanaCommonOptions struct which embeds the Common Options fields as a singular struct.

This means that all CRs will use the same comments, rules for CRD generation/deserialization, and default values.
This is especially apparent for ResyncPeriod which had a few different implementations.

This does add the AllowCrossNamespaceImport to GrafanaNotificationPolicies, but it is not handled in the Reconciliation loop as of now.

It is recommended to review this one commit at a time.
Individual commits may not compile except for the final one.

@Baarsgaard Baarsgaard marked this pull request as ready for review November 18, 2024 17:05
Copy link
Member

@theSuess theSuess left a comment

Choose a reason for hiding this comment

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

This looks good to me! Thanks for splitting this out. Would appreciate an additonal review just to be safe since this touches basically all resources

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