Skip to content

Commit 13b3445

Browse files
authored
Merge pull request #11101 from tobiasgiese/metrics-niliszero-stateset
🌱 Add nilIsZero to all KSM metric configs where needed
2 parents 12b75cd + 82adc39 commit 13b3445

File tree

7 files changed

+34
-0
lines changed

7 files changed

+34
-0
lines changed

config/metrics/crd-metrics-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ spec:
6464
- conditions
6565
valueFrom:
6666
- status
67+
nilIsZero: true
6768
type: StateSet
6869
- name: status_condition_last_transition_time
6970
help: The condition last transition time of a clusterclass.
@@ -79,6 +80,7 @@ spec:
7980
- conditions
8081
valueFrom:
8182
- lastTransitionTime
83+
nilIsZero: true
8284
type: Gauge
8385
- name: owner
8486
help: Owner references.
@@ -175,6 +177,7 @@ spec:
175177
path:
176178
- status
177179
- phase
180+
nilIsZero: true
178181
type: StateSet
179182
- name: created
180183
help: Unix creation timestamp.
@@ -212,6 +215,7 @@ spec:
212215
- conditions
213216
valueFrom:
214217
- status
218+
nilIsZero: true
215219
type: StateSet
216220
- name: status_condition_last_transition_time
217221
help: The condition last transition time of a cluster.
@@ -227,6 +231,7 @@ spec:
227231
- conditions
228232
valueFrom:
229233
- lastTransitionTime
234+
nilIsZero: true
230235
type: Gauge
231236
- groupVersionKind:
232237
group: controlplane.cluster.x-k8s.io
@@ -348,6 +353,7 @@ spec:
348353
- conditions
349354
valueFrom:
350355
- status
356+
nilIsZero: true
351357
type: StateSet
352358
- name: status_condition_last_transition_time
353359
help: The condition last transition time of a kubeadmcontrolplane.
@@ -363,6 +369,7 @@ spec:
363369
- conditions
364370
valueFrom:
365371
- lastTransitionTime
372+
nilIsZero: true
366373
type: Gauge
367374
- name: owner
368375
help: Owner references.
@@ -447,6 +454,7 @@ spec:
447454
- conditions
448455
valueFrom:
449456
- status
457+
nilIsZero: true
450458
type: StateSet
451459
- name: status_condition_last_transition_time
452460
help: The condition last transition time of a kubeadmconfig.
@@ -462,6 +470,7 @@ spec:
462470
- conditions
463471
valueFrom:
464472
- lastTransitionTime
473+
nilIsZero: true
465474
type: Gauge
466475
- name: owner
467476
help: Owner references.
@@ -609,6 +618,7 @@ spec:
609618
path:
610619
- status
611620
- phase
621+
nilIsZero: true
612622
type: StateSet
613623
- name: created
614624
help: Unix creation timestamp.
@@ -646,6 +656,7 @@ spec:
646656
- conditions
647657
valueFrom:
648658
- status
659+
nilIsZero: true
649660
type: StateSet
650661
- name: status_condition_last_transition_time
651662
help: The condition last transition time of a machine.
@@ -661,6 +672,7 @@ spec:
661672
- conditions
662673
valueFrom:
663674
- lastTransitionTime
675+
nilIsZero: true
664676
type: Gauge
665677
- name: owner
666678
help: Owner references.
@@ -868,6 +880,7 @@ spec:
868880
- conditions
869881
valueFrom:
870882
- status
883+
nilIsZero: true
871884
type: StateSet
872885
- name: status_condition_last_transition_time
873886
help: The condition last transition time of a machinedeployment.
@@ -883,6 +896,7 @@ spec:
883896
- conditions
884897
valueFrom:
885898
- lastTransitionTime
899+
nilIsZero: true
886900
type: Gauge
887901
- name: owner
888902
help: Owner references.
@@ -937,6 +951,7 @@ spec:
937951
path:
938952
- status
939953
- currentHealthy
954+
nilIsZero: true
940955
type: Gauge
941956
- name: status_expected_machines
942957
help: Total number of pods counted by this machinehealthcheck.
@@ -945,6 +960,7 @@ spec:
945960
path:
946961
- status
947962
- expectedMachines
963+
nilIsZero: true
948964
type: Gauge
949965
- name: status_remediations_allowed
950966
help: Number of machine remediations that are currently allowed.
@@ -953,6 +969,7 @@ spec:
953969
path:
954970
- status
955971
- remediationsAllowed
972+
nilIsZero: true
956973
type: Gauge
957974
- name: created
958975
help: Unix creation timestamp.
@@ -990,6 +1007,7 @@ spec:
9901007
- conditions
9911008
valueFrom:
9921009
- status
1010+
nilIsZero: true
9931011
type: StateSet
9941012
- name: status_condition_last_transition_time
9951013
help: The condition last transition time of a machinehealthcheck.
@@ -1005,6 +1023,7 @@ spec:
10051023
- conditions
10061024
valueFrom:
10071025
- lastTransitionTime
1026+
nilIsZero: true
10081027
type: Gauge
10091028
- name: owner
10101029
help: Owner references.
@@ -1104,6 +1123,7 @@ spec:
11041123
path:
11051124
- status
11061125
- fullyLabeledReplicas
1126+
nilIsZero: true
11071127
type: Gauge
11081128
- name: status_replicas_ready
11091129
help: The number of ready replicas per machineset.
@@ -1159,6 +1179,7 @@ spec:
11591179
- conditions
11601180
valueFrom:
11611181
- status
1182+
nilIsZero: true
11621183
type: StateSet
11631184
- name: status_condition_last_transition_time
11641185
help: The condition last transition time of a machineset.
@@ -1174,6 +1195,7 @@ spec:
11741195
- conditions
11751196
valueFrom:
11761197
- lastTransitionTime
1198+
nilIsZero: true
11771199
type: Gauge
11781200
- name: owner
11791201
help: Owner references.
@@ -1310,6 +1332,7 @@ spec:
13101332
path:
13111333
- status
13121334
- phase
1335+
nilIsZero: true
13131336
type: StateSet
13141337
- name: created
13151338
help: Unix creation timestamp.
@@ -1347,6 +1370,7 @@ spec:
13471370
- conditions
13481371
valueFrom:
13491372
- status
1373+
nilIsZero: true
13501374
type: StateSet
13511375
- name: status_condition_last_transition_time
13521376
help: The condition last transition time of a machinepool.
@@ -1362,6 +1386,7 @@ spec:
13621386
- conditions
13631387
valueFrom:
13641388
- lastTransitionTime
1389+
nilIsZero: true
13651390
type: Gauge
13661391
- name: owner
13671392
help: Owner references.

