-
Notifications
You must be signed in to change notification settings - Fork 69
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
use peer_metadata to get pod metadata info from istiod #411
Conversation
Signed-off-by: YaoZengzeng <yaozengzeng@huawei.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅ ❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Flags with carried forward coverage won't be shown. Click here to find out more. |
- '*' | ||
routes: | ||
- match: | ||
prefix: "/" |
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.
If we look at the new configdump from 1.22 waypoint this is changed to
- match:
connectMatcher: {}
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.
It is connectMatcher
in 1.21 as well which is used to match HTTO CONNECTH request, refer: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-field-config-route-v3-routematch-connect-matcher
Because we don't use HBONE, change it to path matching.
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.
Ah, ic. This is not needed for us
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind enhancement
use
peer_metadata
http filter to get pod metadata from istiodWhat this PR does / why we need it:
So we could get necessary fields to fill observability information
Before this modification, the metric is :
istio_requests_total{reporter="destination",source_workload="unknown",source_canonical_service="unknown",source_canonical_revision="latest",source_workload_namespace="unknown",source_principal="unknown",source_app="unknown",source_version="unknown",source_cluster="unknown",destination_workload="reviews-v1",destination_workload_namespace="default",destination_principal="unknown",destination_app="unknown",destination_version="unknown",destination_service="reviews.default.svc.cluster.local",destination_canonical_service="reviews",destination_canonical_revision="v1",destination_service_name="reviews",destination_service_namespace="default",destination_cluster="Kubernetes",request_protocol="http",response_code="200",grpc_response_status="",response_flags="-",connection_security_policy="none"} 93
After this modification:
istio_requests_total{reporter="destination",source_workload="productpage-v1",source_canonical_service="productpage",source_canonical_revision="v1",source_workload_namespace="default",source_principal="unknown",source_app="productpage",source_version="v1",source_cluster="Kubernetes",destination_workload="reviews-v1",destination_workload_namespace="default",destination_principal="unknown",destination_app="unknown",destination_version="unknown",destination_service="reviews.default.svc.cluster.local",destination_canonical_service="reviews",destination_canonical_revision="v1",destination_service_name="reviews",destination_service_namespace="default",destination_cluster="Kubernetes",request_protocol="http",response_code="200",grpc_response_status="",response_flags="-",connection_security_policy="none"} 1
And the metric from waypoint in ambient mesh:
istio_requests_total{reporter="destination",source_workload="productpage-v1",source_canonical_service="productpage",source_canonical_revision="v1",source_workload_namespace="default",source_principal="spiffe://cluster.local/ns/default/sa/bookinfo-productpage",source_app="productpage",source_version="v1",source_cluster="Kubernetes",destination_workload="reviews-v1",destination_workload_namespace="default",destination_principal="spiffe://cluster.local/ns/default/sa/bookinfo-reviews-istio-waypoint",destination_app="unknown",destination_version="unknown",destination_service="reviews.default.svc.cluster.local",destination_canonical_service="reviews",destination_canonical_revision="v1",destination_service_name="reviews",destination_service_namespace="default",destination_cluster="Kubernetes",request_protocol="http",response_code="200",grpc_response_status="",response_flags="-",connection_security_policy="mutual_tls"} 34
We have basically filled in all the fields, compared with ambient.
Which issue(s) this PR fixes:
Fixes part of #320
Special notes for your reviewer:
Does this PR introduce a user-facing change?: