-
Notifications
You must be signed in to change notification settings - Fork 427
tetragon: group enable process ancestors flags #3581
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
Conversation
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Hey I didn't realized we added so many flags for one feature, would it be possible to group them under --enable-ancestors=kprobe,tracepoints,lsm
etc, instead of boolean flags? This PR is fine but I would think that would be a better usability thing. You can use StringSlice in viper flags.
Would you think that would be better maybe? Since this is a recent feature, maybe it's fine to just change the flags. Not sure it's been released already or not, if yes we might need to deprecate them before removing next release.
Hey. I think it should be possible to group them, yes. This feature was released with version 1.4.0 not so long ago. I'll see what i can do about it. Should i submit another PR or extend this one? |
I think it would be reasonable to merge this, and create another PR with two things:
OR we can make the UX correct in helm and then change the underlying implem. Any opinion @lambdanis ? |
I agree, this sounds like a better approach. I would update this PR to introduce both a new flag and a Helm value like this: tetragon:
processAncestors:
enabled: "base,kprobe,tracepoint,uprobe,lsm" You can rename and reuse Speaking more generally, the Helm values don't have to be named exactly like the corresponding flags. If we can group related values or follow Helm conventions, then it makes sense to structure them slightly differently than the corresponding flags. As an alternative to the above, I think Helm values like this would make sense too: tetragon:
processAncestors:
base:
enabled: true
kprobe:
enabled: true
tracepoint:
enabled: true
uprobe:
enabled: true
lsm:
enabled: true but then translating these to a comma-separated flag is not as straightforward, so if we're changing the flag format then it seems better to keep the Helm value format same. |
I don't think we need to translate it into a comma-seperated flag. Using multiple flags ( |
Yes iirc viper parses both
If the default is to be disabled, not sure we need a disable ancestor flags? Otherwise we need to resolve conflict etc, it sounds annoying and unnecessary. |
a7d448d
to
b4df3ae
Compare
Hey @mtardy , @lambdanis Thanks for the help. I added both new |
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.
Hey thanks a lot for the PR, it looks really clean!
However I think you could simplify by reusing the old variables internally (it's fine to have these variables, I think the important part is just avoid the UX of having all those flags). Also you can reuse the viper.GetStringSlice and just do validation on the values.
(I'll be out for 15 days from today, if you want to move this forward in the meantime you might want to ping someone else) |
188edb9
to
5bc1469
Compare
I can wait. I really appreciate the help. Thank you. |
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.
Thank you, looks good only a few comments. Sorry it was so complicated, I honestly thought it would be easier to do that!
also please ignore the windows test failing, you can rebase if you want and it should disappear. |
thanks btw for waiting :) |
a3cac58
to
f990f64
Compare
e8caab0
to
da7214d
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.
lgtm, sorry for the delay! I'll rerun the CI if there's an issue
da7214d
to
ce83e9d
Compare
Had to resolve conflicts in |
sorry we removed deps last week, you'll need to rebase once again 😔 |
Deprecate tetragon enable-process-ancestors boolean flags added in PR 2938 (e.g., see fd57a14) and introduce a new '--enable-ancestors' flag to replace them for better UX. Aforementioned flags are now marked as deprecated, but still usable. Signed-off-by: t0x01 <[email protected]>
Replace tetragon enable-process-ancestors boolean flags added in PR 2938 (e.g., see e2acd5b) with a new '--enable-ancestors' flag. Signed-off-by: t0x01 <[email protected]>
Deprecate tetragon enable-process-ancestors boolean flags added in PR 2938 (e.g., see dc9ba94) and introduce a new '--enable-ancestors' flag to replace them for better UX. Aforementioned flags are now marked as deprecated, but still usable. Signed-off-by: t0x01 <[email protected]>
Add support for process ancestors introduced in PR 2938 (e.g., see fd57a14). Signed-off-by: t0x01 <[email protected]>
ce83e9d
to
3c5753f
Compare
Thank you for your patience and help! |
This PR deprecates 5 enable-process-ancestors boolean flags added in PR 2938 and replaces them with a new
--enable-ancestors
flag for better UX. All 5 deprecated flags remain functional; the new--enable-ancestors
flag will simply override them if both old and new flags are used.Flags being deprecated:
--enable-process-ancestors
--enable-process-kprobe-ancestors
--enable-process-tracepoint-ancestors
--enable-process-uprobe-ancestors
--enable-process-lsm-ancestors
Also, support for the new flag is added in the Tetragon Helm chart via a
tetragon.processAncestors.enabled
value.