-
Notifications
You must be signed in to change notification settings - Fork 267
feat(windows): Create daemon for non-k8s orchestration and update enricher, cache and controller to support standalone mode #1385
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
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")
0294bba to
a9efcc5
Compare
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.
Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- pkg/enricher/ctrinfo/mock_podSpec.json: Language not supported
- pkg/enricher/statefile/mock_statefile.json: Language not supported
3748469 to
44ce508
Compare
9528334 to
3988cf0
Compare
|
This PR will be closed in 7 days due to inactivity. |
|
Pull request closed due to inactivity. |
db81173 to
46bbf84
Compare
8a00e7c to
b4a6867
Compare
…and add additional unit tests
…isting architecture to support standalone
b4a6867 to
406b83e
Compare
560e696 to
858f730
Compare
|
This PR will be closed in 7 days due to inactivity. |
|
Pull request closed due to inactivity. |
Description
This PR is part 1 of a POC on enabling Retina to work outside of Kubernetes (ACI) and collect pod level information such as name and namespace by running it as a binary on the host VM.
The two main efforts are the following:
Decoupling the dependence for the K8s configuration files to allow bootstrapping to proceed. Currently, if the control plane fails to boot up, the data plane will also too. In the scenario of running on ACI, we need to reconfigure how Retina starts as it expects a lot of K8s information so that the responsible plugin (HNS stats - feature only supports windows as of now) can start collecting information. This behavior can be controlled by the new toggle, i.e.
enableStandaloneand by default it will be set to false.Collecting the pod related information. There are two ways that we can retrieve the pod name and its corresponding namespace for a given (HNS endpoint / IP address). Either through containerd or reading the CNI state file. This behavior can be controlled by another new toggle, i.e.
enableCrictl. Once these were collected by the controller, the new data are returned in the new set of advanced metrics for windowsBootstrap Manager:
config.yamlfile. The bootstrap manager then selects the appropriate daemon depending if standalone is enabled.Daemon:
Controller:
Enricher:
Related Issue
#1365
Checklist
git commit -S -s ...). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
AKS testing to ensure normal Retina works
Running it as a binary on a Windows VM
CriCtl
State-file
Manual deletion in the state-file to reflect cache is updated

ACI Dev Node
Additional Notes
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.