tetragon: Process Manager args cleanup #236
Merged
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.
This simplifies Process manager and arg handling creating common pkg to handle getting/setting args. After this series ./pkg/option is also used for standard configuration options such as ProcessNS and ProcessCreds.
With this we can simplify Process Manager arg passing and avoid pushing args down through multiple layers of calls. And additionally logs can pretty print the args at any debug or info point we need them.
Finally fixes up cache init flow to only enable the eventCache when the K8s watcher is also enabled. This further simplifies bringing the ProcessManager up because we no longer need to pass the arg through. And finally, we can drop storing the cache in the process manager object. Caches are singular objects you can't have multiple caches of the same type. Historically, we allowed this but it was thoroughly confusing and when some poor person had to debug it you end up asking questions like -- which cache is not working, is the event in the other cache , and so on-- so we removed this logic long ago, but process manager never came along with it until now.