chore: Remove deprecated endpoint address metric
This was deprecated in 2022 in https://github.com/kubernetes/kube-state-metrics/pull/1761
This commit is contained in:
parent
e29519112d
commit
28129e4d6d
|
|
@ -3,8 +3,6 @@
|
|||
| Metric name | Metric type | Description | Labels/tags | Status |
|
||||
| ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
||||
| kube_endpoint_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `endpoint`=<endpoint-name> <br> `namespace`=<endpoint-namespace> <br> `annotation_ENDPOINT_ANNOTATION`=<ENDPOINT_ANNOTATION> | EXPERIMENTAL |
|
||||
| kube_endpoint_address_not_ready | Gauge | | `endpoint`=<endpoint-name> <br> `namespace`=<endpoint-namespace> | DEPRECATED |
|
||||
| kube_endpoint_address_available | Gauge | | `endpoint`=<endpoint-name> <br> `namespace`=<endpoint-namespace> | DEPRECATED |
|
||||
| kube_endpoint_info | Gauge | | `endpoint`=<endpoint-name> <br> `namespace`=<endpoint-namespace> | STABLE |
|
||||
| kube_endpoint_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `endpoint`=<endpoint-name> <br> `namespace`=<endpoint-namespace> <br> `label_ENDPOINT_LABEL`=<ENDPOINT_LABEL> | STABLE |
|
||||
| kube_endpoint_created | Gauge | | `endpoint`=<endpoint-name> <br> `namespace`=<endpoint-namespace> | STABLE |
|
||||
|
|
|
|||
|
|
@ -123,47 +123,6 @@ func endpointMetricFamilies(allowAnnotationsList, allowLabelsList []string) []ge
|
|||
}
|
||||
}),
|
||||
),
|
||||
*generator.NewFamilyGeneratorWithStability(
|
||||
"kube_endpoint_address_available",
|
||||
"Number of addresses available in endpoint.",
|
||||
metric.Gauge,
|
||||
basemetrics.ALPHA,
|
||||
"v2.6.0",
|
||||
wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family {
|
||||
var available int
|
||||
for _, s := range e.Subsets {
|
||||
available += len(s.Addresses) * len(s.Ports)
|
||||
}
|
||||
|
||||
return &metric.Family{
|
||||
Metrics: []*metric.Metric{
|
||||
{
|
||||
Value: float64(available),
|
||||
},
|
||||
},
|
||||
}
|
||||
}),
|
||||
),
|
||||
*generator.NewFamilyGeneratorWithStability(
|
||||
"kube_endpoint_address_not_ready",
|
||||
"Number of addresses not ready in endpoint",
|
||||
metric.Gauge,
|
||||
basemetrics.ALPHA,
|
||||
"v2.6.0",
|
||||
wrapEndpointFunc(func(e *v1.Endpoints) *metric.Family {
|
||||
var notReady int
|
||||
for _, s := range e.Subsets {
|
||||
notReady += len(s.NotReadyAddresses) * len(s.Ports)
|
||||
}
|
||||
return &metric.Family{
|
||||
Metrics: []*metric.Metric{
|
||||
{
|
||||
Value: float64(notReady),
|
||||
},
|
||||
},
|
||||
}
|
||||
}),
|
||||
),
|
||||
*generator.NewFamilyGeneratorWithStability(
|
||||
"kube_endpoint_address",
|
||||
"Information about Endpoint available and non available addresses.",
|
||||
|
|
|
|||
|
|
@ -32,10 +32,6 @@ 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 (Deprecated since v2.6.0) Number of addresses available in endpoint.
|
||||
# TYPE kube_endpoint_address_available gauge
|
||||
# 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 [STABLE] Unix creation timestamp
|
||||
# TYPE kube_endpoint_created gauge
|
||||
# HELP kube_endpoint_info [STABLE] Information about endpoint.
|
||||
|
|
@ -89,8 +85,6 @@ func TestEndpointStore(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Want: metadata + `
|
||||
kube_endpoint_address_available{endpoint="test-endpoint",namespace="default"} 6
|
||||
kube_endpoint_address_not_ready{endpoint="test-endpoint",namespace="default"} 6
|
||||
kube_endpoint_created{endpoint="test-endpoint",namespace="default"} 1.5e+09
|
||||
kube_endpoint_info{endpoint="test-endpoint",namespace="default"} 1
|
||||
kube_endpoint_ports{endpoint="test-endpoint",namespace="default",port_name="http",port_protocol="TCP",port_number="8080"} 1
|
||||
|
|
@ -132,8 +126,6 @@ func TestEndpointStore(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Want: metadata + `
|
||||
kube_endpoint_address_available{endpoint="single-port-endpoint",namespace="default"} 2
|
||||
kube_endpoint_address_not_ready{endpoint="single-port-endpoint",namespace="default"} 1
|
||||
kube_endpoint_created{endpoint="single-port-endpoint",namespace="default"} 1.5e+09
|
||||
kube_endpoint_info{endpoint="single-port-endpoint",namespace="default"} 1
|
||||
kube_endpoint_ports{endpoint="single-port-endpoint",namespace="default",port_name="",port_number="8080",port_protocol="TCP"} 1
|
||||
|
|
@ -156,10 +148,6 @@ 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 (Deprecated since v2.6.0) Number of addresses available in endpoint.
|
||||
# TYPE kube_endpoint_address_available gauge
|
||||
# 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
|
||||
# HELP kube_endpoint_created [STABLE] Unix creation timestamp
|
||||
|
|
@ -218,8 +206,6 @@ func TestEndpointStoreWithLabels(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Want: metadata + `
|
||||
kube_endpoint_address_available{endpoint="test-endpoint",namespace="default"} 6
|
||||
kube_endpoint_address_not_ready{endpoint="test-endpoint",namespace="default"} 6
|
||||
kube_endpoint_annotations{endpoint="test-endpoint",annotation_app="foobar",namespace="default"} 1
|
||||
kube_endpoint_created{endpoint="test-endpoint",namespace="default"} 1.5e+09
|
||||
kube_endpoint_info{endpoint="test-endpoint",namespace="default"} 1
|
||||
|
|
@ -267,8 +253,6 @@ func TestEndpointStoreWithLabels(t *testing.T) {
|
|||
},
|
||||
Want: metadata + `
|
||||
kube_endpoint_annotations{endpoint="single-port-endpoint",annotation_app="single-foobar",namespace="default"} 1
|
||||
kube_endpoint_address_available{endpoint="single-port-endpoint",namespace="default"} 2
|
||||
kube_endpoint_address_not_ready{endpoint="single-port-endpoint",namespace="default"} 1
|
||||
kube_endpoint_created{endpoint="single-port-endpoint",namespace="default"} 1.5e+09
|
||||
kube_endpoint_info{endpoint="single-port-endpoint",namespace="default"} 1
|
||||
kube_endpoint_labels{endpoint="single-port-endpoint",label_app="single-foobar",namespace="default"} 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue