Skip to content

refactor: clean up configurations #876

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

Merged
merged 2 commits into from
Jan 28, 2022
Merged

refactor: clean up configurations #876

merged 2 commits into from
Jan 28, 2022

Conversation

metacosm
Copy link
Collaborator

  • refactor: use DefaultResourceConfiguration for controller configuration
  • feat: encapsulate Kubernetes dependent configuration

@metacosm metacosm added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 27, 2022
@metacosm metacosm self-assigned this Jan 27, 2022
@metacosm metacosm requested a review from csviri January 27, 2022 14:30
@@ -13,14 +13,13 @@

public class KubernetesDependentResourceController<R extends HasMetadata, P extends HasMetadata>
Copy link
Collaborator

Choose a reason for hiding this comment

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

TBH, don't see why we need this controller per resource model. Why cannot just the dependent resource manager handle this? Like having it aggregate the controllers and the configuration. But this is probably something to discuss if we decide we got his way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because it needs to be passed around at the moment. This change is about putting together the informer part and the ownership configuration into a single coherent configuration. Cleans up things by showing what belongs together. Helps things with the Quarkus extension as well.
We might indeed revisit, clean things further later but this change makes sense within the current scope.

Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

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

LGTM within this scope

This will help for passing it around as one object instead of passing
the informer configuration part and the owned status separately.
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 18 Code Smells

30.2% 30.2% Coverage
0.9% 0.9% Duplication

@metacosm metacosm merged commit d38dfb7 into next Jan 28, 2022
@metacosm metacosm deleted the clean-up-configs branch January 28, 2022 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants