Skip to content
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

Adding attachment fields to describe the environment in eBPF ALS #99

Merged
merged 3 commits into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions ebpf/accesslog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,27 @@ message AccessLogConnection {
AccessLogConnectionTLSMode tlsMode = 4;
// application protocol type
AccessLogProtocolType protocol = 5;
// the attachment information about the connection
ConnectionAttachment attachment = 6;
}

message ConnectionAttachment {
// detect contains the environment information
oneof environment {
// detect the connection have a zTunnel environment(ambient istio)
ZTunnelAttachmentEnvironment zTunnel = 1;
}
}

message ZTunnelAttachmentEnvironment {
// the real destination ip address of the connection
string real_destination_ip = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add an emun by to indicate how we resolve the real IP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we need to use this enum?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't, but we can tell which part of the logic made this. Helpful for debug only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a new enum to describe how the rover detects and resolves the real dest IP. Is this work for you?

// how the environment detected
ZTunnelAttachmentEnvironmentDetectBy by = 2;
}

enum ZTunnelAttachmentEnvironmentDetectBy {
ZTUNNEL_OUTBOUND_FUNC = 0;
}

message ConnectionAddress {
Expand Down
Loading