Skip to content

Commit

Permalink
Merge pull request kubernetes#1812 from bavarianbidi/deprecate_precom…
Browse files Browse the repository at this point in the history
…puted_endpoint_metrics

graduate new endpoint metrics to STABLE
  • Loading branch information
k8s-ci-robot authored Aug 23, 2022
2 parents f1d5653 + 9f7d1af commit 69cc196
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/endpoint-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
| Metric name| Metric type | Labels/tags | Status |
| ---------- | ----------- | ----------- | ----------- |
| kube_endpoint_annotations | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; <br> `annotation_ENDPOINT_ANNOTATION`=&lt;ENDPOINT_ANNOTATION&gt; | EXPERIMENTAL |
| kube_endpoint_address_not_ready | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; | STABLE |
| kube_endpoint_address_available | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; | STABLE |
| kube_endpoint_address_not_ready | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; | DEPRECATED |
| kube_endpoint_address_available | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; | DEPRECATED |
| kube_endpoint_info | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; | STABLE |
| kube_endpoint_labels | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; <br> `label_ENDPOINT_LABEL`=&lt;ENDPOINT_LABEL&gt; | STABLE |
| kube_endpoint_created | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; | STABLE |
| kube_endpoint_ports | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; <br> `port_name`=&lt;endpoint-port-name&gt; <br> `port_protocol`=&lt;endpoint-port-protocol&gt; <br> `port_number`=&lt;endpoint-port-number&gt; | EXPERIMENTAL |
| kube_endpoint_address | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; <br> `ip`=&lt;endpoint-ip&gt; <br> `ready`=&lt;true if available, false if unavailalbe&gt; | EXPERIMENTAL |
| kube_endpoint_ports | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; <br> `port_name`=&lt;endpoint-port-name&gt; <br> `port_protocol`=&lt;endpoint-port-protocol&gt; <br> `port_number`=&lt;endpoint-port-number&gt; | STABLE |
| kube_endpoint_address | Gauge | `endpoint`=&lt;endpoint-name&gt; <br> `namespace`=&lt;endpoint-namespace&gt; <br> `ip`=&lt;endpoint-ip&gt; <br> `ready`=&lt;true if available, false if unavailalbe&gt; | STABLE |
4 changes: 2 additions & 2 deletions internal/store/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []ge
"kube_endpoint_address_available",
"Number of addresses available in endpoint.",
metric.Gauge,
"",
"v2.6.0",
wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family {
var available int
for _, s := range e.Subsets {
Expand All @@ -136,7 +136,7 @@ func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []ge
"kube_endpoint_address_not_ready",
"Number of addresses not ready in endpoint",
metric.Gauge,
"",
"v2.6.0",
wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family {
var notReady int
for _, s := range e.Subsets {
Expand Down
8 changes: 4 additions & 4 deletions internal/store/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func TestEndpointStore(t *testing.T) {
const metadata = `
# HELP kube_endpoint_annotations Kubernetes annotations converted to Prometheus labels.
# TYPE kube_endpoint_annotations gauge
# HELP kube_endpoint_address_available Number of addresses available in endpoint.
# HELP kube_endpoint_address_available (Deprecated since v2.6.0) Number of addresses available in endpoint.
# TYPE kube_endpoint_address_available gauge
# HELP kube_endpoint_address_not_ready Number of addresses not ready in endpoint
# HELP kube_endpoint_address_not_ready (Deprecated since v2.6.0) Number of addresses not ready in endpoint
# TYPE kube_endpoint_address_not_ready gauge
# HELP kube_endpoint_created Unix creation timestamp
# TYPE kube_endpoint_created gauge
Expand Down Expand Up @@ -160,9 +160,9 @@ func TestEndpointStoreWithLabels(t *testing.T) {
// Fixed metadata on type and help text. We prepend this to every expected
// output so we only have to modify a single place when doing adjustments.
const metadata = `
# HELP kube_endpoint_address_available Number of addresses available in endpoint.
# HELP kube_endpoint_address_available (Deprecated since v2.6.0) Number of addresses available in endpoint.
# TYPE kube_endpoint_address_available gauge
# HELP kube_endpoint_address_not_ready Number of addresses not ready in endpoint
# HELP kube_endpoint_address_not_ready (Deprecated since v2.6.0) Number of addresses not ready in endpoint
# TYPE kube_endpoint_address_not_ready gauge
# HELP kube_endpoint_annotations Kubernetes annotations converted to Prometheus labels.
# TYPE kube_endpoint_annotations gauge
Expand Down

0 comments on commit 69cc196

Please sign in to comment.