config/metrics/templates/cluster.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@
7676
path:
7777
- status
7878
- phase
79+
nilIsZero: true
7980
type: StateSet

config/metrics/templates/common_metrics.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- conditions
3535
valueFrom:
3636
- status
37+
nilIsZero: true
3738
type: StateSet
3839
- name: status_condition_last_transition_time
3940
help: The condition last transition time of a ${RESOURCE}.
@@ -49,4 +50,5 @@
4950
- conditions
5051
valueFrom:
5152
- lastTransitionTime
53+
nilIsZero: true
5254
type: Gauge

config/metrics/templates/machine.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,5 @@
127127
path:
128128
- status
129129
- phase
130+
nilIsZero: true
130131
type: StateSet

config/metrics/templates/machinehealthcheck.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
path:
3535
- status
3636
- currentHealthy
37+
nilIsZero: true
3738
type: Gauge
3839
- name: status_expected_machines
3940
help: Total number of pods counted by this machinehealthcheck.
@@ -42,6 +43,7 @@
4243
path:
4344
- status
4445
- expectedMachines
46+
nilIsZero: true
4547
type: Gauge
4648
- name: status_remediations_allowed
4749
help: Number of machine remediations that are currently allowed.
@@ -50,4 +52,5 @@
5052
path:
5153
- status
5254
- remediationsAllowed
55+
nilIsZero: true
5356
type: Gauge

config/metrics/templates/machinepool.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,5 @@
116116
path:
117117
- status
118118
- phase
119+
nilIsZero: true
119120
type: StateSet

config/metrics/templates/machineset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
path:
8080
- status
8181
- fullyLabeledReplicas
82+
nilIsZero: true
8283
type: Gauge
8384
- name: status_replicas_ready
8485
help: The number of ready replicas per machineset.

0 commit comments

Comments
 (0)