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 the KLM main entry function #2034

Open
7 tasks
medmes opened this issue Nov 19, 2024 · 0 comments
Open
7 tasks

Refactor the KLM main entry function #2034

medmes opened this issue Nov 19, 2024 · 0 comments
Labels
area/quality Related to all activites around quality kind/feature Categorizes issue or PR as related to a new feature.

Comments

@medmes
Copy link
Member

medmes commented Nov 19, 2024

Description

The main cmd/main.go function does a lot of responsibilities:

  1. Flags parsing and logger configuration
  2. Registering Schemes into k8s API Machinery for GVK/Go Schemas mapping.
  3. Profiling (pprof server).
  4. Manager setup for the reconcilers.
  5. Healthchecks
  6. Metrics and CleanUp.

Reasons

  • Violating the single responsibility principle.
  • Main should be simple as possible Setup , Run and Error handling.

Acceptance Criteria

  • - Refactor the code into smaller code.
  • - Configuration Initialisation (flags initialisation).
  • - Make sure the main has a minimal setUp ,
  • - Take in consideration the Error handling.
  • - The main function should follow SRP principle.
  • - Logging and Monitoring function call
  • - Graceful shutdown.
@medmes medmes added kind/feature Categorizes issue or PR as related to a new feature. area/quality Related to all activites around quality labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Related to all activites around quality kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant