Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/external-provider: set metric name for scalar values #196

Merged
merged 2 commits into from
May 17, 2019

Conversation

s-urbaniak
Copy link
Contributor

@s-urbaniak s-urbaniak commented May 17, 2019

Currently simple external scalar values don't have a value attached:

{
  "kind": "ExternalMetricValueList",
  "apiVersion": "external.metrics.k8s.io/v1beta1",
  "metadata": {
    "selfLink": "/apis/external.metrics.k8s.io/v1beta1/namespaces/default/http_requests_per_second"
  },
  "items": [
    {
      "metricName": "",
..
      "value": "100133m"
    }
  ]
}

This fixes it:

{
  "kind": "ExternalMetricValueList",
  "apiVersion": "external.metrics.k8s.io/v1beta1",
  "metadata": {
    "selfLink": "/apis/external.metrics.k8s.io/v1beta1/namespaces/default/http_requests_per_second"
  },
  "items": [
    {
      "metricName": "http_requests_per_second",
...
      "value": "100133m"
    }
  ]
}

@s-urbaniak
Copy link
Contributor Author

/cc @paulfantom

Copy link
Contributor

@metalmatze metalmatze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@paulfantom paulfantom force-pushed the external-metric-name branch from 66e7adf to 99d52a4 Compare May 17, 2019 12:31
@paulfantom
Copy link
Contributor

rebased onto master and fixed unit test from #192

@s-urbaniak s-urbaniak merged commit 4b695d4 into kubernetes-sigs:master May 17, 2019
@s-urbaniak s-urbaniak deleted the external-metric-name branch May 17, 2019 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants