Skip to content

Commit be3591c

Browse files
authored
Remove Istio telemetry metrics (#376)
1 parent 3523857 commit be3591c

File tree

11 files changed

+3
-142
lines changed

11 files changed

+3
-142
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ ci-build-images:
154154
@./build/build-image.sh images/istio-galley istio-galley
155155
@./build/build-image.sh images/istio-pilot istio-pilot
156156
@./build/build-image.sh images/istio-proxy istio-proxy
157-
@./build/build-image.sh images/istio-mixer istio-mixer
158157

159158
ci-push-images:
160159
@./build/push-image.sh manager
@@ -173,7 +172,6 @@ ci-push-images:
173172
@./build/push-image.sh istio-galley
174173
@./build/push-image.sh istio-pilot
175174
@./build/push-image.sh istio-proxy
176-
@./build/push-image.sh istio-mixer
177175

178176

179177
ci-build-cli:

cli/cmd/get.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,20 +338,13 @@ func getAPIMetrics(appName, apiName string) (*schema.APIMetrics, error) {
338338
}
339339

340340
func appendNetworkMetrics(apiTable table.Table, apiMetrics *schema.APIMetrics) table.Table {
341-
latency := "-"
342-
if apiMetrics.NetworkStats.Latency != nil {
343-
latency = fmt.Sprintf("%.9g", *apiMetrics.NetworkStats.Latency)
344-
}
345-
346341
headers := []table.Header{
347-
{Title: "avg latency"},
348342
{Title: "2XX", Hidden: apiMetrics.NetworkStats.Code2XX == 0},
349343
{Title: "4XX", Hidden: apiMetrics.NetworkStats.Code4XX == 0},
350344
{Title: "5XX", Hidden: apiMetrics.NetworkStats.Code5XX == 0},
351345
}
352346

353347
row := []interface{}{
354-
latency,
355348
apiMetrics.NetworkStats.Code2XX,
356349
apiMetrics.NetworkStats.Code4XX,
357350
apiMetrics.NetworkStats.Code5XX,

cortex.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ export CORTEX_IMAGE_ISTIO_CITADEL="${CORTEX_IMAGE_ISTIO_CITADEL:-cortexlabs/isti
145145
export CORTEX_IMAGE_ISTIO_GALLEY="${CORTEX_IMAGE_ISTIO_GALLEY:-cortexlabs/istio-galley:$CORTEX_VERSION_STABLE}"
146146
export CORTEX_IMAGE_ISTIO_PILOT="${CORTEX_IMAGE_ISTIO_PILOT:-cortexlabs/istio-pilot:$CORTEX_VERSION_STABLE}"
147147
export CORTEX_IMAGE_ISTIO_PROXY="${CORTEX_IMAGE_ISTIO_PROXY:-cortexlabs/istio-proxy:$CORTEX_VERSION_STABLE}"
148-
export CORTEX_IMAGE_ISTIO_MIXER="${CORTEX_IMAGE_ISTIO_MIXER:-cortexlabs/istio-mixer:$CORTEX_VERSION_STABLE}"
149148

150149
export CORTEX_ENABLE_TELEMETRY="${CORTEX_ENABLE_TELEMETRY:-""}"
151150
export CORTEX_TELEMETRY_URL="${CORTEX_TELEMETRY_URL:-"https://telemetry.cortexlabs.dev"}"
@@ -205,7 +204,6 @@ function install_cortex() {
205204
-e CORTEX_IMAGE_ISTIO_GALLEY=$CORTEX_IMAGE_ISTIO_GALLEY \
206205
-e CORTEX_IMAGE_ISTIO_PILOT=$CORTEX_IMAGE_ISTIO_PILOT \
207206
-e CORTEX_IMAGE_ISTIO_PROXY=$CORTEX_IMAGE_ISTIO_PROXY \
208-
-e CORTEX_IMAGE_ISTIO_MIXER=$CORTEX_IMAGE_ISTIO_MIXER \
209207
-e CORTEX_ENABLE_TELEMETRY=$CORTEX_ENABLE_TELEMETRY \
210208
$CORTEX_IMAGE_MANAGER
211209
}

dev/registry.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ function create_registry() {
4141
aws ecr create-repository --repository-name=cortexlabs/istio-pilot --region=$REGISTRY_REGION || true
4242
aws ecr create-repository --repository-name=cortexlabs/istio-galley --region=$REGISTRY_REGION || true
4343
aws ecr create-repository --repository-name=cortexlabs/istio-proxy --region=$REGISTRY_REGION || true
44-
aws ecr create-repository --repository-name=cortexlabs/istio-mixer --region=$REGISTRY_REGION || true
4544
aws ecr create-repository --repository-name=cortexlabs/operator --region=$REGISTRY_REGION || true
4645
aws ecr create-repository --repository-name=cortexlabs/tf-serve --region=$REGISTRY_REGION || true
4746
aws ecr create-repository --repository-name=cortexlabs/tf-api --region=$REGISTRY_REGION || true
@@ -137,7 +136,6 @@ elif [ "$cmd" = "update" ]; then
137136
build_and_push $ROOT/images/istio-pilot istio-pilot latest
138137
build_and_push $ROOT/images/istio-galley istio-galley latest
139138
build_and_push $ROOT/images/istio-proxy istio-proxy latest
140-
build_and_push $ROOT/images/istio-mixer istio-mixer latest
141139
fi
142140

143141
build_and_push $ROOT/images/tf-api tf-api latest

docs/cluster/config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export CORTEX_IMAGE_CLUSTER_AUTOSCALER="cortexlabs/cluster-autoscaler:master"
5656
export CORTEX_IMAGE_NVIDIA="cortexlabs/nvidia:master"
5757
export CORTEX_IMAGE_METRICS_SERVER="cortexlabs/metrics-server:master"
5858
export CORTEX_IMAGE_ISTIO_PROXY="cortexlabs/istio-proxy:master"
59-
export CORTEX_IMAGE_ISTIO_MIXER="cortexlabs/istio-mixer:master"
6059
export CORTEX_IMAGE_ISTIO_PILOT="cortexlabs/istio-pilot:master"
6160
export CORTEX_IMAGE_ISTIO_CITADEL="cortexlabs/istio-citadel:master"
6261
export CORTEX_IMAGE_ISTIO_GALLEY="cortexlabs/istio-galley:master"

docs/cluster/development.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export CORTEX_IMAGE_CLUSTER_AUTOSCALER="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com
7474
export CORTEX_IMAGE_NVIDIA="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com/cortexlabs/nvidia:latest"
7575
export CORTEX_IMAGE_METRICS_SERVER="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com/cortexlabs/metrics-server:latest"
7676
export CORTEX_IMAGE_ISTIO_PROXY="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com/cortexlabs/istio-proxy:latest"
77-
export CORTEX_IMAGE_ISTIO_MIXER="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com/cortexlabs/istio-mixer:latest"
7877
export CORTEX_IMAGE_ISTIO_PILOT="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com/cortexlabs/istio-pilot:latest"
7978
export CORTEX_IMAGE_ISTIO_CITADEL="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com/cortexlabs/istio-citadel:latest"
8079
export CORTEX_IMAGE_ISTIO_GALLEY="XXXXXXXX.dkr.ecr.us-west-2.amazonaws.com/cortexlabs/istio-galley:latest"

images/istio-mixer/Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

manager/install_cortex.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,6 @@ function setup_istio() {
9898
echo -n "."
9999

100100
envsubst < manifests/istio-values.yaml | helm template istio-manifests/istio --values - --name istio --namespace istio-system | kubectl apply -f - >/dev/null
101-
envsubst < manifests/istio-metrics.yaml | kubectl apply -f - >/dev/null
102-
103-
kubectl -n=istio-system create secret generic 'aws-credentials' \
104-
--from-literal='AWS_ACCESS_KEY_ID'=$CORTEX_AWS_ACCESS_KEY_ID \
105-
--from-literal='AWS_SECRET_ACCESS_KEY'=$CORTEX_AWS_SECRET_ACCESS_KEY \
106-
-o yaml --dry-run | kubectl apply -f - >/dev/null
107-
istio_patch="[
108-
{\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/env/-\", \"value\": {\"name\": \"AWS_ACCESS_KEY_ID\", \"valueFrom\": {\"secretKeyRef\": {\"name\": \"aws-credentials\", \"key\": \"AWS_ACCESS_KEY_ID\"}}}},\
109-
{\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/env/-\", \"value\": {\"name\": \"AWS_SECRET_ACCESS_KEY\", \"valueFrom\": {\"secretKeyRef\": {\"name\": \"aws-credentials\", \"key\": \"AWS_SECRET_ACCESS_KEY\"}}}},\
110-
]"
111-
kubectl patch deployment istio-telemetry -n istio-system --type='json' -p="$istio_patch" >/dev/null
112101
}
113102

114103
function validate_cortex() {

manager/manifests/istio-metrics.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

manager/manifests/istio-values.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,11 @@ galley:
112112
enabled: true
113113

114114
mixer:
115-
image: $CORTEX_IMAGE_ISTIO_MIXER
115+
enabled: false
116116
policy:
117117
enabled: false
118118
telemetry:
119-
enabled: true
120-
replicaCount: 1
121-
autoscaleMin: 1
122-
autoscaleMax: 5
123-
resources:
124-
requests:
125-
cpu: 1000m
126-
memory: 1G
127-
limits:
128-
cpu: 4800m
129-
memory: 4G
130-
env:
131-
AWS_REGION: $CORTEX_REGION
132-
LOG_GROUP_NAME: $CORTEX_LOG_GROUP
119+
enabled: false
133120

134121
pilot:
135122
image: $CORTEX_IMAGE_ISTIO_PILOT

pkg/operator/workloads/metrics.go

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ func getAPIMetricsFunc(ctx *context.Context, api *context.API, period int64, sta
119119
}
120120

121121
func queryMetrics(ctx *context.Context, api *context.API, period int64, startTime *time.Time, endTime *time.Time) ([]*cloudwatch.MetricDataResult, error) {
122-
networkDataQueries := getNetworkStatsDef(ctx.App.Name, api, period)
123-
latencyMetrics := getLatencyMetricsDef(api.Path, period)
124-
allMetrics := append(latencyMetrics, networkDataQueries...)
122+
allMetrics := getNetworkStatsDef(ctx.App.Name, api, period)
125123

126124
if api.Tracker != nil {
127125
if api.Tracker.ModelType == userconfig.ClassificationModelType {
@@ -246,49 +244,6 @@ func getAPIDimensions(appName string, api *context.API) []*cloudwatch.Dimension
246244
}
247245
}
248246

249-
func getLatencyMetricsDef(routeName string, period int64) []*cloudwatch.MetricDataQuery {
250-
networkDataQueries := []*cloudwatch.MetricDataQuery{
251-
{
252-
Id: aws.String("latency"),
253-
Label: aws.String("Latency"),
254-
MetricStat: &cloudwatch.MetricStat{
255-
Metric: &cloudwatch.Metric{
256-
Namespace: aws.String(config.Cortex.LogGroup),
257-
MetricName: aws.String("response-time.instance.cortex"),
258-
Dimensions: []*cloudwatch.Dimension{
259-
{
260-
Name: aws.String("RequestPath"),
261-
Value: aws.String(routeName),
262-
},
263-
},
264-
},
265-
Stat: aws.String("Average"),
266-
Period: aws.Int64(period),
267-
},
268-
},
269-
{
270-
Id: aws.String("request_count"),
271-
Label: aws.String("RequestCount"),
272-
MetricStat: &cloudwatch.MetricStat{
273-
Metric: &cloudwatch.Metric{
274-
Namespace: aws.String(config.Cortex.LogGroup),
275-
MetricName: aws.String("response-time.instance.cortex"),
276-
Dimensions: []*cloudwatch.Dimension{
277-
{
278-
Name: aws.String("RequestPath"),
279-
Value: aws.String(routeName),
280-
},
281-
},
282-
},
283-
Stat: aws.String("SampleCount"),
284-
Period: aws.Int64(period),
285-
},
286-
},
287-
}
288-
289-
return networkDataQueries
290-
}
291-
292247
func getRegressionMetricDef(appName string, api *context.API, period int64) []*cloudwatch.MetricDataQuery {
293248
metric := &cloudwatch.Metric{
294249
Namespace: aws.String(config.Cortex.LogGroup),

0 commit comments

Comments
 (0)