GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver
Cannot use http metric for scaling on kubernetes
- Dominant language
- Go
- Stars
- 409
- Forks
- 236
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 9
Description
Hi I'm trying to use stackdriver adapter with http metric. I have following the documentation and I define my new HPA like this. But When I deploy my hpa I have this following error
```apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: hpa
spec:
scaleTargetRef:
apiVersion: apps/v1beta1
kind: Deployment
name: hpa
minReplicas: 1
maxReplicas: 2
metrics:
- type: External
external:
metricName: loadbalancing.googleapis.com|https|backend_latencies
metricSelector:
matchLabels:
resource.labels.forwarding_rule_name: my-fw-rule
targetValue: "1"
### Output when I deploy
invalid value of \"ALIGN_RATE\": The aligner cannot be applied to metrics with kind DELTA and value type DISTRIBUTION.", Body:"{\n \"error\": {\n \"code\": 400,\n \"message\": \"Field aggregation.perSeriesAligner had an invalid value of \\\"ALIGN_RATE\\\": The aligner cannot be applied to metrics with kind DELTA and value type DISTRIBUTION.\",\n \"errors\": [\n {\n \"message\": \"Field aggregation.perSeriesAligner had an invalid value of \\\"ALIGN_RATE\\\": The aligner cannot be applied to metrics with kind DELTA and value type DISTRIBUTION.\",\n \"domain\": \"global\",\n \"reason\": \"badRequest\"\n }\n ],\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n", Header:http.Header(nil), Errors:[]googleapi.ErrorItem{googleapi.ErrorItem{Reason:"badRequest", Message:"Field aggregation.perSeriesAligner had an invalid value of \"ALIGN_RATE\": The aligner cannot be applied to metrics with kind DELTA and value type DISTRIBUTION."}}}``
Contributor guide
Assessment
This issue has not been assessed yet.