feat(windows): Create daemon for non-k8s orchestration and update enricher, cache and controller to support standalone mode#1385
Closed
BeegiiK wants to merge 11 commits into
Closed
feat(windows): Create daemon for non-k8s orchestration and update enricher, cache and controller to support standalone mode#1385BeegiiK wants to merge 11 commits into
BeegiiK wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
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
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. |
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. |
|
This PR will be closed in 7 days due to inactivity. |
|
Pull request closed due to inactivity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.