tetra: transparently handle unix or tcp gRPC socket#967
Merged
Conversation
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
tixxdz
force-pushed
the
pr/tixxdz/client-auto-handle-unix-or-tcp-socket
branch
from
May 3, 2023 12:44
8163f27 to
4a58631
Compare
kkourt
approved these changes
May 3, 2023
mtardy
approved these changes
May 3, 2023
mtardy
left a comment
Member
There was a problem hiding this comment.
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.
mtardy
reviewed
May 3, 2023
michi-covalent
approved these changes
May 3, 2023
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 <tixxdz@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
tixxdz
force-pushed
the
pr/tixxdz/client-auto-handle-unix-or-tcp-socket
branch
from
May 4, 2023 09:56
4a58631 to
efe8114
Compare
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
tixxdz
force-pushed
the
pr/tixxdz/client-auto-handle-unix-or-tcp-socket
branch
from
May 4, 2023 09:58
efe8114 to
334c50b
Compare
Member
Author
Yes, much appreciated @mtardy @kkourt @michi-covalent for the review |
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.
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 tixxdz@gmail.com