-
Notifications
You must be signed in to change notification settings - Fork 218
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
feat(windows): Create standalone daemon for non-k8s orchestration #1385
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces a standalone daemon for non-K8s orchestration. Key changes include:
- Adding a standalone cache implementation with its corresponding test.
- Implementing a new standalone daemon in the cmd package.
- Introducing a BootstrapManager to initialize and start the daemon in non-Kubernetes environments.
Reviewed Changes
File | Description |
---|---|
pkg/controllers/cache/standalone_cache_test.go | Adds tests for standalone cache functionality |
cmd/standalone_daemon.go | Implements a new standalone daemon for Retina orchestration |
cmd/bootstrap_manager.go | Introduces a bootstrap manager to bootstrap the daemon |
pkg/controllers/cache/standalone_cache.go | Implements cache logic used by the standalone daemon |
cmd/standard/daemon.go | Updates daemon configuration and startup to integrate new behavior |
cmd/root.go | Updates CLI to use the new BootstrapManager instead of the daemon directly |
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
cmd/bootstrap_manager.go:43
- [nitpick] Consider using the logger for output instead of fmt.Printf to maintain consistent logging and potentially capture log levels and context.
fmt.Printf("Bootstrapping Retina")
defer c.rwMutex.RUnlock() | ||
|
||
if pod, exists := c.ipToPod[ip]; exists { | ||
return &pod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning the address of the local variable 'pod' (a copy from the map) might lead to unexpected behavior; consider storing pointers directly in the map to avoid copying issues.
return &pod | |
return pod |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
} | ||
|
||
func NewStandaloneDaemon(cfg *config.Config, zl *log.ZapLogger) (*StandaloneDaemon, error) { | ||
fmt.Println("starting Standalone Retina daemon") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider using the provided logger instead of fmt.Println to ensure consistent logging practices across the project.
fmt.Println("starting Standalone Retina daemon") | |
zl.Info("starting Standalone Retina daemon") |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Description
Please provide a brief description of the changes made in this pull request.
Related Issue
If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.
Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Please add any relevant screenshots or GIFs to showcase the changes made.
Additional Notes
Add any additional notes or context about the pull request here.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.