Document how to use HTTPS for pod collector

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
This commit is contained in:
Arjun Naik 2019-07-14 15:49:00 +02:00
parent 8fed8538ad
commit 19e9be9671
2 changed files with 6 additions and 3 deletions

View File

@ -90,6 +90,7 @@ metadata:
metric-config.pods.requests-per-second.json-path/json-key: "$.http_server.rps"
metric-config.pods.requests-per-second.json-path/path: /metrics
metric-config.pods.requests-per-second.json-path/port: "9090"
metric-config.pods.requests-per-second.json-path/scheme: "https"
spec:
scaleTargetRef:
apiVersion: apps/v1
@ -123,9 +124,9 @@ The json-path query support depends on the
See the README for possible queries. It's expected that the metric you query
returns something that can be turned into a `float64`.
The other configuration options `path` and `port` specifies where the metrics
endpoint is exposed on the pod. There's no default values, so they must be
defined.
The other configuration options `path`, `port` and `scheme` specify where the metrics
endpoint is exposed on the pod. The `path` and `port` options do not have default values
so they must be defined. The `scheme` is optional and defaults to `http`.
## Prometheus collector

View File

@ -27,6 +27,7 @@ func TestParser(t *testing.T) {
"metric-config.pods.requests-per-second.json-path/json-key": "$.http_server.rps",
"metric-config.pods.requests-per-second.json-path/path": "/metrics",
"metric-config.pods.requests-per-second.json-path/port": "9090",
"metric-config.pods.requests-per-second.json-path/scheme": "https",
},
MetricName: "requests-per-second",
MetricType: autoscalingv2.PodsMetricSourceType,
@ -34,6 +35,7 @@ func TestParser(t *testing.T) {
"json-key": "$.http_server.rps",
"path": "/metrics",
"port": "9090",
"scheme": "https",
},
},
{