Skip to content

Commit fc6ab5b

Browse files
committed
addressing reviews & fixing CI errors
1 parent c309d3a commit fc6ab5b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ assignees: ''
99

1010
<!-- Please only use this template for submitting feature requests -->
1111

12-
**What would you like to be added**:
12+
**What would you like to be added:**
1313

14-
**Why is this needed**:
14+
**Why is this needed:**
1515

16-
**Describe the solution you'd like**:
16+
**Describe the solution you'd like:**
1717

18-
**Additional context**:
18+
**Additional context:**

README.md.tpl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ at the logs of kube-state-metrics.
144144

145145
Example of the above mentioned metrics:
146146

147-
```
147+
```prometheus
148148
kube_state_metrics_list_total{resource="*v1.Node",result="success"} 1
149149
kube_state_metrics_list_total{resource="*v1.Node",result="error"} 52
150150
kube_state_metrics_watch_total{resource="*v1beta1.Ingress",result="success"} 1
151151
```
152152

153153
kube-state-metrics also exposes some http request metrics, examples of those are:
154154

155-
```
155+
```prometheus
156156
http_request_duration_seconds_bucket{handler="metrics",method="get",le="2.5"} 30
157157
http_request_duration_seconds_bucket{handler="metrics",method="get",le="5"} 30
158158
http_request_duration_seconds_bucket{handler="metrics",method="get",le="10"} 30
@@ -163,7 +163,7 @@ http_request_duration_seconds_count{handler="metrics",method="get"} 30
163163

164164
kube-state-metrics also exposes build and configuration metrics:
165165

166-
```
166+
```prometheus
167167
kube_state_metrics_build_info{branch="main",goversion="go1.15.3",revision="6c9d775d",version="v2.0.0-beta"} 1
168168
kube_state_metrics_shard_ordinal{shard_ordinal="0"} 0
169169
kube_state_metrics_total_shards 1
@@ -176,7 +176,7 @@ run-time configuration, see [`/examples/prometheus-alerting-rules`](./examples/p
176176

177177
kube-state-metrics also exposes metrics about it config file and the Custom Resource State config file:
178178

179-
```
179+
```prometheus
180180
kube_state_metrics_config_hash{filename="crs.yml",type="customresourceconfig"} 2.38272279311849e+14
181181
kube_state_metrics_config_hash{filename="config.yml",type="config"} 2.65285922340846e+14
182182
kube_state_metrics_last_config_reload_success_timestamp_seconds{filename="crs.yml",type="customresourceconfig"} 1.6704882592037103e+09
@@ -203,7 +203,7 @@ Note that if CPU limits are set too low, kube-state-metrics' internal queues wil
203203

204204
In a 100 node cluster scaling test the latency numbers were as follows:
205205

206-
```
206+
```text
207207
"Perc50": 259615384 ns,
208208
"Perc90": 475000000 ns,
209209
"Perc99": 906666666 ns.
@@ -267,7 +267,7 @@ Each kube-state-metrics pod uses FieldSelector (spec.nodeName) to watch/list pod
267267

268268
A daemonset kube-state-metrics example:
269269

270-
```
270+
```yaml
271271
apiVersion: apps/v1
272272
kind: DaemonSet
273273
spec:
@@ -289,7 +289,7 @@ spec:
289289

290290
To track metrics for unassigned pods, you need to add an additional deployment and set `--track-unscheduled-pods`, as shown in the following example:
291291

292-
```
292+
```yaml
293293
apiVersion: apps/v1
294294
kind: Deployment
295295
spec:
@@ -309,16 +309,16 @@ Other metrics can be sharded via [Horizontal sharding](#horizontal-sharding).
309309

310310
Install this project to your `$GOPATH` using `go get`:
311311

312-
```
313-
go get k8s.io/kube-state-metrics
312+
```bash
313+
go get k8s.io/kube-state-metrics/v2
314314
```
315315

316316
#### Building the Docker container
317317

318318
Simply run the following command in this root folder, which will create a
319319
self-contained, statically-linked binary and build a Docker image:
320320

321-
```
321+
```bash
322322
make container
323323
```
324324

@@ -341,7 +341,7 @@ To have Prometheus discover kube-state-metrics instances it is advised to create
341341

342342
**Note:** Google Kubernetes Engine (GKE) Users - GKE has strict role permissions that will prevent the kube-state-metrics roles and role bindings from being created. To work around this, you can give your GCP identity the cluster-admin role by running the following one-liner:
343343

344-
```
344+
```bash
345345
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud info --format='value(config.account)')
346346
```
347347

@@ -416,14 +416,14 @@ When developing, test a metric dump against your local Kubernetes cluster by run
416416

417417
> Users can override the apiserver address in KUBE-CONFIG file with `--apiserver` command line.
418418

419-
```
419+
```bash
420420
go install
421421
kube-state-metrics --port=8080 --telemetry-port=8081 --kubeconfig=<KUBE-CONFIG> --apiserver=<APISERVER>
422422
```
423423

424424
Then curl the metrics endpoint
425425

426-
```
426+
```bash
427427
curl localhost:8080/metrics
428428
```
429429

0 commit comments

Comments
 (0)