Skip to content

Commit 072f70d

Browse files
authored
feat: pool enabled status as dedicated metric (#126)
also introduce pool_min_idle_runners, pool_max_runners, status_long_running_idle_runners and add namespace as label per metric Signed-off-by: Mario Constanti <[email protected]>
1 parent 700efd7 commit 072f70d

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

config/kube-state-metrics/configmap.yaml

+42-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data:
2323
crd_type: "enterprise"
2424
labelsFromPath:
2525
name: [ metadata, name ]
26-
namespace: [ metadata, namespace ]
26+
namespace: [ metadata, namespace ]
2727
metrics:
2828
- name: enterprise_created
2929
help: Unix creation timestamp.
@@ -83,7 +83,7 @@ data:
8383
crd_type: "organization"
8484
labelsFromPath:
8585
name: [ metadata, name ]
86-
namespace: [ metadata, namespace ]
86+
namespace: [ metadata, namespace ]
8787
metrics:
8888
- name: org_created
8989
help: Unix creation timestamp.
@@ -143,7 +143,7 @@ data:
143143
crd_type: "repository"
144144
labelsFromPath:
145145
name: [ metadata, name ]
146-
namespace: [ metadata, namespace ]
146+
namespace: [ metadata, namespace ]
147147
metrics:
148148
- name: repo_created
149149
help: Unix creation timestamp.
@@ -204,7 +204,7 @@ data:
204204
crd_type: "pool"
205205
labelsFromPath:
206206
name: [ metadata, name ]
207-
namespace: [ metadata, namespace ]
207+
namespace: [ metadata, namespace ]
208208
metrics:
209209
- name: pool_created
210210
help: Unix creation timestamp.
@@ -221,21 +221,54 @@ data:
221221
type: Info
222222
info:
223223
labelsFromPath:
224-
enabled: [spec, enabled]
225224
githubRunnerGroup: [spec, githubRunnerGroup]
226225
scopeKind: [spec, githubScopeRef, kind]
227226
scopeName: [spec, githubScopeRef, name]
228227
imageName: [spec, imageName]
229-
maxRunners: [spec, maxRunners]
230-
minIdleRunners: [spec, minIdleRunners]
231228
osArch: [spec, osArch]
232229
osType: [spec, osType]
233230
providerName: [spec, providerName]
234231
runnerBootstrapTimeout: [spec, runnerBootstrapTimeout]
235232
runnerPrefix: [spec, runnerPrefix]
236233
tags: [spec, tags]
237234
id: [status, id]
238-
longRunningIdleRunners: [status, longRunningIdleRunners]
235+
236+
- name: pool_enabled
237+
help: Whether the pool is enabled.
238+
each:
239+
type: Gauge
240+
gauge:
241+
nilIsZero: true
242+
path:
243+
- spec
244+
- enabled
245+
246+
- name: pool_min_idle_runners
247+
help: Minimum number of idle runners.
248+
each:
249+
type: Gauge
250+
gauge:
251+
path:
252+
- spec
253+
- minIdleRunners
254+
255+
- name: pool_max_runners
256+
help: Maximum number of runners.
257+
each:
258+
type: Gauge
259+
gauge:
260+
path:
261+
- spec
262+
- maxRunners
263+
264+
- name: status_long_running_idle_runners
265+
help: Number of long running idle runners.
266+
each:
267+
type: Gauge
268+
gauge:
269+
path:
270+
- status
271+
- longRunningIdleRunners
239272
240273
- name: pool_annotation_paused_info
241274
help: Whether the pool reconciliation is paused.
@@ -275,7 +308,7 @@ data:
275308
crd_type: "image"
276309
labelsFromPath:
277310
name: [ metadata, name ]
278-
namespace: [ metadata, namespace ]
311+
namespace: [ metadata, namespace ]
279312
metrics:
280313
- name: image_created
281314
help: Unix creation timestamp.

0 commit comments

Comments
 (0)