Skip to content

Commit

Permalink
replace kube_crd with kube_customresource in docs
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Constanti <mario@constanti.de>
  • Loading branch information
bavarianbidi committed Jan 10, 2023
1 parent 7130bd0 commit b410166
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions docs/customresourcestate-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ spec:
Produces the metric:

```prometheus
kube_crd_uptime{group="myteam.io", kind="Foo", version="v1"} 43.21
kube_customresource_uptime{customresource_group="myteam.io", kind="Foo", version="v1"} 43.21
```

#### Multiple Metrics/Kitchen Sink
Expand Down Expand Up @@ -169,8 +169,8 @@ spec:
Produces the following metrics:

```prometheus
kube_crd_ready_count{group="myteam.io", kind="Foo", version="v1", active="1",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-a"} 2
kube_crd_ready_count{group="myteam.io", kind="Foo", version="v1", active="3",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-b"} 4
kube_customresource_ready_count{customresource_group="myteam.io", kind="Foo", version="v1", active="1",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-a"} 2
kube_customresource_ready_count{customresource_group="myteam.io", kind="Foo", version="v1", active="3",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-b"} 4
```

### Metric types
Expand Down Expand Up @@ -205,7 +205,7 @@ spec:
Produces the metric:

```prometheus
kube_crd_uptime{group="myteam.io", kind="Foo", version="v1"} 43.21
kube_customresource_uptime{customresource_group="myteam.io", kind="Foo", version="v1"} 43.21
```

#### StateSet
Expand Down Expand Up @@ -237,9 +237,9 @@ The value will be 1, if the value matches the one in list.
Produces the metric:

```prometheus
kube_crd_status_phase{group="myteam.io", kind="Foo", version="v1", phase="Pending"} 1
kube_crd_status_phase{group="myteam.io", kind="Foo", version="v1", phase="Bar"} 0
kube_crd_status_phase{group="myteam.io", kind="Foo", version="v1", phase="Baz"} 0
kube_customresource_status_phase{customresource_group="myteam.io", kind="Foo", version="v1", phase="Pending"} 1
kube_customresource_status_phase{customresource_group="myteam.io", kind="Foo", version="v1", phase="Bar"} 0
kube_customresource_status_phase{customresource_group="myteam.io", kind="Foo", version="v1", phase="Baz"} 0
```

#### Info
Expand Down Expand Up @@ -269,7 +269,7 @@ spec:
Produces the metric:

```prometheus
kube_crd_version{group="myteam.io", kind="Foo", version="v1", version="v1.2.3"} 1
kube_customresource_version{customresource_group="myteam.io", kind="Foo", version="v1", version="v1.2.3"} 1
```

### Naming
Expand All @@ -291,7 +291,7 @@ spec:

Produces:
```prometheus
myteam_foos_uptime{group="myteam.io", kind="Foo", version="v1"} 43.21
myteam_foos_uptime{customresource_group="myteam.io", kind="Foo", version="v1"} 43.21
```

To omit namespace and/or subsystem altogether, set them to the empty string:
Expand Down
6 changes: 3 additions & 3 deletions docs/verticalpodautoscaler-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ spec:
gauge:
path: [metadata, annotations]
# This will output the following metric:
# HELP kube_crd_autoscaling_k8s_io_v1_VerticalPodAutoscaler_annotations Kubernetes annotations converted to Prometheus labels.
# TYPE kube_crd_autoscaling_k8s_io_v1_VerticalPodAutoscaler_annotations gauge
# kube_crd_autoscaling_k8s_io_v1_VerticalPodAutoscaler_annotations{namespace="default",target_api_version="autoscaling.k8s.io/v1",target_kind="Deployment",target_name="hamster",verticalpodautoscaler="hamster-vpa"} 123
# HELP kube_customresource_autoscaling_k8s_io_v1_VerticalPodAutoscaler_annotations Kubernetes annotations converted to Prometheus labels.
# TYPE kube_customresource_autoscaling_k8s_io_v1_VerticalPodAutoscaler_annotations gauge
# kube_customresource_autoscaling_k8s_io_v1_VerticalPodAutoscaler_annotations{namespace="default",target_api_version="autoscaling.k8s.io/v1",target_kind="Deployment",target_name="hamster",verticalpodautoscaler="hamster-vpa"} 123
```
PS. The above configuration was tested on [this](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/examples/hamster.yaml) VPA configuration, with an added annotation (`foo: 123`).
***
Expand Down

0 comments on commit b410166

Please sign in to comment.