Skip to content

Commit

Permalink
Bootstrap update for prom filter stats (istio#16683)
Browse files Browse the repository at this point in the history
* Update proxy sha to latest (istio#16552)

* file makefile for local proxy builds

* Add report prefix to extract istio standard metrics

* pickup latest proxy

* update golden files and test

* update stats_tags to match latest proxy image

* fix destination_service label (istio#16681)

* update proxy SHA

* fix more golden files

* update go control plane
  • Loading branch information
bianpengyuan authored and istio-testing committed Sep 3, 2019
1 parent 409b3b9 commit 461b001
Show file tree
Hide file tree
Showing 21 changed files with 1,000 additions and 36 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ ifeq ($(USE_LOCAL_PROXY),1)
export ISTIO_ENVOY_LOCAL ?= $(realpath ${ISTIO_GO}/../proxy/bazel-bin/src/envoy/envoy)
# Point the native paths to the local envoy build.
ifeq ($(GOOS_LOCAL), Darwin)
export ISTIO_ENVOY_MACOS_RELEASE_DIR = $(dirname ${ISTIO_ENVOY_LOCAL})
export ISTIO_ENVOY_MACOS_RELEASE_DIR = $(dir ${ISTIO_ENVOY_LOCAL})
export ISTIO_ENVOY_MACOS_RELEASE_PATH = ${ISTIO_ENVOY_LOCAL}
else
export ISTIO_ENVOY_LINUX_DEBUG_DIR = $(dirname ${ISTIO_ENVOY_LOCAL})
export ISTIO_ENVOY_LINUX_RELEASE_DIR = $(dirname ${ISTIO_ENVOY_LOCAL})
export ISTIO_ENVOY_LINUX_DEBUG_DIR = $(dir ${ISTIO_ENVOY_LOCAL})
export ISTIO_ENVOY_LINUX_RELEASE_DIR = $(dir ${ISTIO_ENVOY_LOCAL})
export ISTIO_ENVOY_LINUX_DEBUG_PATH = ${ISTIO_ENVOY_LOCAL}
export ISTIO_ENVOY_LINUX_RELEASE_PATH = ${ISTIO_ENVOY_LOCAL}
endif
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74 // indirect
github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect
github.com/emicklei/go-restful v2.9.3+incompatible
github.com/envoyproxy/go-control-plane v0.8.6
github.com/envoyproxy/go-control-plane v0.8.7-0.20190821215049-f062b07a671a
github.com/evanphx/json-patch v4.2.0+incompatible
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/stackerr v0.0.0-20150612192056-c2fcf88613f4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ github.com/elazarl/goproxy/ext v0.0.0-20190630181448-f1e96bc0f4c5 h1:/VMZdsbv0B1
github.com/elazarl/goproxy/ext v0.0.0-20190630181448-f1e96bc0f4c5/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g=
github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/envoyproxy/go-control-plane v0.8.6 h1:qygnyt9M1DjMSKIvr4YZS76yt28JiAu/o2LFEA68bko=
github.com/envoyproxy/go-control-plane v0.8.6/go.mod h1:XB9+ce7x+IrsjgIVnRnql0O61gj/np0/bGDfhJI3sCU=
github.com/envoyproxy/go-control-plane v0.8.7-0.20190821215049-f062b07a671a h1:SaBXBWjRmig9yVB49C6TcbDtbZTbhuFLod7YiGjuFxQ=
github.com/envoyproxy/go-control-plane v0.8.7-0.20190821215049-f062b07a671a/go.mod h1:XB9+ce7x+IrsjgIVnRnql0O61gj/np0/bGDfhJI3sCU=
github.com/envoyproxy/protoc-gen-validate v0.0.0-20190405222122-d6164de49109 h1:FNgqGzbOm637YKRbYGKb9cqGo8i50++w/LWvMau7jrw=
github.com/envoyproxy/protoc-gen-validate v0.0.0-20190405222122-d6164de49109/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
Expand Down
2 changes: 1 addition & 1 deletion istio.deps
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "PROXY_REPO_SHA",
"repoName": "proxy",
"file": "",
"lastStableSHA": "08d53544b4465545e095b1446ef8cc58471115e6"
"lastStableSHA": "06647a2aa53879cd78414131f256647fbea5e29f"
},
{
"_comment": "",
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/testdata/auth/productpage_config_dump.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
},
{
"tag_name": "response_code",
"regex": "_rq(_(\\d{3}))$"
"regex": "(response_code=\\.=(.+?);\\.;)|_rq(_(\\.d{3}))$"
},
{
"tag_name": "response_code_class",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
},
{
"tag_name": "response_code",
"regex": "_rq(_(\\d{3}))$"
"regex": "(response_code=\\.=(.+?);\\.;)|_rq(_(\\.d{3}))$"
},
{
"tag_name": "response_code_class",
Expand Down
4 changes: 2 additions & 2 deletions pkg/bootstrap/bootstrap_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ func checkStatsMatcher(t *testing.T, got, want *v2.Bootstrap, stats stats) {
gsm := got.GetStatsConfig().GetStatsMatcher()

if stats.prefixes == "" {
stats.prefixes = requiredEnvoyStatsMatcherInclusionPrefixes
stats.prefixes = "reporter=," + requiredEnvoyStatsMatcherInclusionPrefixes
} else {
stats.prefixes += "," + requiredEnvoyStatsMatcherInclusionPrefixes
stats.prefixes = "reporter=," + stats.prefixes + "," + requiredEnvoyStatsMatcherInclusionPrefixes
}

if stats.suffixes == "" {
Expand Down
85 changes: 83 additions & 2 deletions pkg/bootstrap/testdata/all_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"tag_name": "response_code",
"regex": "_rq(_(\\d{3}))$"
"regex": "(response_code=\\.=(.+?);\\.;)|_rq(_(\\.d{3}))$",
},
{
"tag_name": "response_code_class",
Expand All @@ -39,11 +39,92 @@
{
"tag_name": "mongo_prefix",
"regex": "^mongo\\.(.+?)\\.(collection|cmd|cx_|op_|delays_|decoding_)(.*?)$"
},
{
"regex": "(reporter=\\.=(.+?);\\.;)",
"tag_name": "reporter"
},
{
"regex": "(source_namespace=\\.=(.+?);\\.;)",
"tag_name": "source_namespace"
},
{
"regex": "(source_workload=\\.=(.+?);\\.;)",
"tag_name": "source_workload"
},
{
"regex": "(source_workload_namespace=\\.=(.+?);\\.;)",
"tag_name": "source_workload_namespace"
},
{
"regex": "(source_principal=\\.=(.+?);\\.;)",
"tag_name": "source_principal"
},
{
"regex": "(source_app=\\.=(.+?);\\.;)",
"tag_name": "source_app"
},
{
"regex": "(source_version=\\.=(.+?);\\.;)",
"tag_name": "source_version"
},
{
"regex": "(destination_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_namespace"
},
{
"regex": "(destination_workload=\\.=(.+?);\\.;)",
"tag_name": "destination_workload"
},
{
"regex": "(destination_workload_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_workload_namespace"
},
{
"regex": "(destination_principal=\\.=(.+?);\\.;)",
"tag_name": "destination_principal"
},
{
"regex": "(destination_app=\\.=(.+?);\\.;)",
"tag_name": "destination_app"
},
{
"regex": "(destination_version=\\.=(.+?);\\.;)",
"tag_name": "destination_version"
},
{
"regex": "(destination_service=\\.=(.+?);\\.;)",
"tag_name": "destination_service"
},
{
"regex": "(destination_service_name=\\.=(.+?);\\.;)",
"tag_name": "destination_service_name"
},
{
"regex": "(destination_service_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_service_namespace"
},
{
"regex": "(request_protocol=\\.=(.+?);\\.;)",
"tag_name": "request_protocol"
},
{
"regex": "(response_flags=\\.=(.+?);\\.;)",
"tag_name": "response_flags"
},
{
"regex": "(connection_security_policy=\\.=(.+?);\\.;)",
"tag_name": "connection_security_policy"
},
{
"regex": "(cache\\.(.+?)\\.)",
"tag_name": "cache"
}
],
"stats_matcher": {
"inclusion_list": {
"patterns": [{
"patterns": [{"prefix": "reporter="},
{
"prefix": "cluster_manager"
},
{
Expand Down
84 changes: 82 additions & 2 deletions pkg/bootstrap/testdata/auth_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
{
"tag_name": "response_code",
"regex": "_rq(_(\\d{3}))$"
"regex": "(response_code=\\.=(.+?);\\.;)|_rq(_(\\.d{3}))$",
},
{
"tag_name": "response_code_class",
Expand All @@ -40,11 +40,91 @@
{
"tag_name": "mongo_prefix",
"regex": "^mongo\\.(.+?)\\.(collection|cmd|cx_|op_|delays_|decoding_)(.*?)$"
},
{
"regex": "(reporter=\\.=(.+?);\\.;)",
"tag_name": "reporter"
},
{
"regex": "(source_namespace=\\.=(.+?);\\.;)",
"tag_name": "source_namespace"
},
{
"regex": "(source_workload=\\.=(.+?);\\.;)",
"tag_name": "source_workload"
},
{
"regex": "(source_workload_namespace=\\.=(.+?);\\.;)",
"tag_name": "source_workload_namespace"
},
{
"regex": "(source_principal=\\.=(.+?);\\.;)",
"tag_name": "source_principal"
},
{
"regex": "(source_app=\\.=(.+?);\\.;)",
"tag_name": "source_app"
},
{
"regex": "(source_version=\\.=(.+?);\\.;)",
"tag_name": "source_version"
},
{
"regex": "(destination_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_namespace"
},
{
"regex": "(destination_workload=\\.=(.+?);\\.;)",
"tag_name": "destination_workload"
},
{
"regex": "(destination_workload_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_workload_namespace"
},
{
"regex": "(destination_principal=\\.=(.+?);\\.;)",
"tag_name": "destination_principal"
},
{
"regex": "(destination_app=\\.=(.+?);\\.;)",
"tag_name": "destination_app"
},
{
"regex": "(destination_version=\\.=(.+?);\\.;)",
"tag_name": "destination_version"
},
{
"regex": "(destination_service=\\.=(.+?);\\.;)",
"tag_name": "destination_service"
},
{
"regex": "(destination_service_name=\\.=(.+?);\\.;)",
"tag_name": "destination_service_name"
},
{
"regex": "(destination_service_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_service_namespace"
},
{
"regex": "(request_protocol=\\.=(.+?);\\.;)",
"tag_name": "request_protocol"
},
{
"regex": "(response_flags=\\.=(.+?);\\.;)",
"tag_name": "response_flags"
},
{
"regex": "(connection_security_policy=\\.=(.+?);\\.;)",
"tag_name": "connection_security_policy"
},
{
"regex": "(cache\\.(.+?)\\.)",
"tag_name": "cache"
}
],
"stats_matcher": {
"inclusion_list": {
"patterns": [{
"patterns": [{"prefix": "reporter="},{
"prefix": "cluster_manager"
},
{
Expand Down
84 changes: 82 additions & 2 deletions pkg/bootstrap/testdata/authsds_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
{
"tag_name": "response_code",
"regex": "_rq(_(\\d{3}))$"
"regex": "(response_code=\\.=(.+?);\\.;)|_rq(_(\\.d{3}))$"
},
{
"tag_name": "response_code_class",
Expand All @@ -42,11 +42,91 @@
{
"tag_name": "mongo_prefix",
"regex": "^mongo\\.(.+?)\\.(collection|cmd|cx_|op_|delays_|decoding_)(.*?)$"
},
{
"regex": "(reporter=\\.=(.+?);\\.;)",
"tag_name": "reporter"
},
{
"regex": "(source_namespace=\\.=(.+?);\\.;)",
"tag_name": "source_namespace"
},
{
"regex": "(source_workload=\\.=(.+?);\\.;)",
"tag_name": "source_workload"
},
{
"regex": "(source_workload_namespace=\\.=(.+?);\\.;)",
"tag_name": "source_workload_namespace"
},
{
"regex": "(source_principal=\\.=(.+?);\\.;)",
"tag_name": "source_principal"
},
{
"regex": "(source_app=\\.=(.+?);\\.;)",
"tag_name": "source_app"
},
{
"regex": "(source_version=\\.=(.+?);\\.;)",
"tag_name": "source_version"
},
{
"regex": "(destination_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_namespace"
},
{
"regex": "(destination_workload=\\.=(.+?);\\.;)",
"tag_name": "destination_workload"
},
{
"regex": "(destination_workload_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_workload_namespace"
},
{
"regex": "(destination_principal=\\.=(.+?);\\.;)",
"tag_name": "destination_principal"
},
{
"regex": "(destination_app=\\.=(.+?);\\.;)",
"tag_name": "destination_app"
},
{
"regex": "(destination_version=\\.=(.+?);\\.;)",
"tag_name": "destination_version"
},
{
"regex": "(destination_service=\\.=(.+?);\\.;)",
"tag_name": "destination_service"
},
{
"regex": "(destination_service_name=\\.=(.+?);\\.;)",
"tag_name": "destination_service_name"
},
{
"regex": "(destination_service_namespace=\\.=(.+?);\\.;)",
"tag_name": "destination_service_namespace"
},
{
"regex": "(request_protocol=\\.=(.+?);\\.;)",
"tag_name": "request_protocol"
},
{
"regex": "(response_flags=\\.=(.+?);\\.;)",
"tag_name": "response_flags"
},
{
"regex": "(connection_security_policy=\\.=(.+?);\\.;)",
"tag_name": "connection_security_policy"
},
{
"regex": "(cache\\.(.+?)\\.)",
"tag_name": "cache"
}
],
"stats_matcher": {
"inclusion_list": {
"patterns": [{
"patterns": [{"prefix": "reporter="},{
"prefix": "cluster_manager"
},
{
Expand Down
Loading

0 comments on commit 461b001

Please sign in to comment.