|
node: |
|
id: test-server-ratings |
|
metadata: |
|
ISTIO_VERSION: "1.4-dev" |
|
EXCHANGE_KEYS: "NAME,NAMESPACE,INSTANCE_IPS,LABELS,OWNER,PLATFORM_METADATA,WORKLOAD_NAME" |
|
NAME: ratings-v22-84975bc778-pxz2w |
|
NAMESPACE: default |
|
WORKLOAD_NAME: ratings |
|
OWNER: /api/ns/deployment/ratings-deployment |
|
LABELS: { app: ratings, version: V22 } |
|
INSTANCE_IPS: "10.52.0.35,fe80::a075:11ff:fe5e:f1cd" |
|
istio: sidecar |
|
PLATFORM_METADATA: |
|
gcp_cluster_name: /redacted/ |
|
gcp_project: "/redacted/" |
|
gcp_cluster_location: "us-east4-b" |
|
stats_config: |
|
use_all_default_tags: false |
|
stats_tags: |
|
- tag_name: "reporter" |
|
regex: "(reporter=\\.=(.+?);\\.;)" |
|
- tag_name: "source_namespace" |
|
regex: "(source_namespace=\\.=(.+?);\\.;)" |
|
- tag_name: "source_workload" |
|
regex: "(source_workload=\\.=(.+?);\\.;)" |
|
- tag_name: "source_canonical_service" |
|
regex: "(source_canonical_service=\\.=(.+?);\\.;)" |
|
- tag_name: "source_canonical_revision" |
|
regex: "(source_canonical_revision=\\.=(.*?);\\.;)" |
|
- tag_name: "source_workload_namespace" |
|
regex: "(source_workload_namespace=\\.=(.+?);\\.;)" |
|
- tag_name: "source_principal" |
|
regex: "(source_principal=\\.=(.+?);\\.;)" |
|
- tag_name: "source_app" |
|
regex: "(source_app=\\.=(.+?);\\.;)" |
|
- tag_name: "source_version" |
|
regex: "(source_version=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_namespace" |
|
regex: "(destination_namespace=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_workload" |
|
regex: "(destination_workload=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_workload_namespace" |
|
regex: "(destination_workload_namespace=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_principal" |
|
regex: "(destination_principal=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_app" |
|
regex: "(destination_app=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_version" |
|
regex: "(destination_version=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_service" |
|
regex: "(destination_service=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_canonical_service" |
|
regex: "(destination_canonical_service=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_canonical_revision" |
|
regex: "(destination_canonical_revision=\\.=(.*?);\\.;)" |
|
- tag_name: "destination_service_name" |
|
regex: "(destination_service_name=\\.=(.+?);\\.;)" |
|
- tag_name: "destination_service_namespace" |
|
regex: "(destination_service_namespace=\\.=(.+?);\\.;)" |
|
- tag_name: "request_protocol" |
|
regex: "(request_protocol=\\.=(.+?);\\.;)" |
|
- tag_name: "request_operation" |
|
regex: "(request_operation=\\.=(.+?);\\.;)" |
|
- tag_name: "response_code" |
|
regex: "(response_code=\\.=(.+?);\\.;)|_rq(_(\\.d{3}))$" |
|
- tag_name: "grpc_response_status" |
|
regex: "(grpc_response_status=\\.=(.*?);\\.;)" |
|
- tag_name: "response_flags" |
|
regex: "(response_flags=\\.=(.+?);\\.;)" |
|
- tag_name: "connection_security_policy" |
|
regex: "(connection_security_policy=\\.=(.+?);\\.;)" |
|
- tag_name: "cache" |
|
regex: "(cache\\.(.+?)\\.)" |
|
- tag_name: "component" |
|
regex: "(component\\.(.+?)\\.)" |
|
- tag_name: "tag" |
|
regex: "(tag\\.(.+?);\\.)" |
|
static_resources: |
|
listeners: |
|
- name: server |
|
traffic_direction: INBOUND |
|
address: |
|
socket_address: |
|
address: 0.0.0.0 |
|
port_value: 8081 |
|
filter_chains: |
|
- filters: |
|
- name: envoy.http_connection_manager |
|
config: |
|
stat_prefix: ingress_http |
|
codec_type: auto |
|
route_config: |
|
name: local_route |
|
virtual_hosts: |
|
- name: local_service |
|
domains: |
|
- "*" |
|
routes: |
|
- match: |
|
prefix: "/" |
|
route: |
|
cluster: web_service |
|
http_filters: |
|
- name: istio.attributegen |
|
typed_config: |
|
'@type': type.googleapis.com/udpa.type.v1.TypedStruct |
|
type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm |
|
value: |
|
config: |
|
configuration: | |
|
{ "debug": "true", |
|
"attributes": [ |
|
{ |
|
"output_attribute": "istio_operationId", |
|
"match": [ |
|
{ |
|
"value": "GetStatus", |
|
"condition": "request.url_path.startsWith('/status')" |
|
} |
|
] |
|
}, |
|
{ |
|
"output_attribute": "istio_responseClass", |
|
"match": [ |
|
{ |
|
"value": "2xx", |
|
"condition": "response.code >= 200 && response.code <= 299" |
|
} |
|
] |
|
} |
|
] |
|
} |
|
vm_config: |
|
code: |
|
local: |
|
inline_string: envoy.wasm.attributegen |
|
runtime: envoy.wasm.runtime.null |
|
- name: istio.metadata_exchange |
|
typed_config: |
|
'@type': type.googleapis.com/udpa.type.v1.TypedStruct |
|
type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm |
|
value: |
|
config: |
|
configuration: "{\"name\": \"envoy.wasm.metadata_exchange\"}" |
|
vm_config: |
|
runtime: "envoy.wasm.runtime.v8" |
|
code: |
|
local: |
|
filename: "extensions/metadata_exchange/plugin.wasm" |
|
|
|
#code: |
|
# local: |
|
# inline_string: envoy.wasm.metadata_exchange |
|
#runtime: envoy.wasm.runtime.null |
|
- name: istio.stats |
|
typed_config: |
|
'@type': type.googleapis.com/udpa.type.v1.TypedStruct |
|
type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm |
|
value: |
|
config: |
|
configuration: | |
|
{ |
|
"debug": "true", |
|
"stat_prefix": "istio", |
|
"metrics": [ |
|
{ |
|
"name": "requests_total", |
|
"dimensions": { |
|
"request_operation": "istio_operationId" |
|
} |
|
} |
|
]} |
|
root_id: stats_inbound |
|
vm_config: |
|
runtime: "envoy.wasm.runtime.v8" |
|
code: |
|
local: |
|
filename: "extensions/stats/plugin.wasm" |
|
|
|
#code: |
|
# local: |
|
# inline_string: envoy.wasm.stats |
|
#runtime: envoy.wasm.runtime.null |
|
vm_id: stats_inbound |
|
- name: envoy.router |
|
config: {} |
|
access_log: |
|
- name: envoy.file_access_log |
|
typed_config: |
|
'@type': type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog |
|
path: "/tmp/server1.out" |
|
format: "server %FILTER_STATE(istio.operationId):20% error=%FILTER_STATE(istio.operationId_error):20% origin %RESPONSE_CODE% downstream:%REQ(x-envoy-peer-metadata-id)% downstream:%REQ(x-envoy-peer-metadata)%\n" |
|
- name: staticreply |
|
address: |
|
socket_address: |
|
address: 127.0.0.1 |
|
port_value: 8099 |
|
filter_chains: |
|
- filters: |
|
- name: envoy.http_connection_manager |
|
config: |
|
stat_prefix: ingress_http |
|
codec_type: auto |
|
route_config: |
|
name: local_route |
|
virtual_hosts: |
|
- name: local_service |
|
domains: |
|
- "*" |
|
routes: |
|
- match: |
|
prefix: "/" |
|
direct_response: |
|
status: 200 |
|
body: |
|
inline_string: "example body\n" |
|
http_filters: |
|
- name: envoy.lua |
|
typed_config: |
|
"@type": type.googleapis.com/envoy.config.filter.http.lua.v2.Lua |
|
inline_code: | |
|
function trivial_httpbin(request_handle) |
|
local headers = request_handle:headers() |
|
local path = headers:get(":path") |
|
local start, _ = path:find("/[^/]*$") |
|
local last_segment = path:sub(start+1) |
|
|
|
request_handle:respond( |
|
{[":status"] = last_segment}) |
|
end |
|
function envoy_on_request(request_handle) |
|
trivial_httpbin(request_handle) |
|
end |
|
- name: envoy.router |
|
config: {} |
|
access_log: |
|
- name: envoy.file_access_log |
|
typed_config: |
|
'@type': type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog |
|
path: "/tmp/server.out" |
|
format: "%FILTER_STATE(istio.operationId):20% origin %RESPONSE_CODE% downstream:%REQ(x-envoy-peer-metadata-id)% downstream:%REQ(x-envoy-peer-metadata)%\n" |
|
clusters: |
|
- name: web_service |
|
connect_timeout: 0.25s |
|
type: static |
|
lb_policy: round_robin |
|
hosts: |
|
- socket_address: |
|
address: 127.0.0.1 |
|
port_value: 8099 |
|
admin: |
|
access_log_path: "/dev/null" |
|
profile_path: /tmp/istio/envoy.prof |
|
address: |
|
socket_address: |
|
address: 0.0.0.0 |
|
port_value: 8002 |