-
Notifications
You must be signed in to change notification settings - Fork 382
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
tetra: transparently handle unix or tcp gRPC socket #967
Conversation
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
8163f27
to
4a58631
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.
Thanks! LGTM.
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.
Thanks, Djalal!! It's cool to leverage /run/tetragon/tetragon-info.json
for detection. I guess it's in reaction to the recent user message on Slack regarding gRPC access. Thanks a lot for adding stuff to the documentation.
Make tetra cli guess the best configuration to use when connecting to daemon. This saves users from explicitly specifying the server address in case it is a unix socket. Since the client cli is run remotely, check if the server address was set - If yes: use it directly, users know better. - If no: then try the daemon tetragon-info.json file to find the best address if possible (could be unix socket). This also covers the case that default address is localhost so we are operating in localhost context anyway. If that address is set try it, if it fails for any reason then retry last time with the server address. Signed-off-by: Djalal Harouni <[email protected]>
Signed-off-by: Djalal Harouni <[email protected]>
4a58631
to
efe8114
Compare
Signed-off-by: Djalal Harouni <[email protected]>
efe8114
to
334c50b
Compare
Yes, much appreciated @mtardy @kkourt @michi-covalent for the review |
Make tetra cli guess the best configuration to use when connecting to daemon. This saves users from explicitly specifying the server address in case it is a unix socket, as it works in localhost context anyway.
Since the client cli is run remotely, check if the server address was set
If yes: use it directly, users know better.
If no: then try the daemon tetragon-info.json file to find the best address
if possible (could be unix socket). This also covers the case that default
address is localhost so we are operating in localhost context anyway.
If that address is set try it, if it fails for any reason then retry last
time with the server address.
Signed-off-by: Djalal Harouni [email protected]