mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2025-05-12 16:32:00 +00:00
Document how to use HTTPS for pod collector
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
This commit is contained in:
@ -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/json-key: "$.http_server.rps"
|
||||||
metric-config.pods.requests-per-second.json-path/path: /metrics
|
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/port: "9090"
|
||||||
|
metric-config.pods.requests-per-second.json-path/scheme: "https"
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
apiVersion: apps/v1
|
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
|
See the README for possible queries. It's expected that the metric you query
|
||||||
returns something that can be turned into a `float64`.
|
returns something that can be turned into a `float64`.
|
||||||
|
|
||||||
The other configuration options `path` and `port` specifies where the metrics
|
The other configuration options `path`, `port` and `scheme` specify where the metrics
|
||||||
endpoint is exposed on the pod. There's no default values, so they must be
|
endpoint is exposed on the pod. The `path` and `port` options do not have default values
|
||||||
defined.
|
so they must be defined. The `scheme` is optional and defaults to `http`.
|
||||||
|
|
||||||
## Prometheus collector
|
## Prometheus collector
|
||||||
|
|
||||||
|
@ -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/json-key": "$.http_server.rps",
|
||||||
"metric-config.pods.requests-per-second.json-path/path": "/metrics",
|
"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/port": "9090",
|
||||||
|
"metric-config.pods.requests-per-second.json-path/scheme": "https",
|
||||||
},
|
},
|
||||||
MetricName: "requests-per-second",
|
MetricName: "requests-per-second",
|
||||||
MetricType: autoscalingv2.PodsMetricSourceType,
|
MetricType: autoscalingv2.PodsMetricSourceType,
|
||||||
@ -34,6 +35,7 @@ func TestParser(t *testing.T) {
|
|||||||
"json-key": "$.http_server.rps",
|
"json-key": "$.http_server.rps",
|
||||||
"path": "/metrics",
|
"path": "/metrics",
|
||||||
"port": "9090",
|
"port": "9090",
|
||||||
|
"scheme": "https",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user