From 82adc3980eea57394503c69ef73c4ec8c3125fbc Mon Sep 17 00:00:00 2001 From: Tobias Giese Date: Tue, 27 Aug 2024 11:24:12 +0200 Subject: [PATCH] Add nilIsZero to all KSM metric configs where needed Signed-off-by: Tobias Giese --- config/metrics/crd-metrics-config.yaml | 25 +++++++++++++++++++ config/metrics/templates/cluster.yaml | 1 + config/metrics/templates/common_metrics.yaml | 2 ++ config/metrics/templates/machine.yaml | 1 + .../metrics/templates/machinehealthcheck.yaml | 3 +++ config/metrics/templates/machinepool.yaml | 1 + config/metrics/templates/machineset.yaml | 1 + 7 files changed, 34 insertions(+) diff --git a/config/metrics/crd-metrics-config.yaml b/config/metrics/crd-metrics-config.yaml index 718af5a9bd9f..907df17aa0d2 100644 --- a/config/metrics/crd-metrics-config.yaml +++ b/config/metrics/crd-metrics-config.yaml @@ -64,6 +64,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a clusterclass. @@ -79,6 +80,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -175,6 +177,7 @@ spec: path: - status - phase + nilIsZero: true type: StateSet - name: created help: Unix creation timestamp. @@ -212,6 +215,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a cluster. @@ -227,6 +231,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - groupVersionKind: group: controlplane.cluster.x-k8s.io @@ -348,6 +353,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a kubeadmcontrolplane. @@ -363,6 +369,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -447,6 +454,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a kubeadmconfig. @@ -462,6 +470,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -609,6 +618,7 @@ spec: path: - status - phase + nilIsZero: true type: StateSet - name: created help: Unix creation timestamp. @@ -646,6 +656,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machine. @@ -661,6 +672,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -868,6 +880,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machinedeployment. @@ -883,6 +896,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -937,6 +951,7 @@ spec: path: - status - currentHealthy + nilIsZero: true type: Gauge - name: status_expected_machines help: Total number of pods counted by this machinehealthcheck. @@ -945,6 +960,7 @@ spec: path: - status - expectedMachines + nilIsZero: true type: Gauge - name: status_remediations_allowed help: Number of machine remediations that are currently allowed. @@ -953,6 +969,7 @@ spec: path: - status - remediationsAllowed + nilIsZero: true type: Gauge - name: created help: Unix creation timestamp. @@ -990,6 +1007,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machinehealthcheck. @@ -1005,6 +1023,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -1104,6 +1123,7 @@ spec: path: - status - fullyLabeledReplicas + nilIsZero: true type: Gauge - name: status_replicas_ready help: The number of ready replicas per machineset. @@ -1159,6 +1179,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machineset. @@ -1174,6 +1195,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -1310,6 +1332,7 @@ spec: path: - status - phase + nilIsZero: true type: StateSet - name: created help: Unix creation timestamp. @@ -1347,6 +1370,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machinepool. @@ -1362,6 +1386,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. diff --git a/config/metrics/templates/cluster.yaml b/config/metrics/templates/cluster.yaml index f1e91daa6b57..137ac88178ef 100644 --- a/config/metrics/templates/cluster.yaml +++ b/config/metrics/templates/cluster.yaml @@ -76,4 +76,5 @@ path: - status - phase + nilIsZero: true type: StateSet diff --git a/config/metrics/templates/common_metrics.yaml b/config/metrics/templates/common_metrics.yaml index 073631b9c88b..feb17f969d09 100644 --- a/config/metrics/templates/common_metrics.yaml +++ b/config/metrics/templates/common_metrics.yaml @@ -34,6 +34,7 @@ - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a ${RESOURCE}. @@ -49,4 +50,5 @@ - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge diff --git a/config/metrics/templates/machine.yaml b/config/metrics/templates/machine.yaml index b49b1d3b7c7e..fe8d012d4880 100644 --- a/config/metrics/templates/machine.yaml +++ b/config/metrics/templates/machine.yaml @@ -127,4 +127,5 @@ path: - status - phase + nilIsZero: true type: StateSet diff --git a/config/metrics/templates/machinehealthcheck.yaml b/config/metrics/templates/machinehealthcheck.yaml index a14a164be72b..22c7d4e49a98 100644 --- a/config/metrics/templates/machinehealthcheck.yaml +++ b/config/metrics/templates/machinehealthcheck.yaml @@ -34,6 +34,7 @@ path: - status - currentHealthy + nilIsZero: true type: Gauge - name: status_expected_machines help: Total number of pods counted by this machinehealthcheck. @@ -42,6 +43,7 @@ path: - status - expectedMachines + nilIsZero: true type: Gauge - name: status_remediations_allowed help: Number of machine remediations that are currently allowed. @@ -50,4 +52,5 @@ path: - status - remediationsAllowed + nilIsZero: true type: Gauge diff --git a/config/metrics/templates/machinepool.yaml b/config/metrics/templates/machinepool.yaml index a4dbb4aa7254..83c56fe6a8d5 100644 --- a/config/metrics/templates/machinepool.yaml +++ b/config/metrics/templates/machinepool.yaml @@ -116,4 +116,5 @@ path: - status - phase + nilIsZero: true type: StateSet diff --git a/config/metrics/templates/machineset.yaml b/config/metrics/templates/machineset.yaml index e2bde1ecde6e..fc3b19b5b421 100644 --- a/config/metrics/templates/machineset.yaml +++ b/config/metrics/templates/machineset.yaml @@ -79,6 +79,7 @@ path: - status - fullyLabeledReplicas + nilIsZero: true type: Gauge - name: status_replicas_ready help: The number of ready replicas per machineset.