From dc9bec5cd73d7f7973e4167b400c9d46c4225169 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Fri, 30 Aug 2024 10:53:19 +0200 Subject: [PATCH 01/14] api: add markers for metrics to api types --- api/v1beta1/cluster_types.go | 11 ++++++++++ api/v1beta1/clusterclass_types.go | 10 +++++++++ api/v1beta1/machine_types.go | 15 +++++++++++++ api/v1beta1/machinedeployment_types.go | 21 +++++++++++++++++++ api/v1beta1/machinehealthcheck_types.go | 14 +++++++++++++ api/v1beta1/machineset_types.go | 16 ++++++++++++++ .../api/v1beta1/kubeadmconfig_types.go | 11 ++++++++++ .../v1beta1/kubeadm_control_plane_types.go | 17 +++++++++++++++ exp/api/v1beta1/machinepool_types.go | 17 +++++++++++++++ 9 files changed, 132 insertions(+) diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index 14e740ed2c89..997caa3b1b94 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -464,6 +464,7 @@ const ( type ClusterSpec struct { // paused can be used to prevent controllers from processing the Cluster and all its associated objects. // +optional + // +Metrics:gauge:name="spec_paused",help="Whether the cluster is paused and any of its resources will not be processed by the controllers.",nilIsZero=true Paused bool `json:"paused,omitempty"` // clusterNetwork represents the cluster network configuration. @@ -982,6 +983,7 @@ type ClusterStatus struct { // phase represents the current phase of cluster actuation. // +optional // +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Deleting;Failed;Unknown + // +Metrics:stateset:name="status_phase",help="The clusters current phase.",labelName="phase",list={"Pending","Provisioning","Provisioned","Deleting","Failed","Unknown"} Phase string `json:"phase,omitempty"` // infrastructureReady is the state of the infrastructure provider. @@ -998,6 +1000,8 @@ type ClusterStatus struct { // conditions defines current service state of the cluster. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a cluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a cluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // observedGeneration is the latest generation observed by the controller. @@ -1144,11 +1148,18 @@ func (v APIEndpoint) String() string { // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.topology.version",description="Kubernetes version associated with this Cluster" // Cluster is the Schema for the clusters API. +// +Metrics:gvk:namePrefix="capi_cluster" +// +Metrics:labelFromPath:name="name",JSONPath=.metadata.name +// +Metrics:labelFromPath:name="namespace",JSONPath=.metadata.namespace +// +Metrics:labelFromPath:name="uid",JSONPath=.metadata.uid +// +Metrics:info:name="info",help="Information about a cluster.",labelsFromPath={topology_version:".spec.topology.version",topology_class:".spec.topology.class",control_plane_endpoint_host:".spec.controlPlaneEndpoint.host",control_plane_endpoint_port:".spec.controlPlaneEndpoint.port",control_plane_reference_kind:".spec.controlPlaneRef.kind",control_plane_reference_name:".spec.controlPlaneRef.name",infrastructure_reference_kind:".spec.infrastructureRef.kind",infrastructure_reference_name:".spec.infrastructureRef.name"} type Cluster struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the cluster is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of Cluster. diff --git a/api/v1beta1/clusterclass_types.go b/api/v1beta1/clusterclass_types.go index 4d62dbf7246b..4e9420ff356c 100644 --- a/api/v1beta1/clusterclass_types.go +++ b/api/v1beta1/clusterclass_types.go @@ -71,11 +71,19 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterClass" // ClusterClass is a template which can be used to create managed topologies. +// +Metrics:gvk:namePrefix="capi_clusterclass" +// +Metrics:labelFromPath:name="name",JSONPath=.metadata.name +// +Metrics:labelFromPath:name="namespace",JSONPath=.metadata.namespace +// +Metrics:labelFromPath:name="uid",JSONPath=.metadata.uid +// +Metrics:info:name="info",help="Information about a clusterclass.",labelsFromPath={name:.metadata.name} type ClusterClass struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the clusterclass is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of ClusterClass. @@ -1147,6 +1155,8 @@ type ClusterClassStatus struct { // conditions defines current observed state of the ClusterClass. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a clusterclass.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a clusterclass.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // observedGeneration is the latest generation observed by the controller. diff --git a/api/v1beta1/machine_types.go b/api/v1beta1/machine_types.go index 504bc807d851..b3e63b19d6cc 100644 --- a/api/v1beta1/machine_types.go +++ b/api/v1beta1/machine_types.go @@ -499,6 +499,7 @@ type MachineReadinessGate struct { type MachineStatus struct { // nodeRef will point to the corresponding Node if it exists. // +optional + // +Metrics:info:name="status_noderef",help="Information about the node reference of a machine.",labelsFromPath={node_name:".name",node_uid:".uid"} NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` // nodeInfo is a set of ids/uuids to uniquely identify the node. @@ -559,16 +560,19 @@ type MachineStatus struct { // addresses is a list of addresses assigned to the machine. // This field is copied from the infrastructure provider reference. // +optional + // +Metrics:info:name="addresses",help="Address information about a machine.",labelsFromPath={address:".address",type:".type"} Addresses MachineAddresses `json:"addresses,omitempty"` // phase represents the current phase of machine actuation. // +optional // +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Running;Deleting;Deleted;Failed;Unknown + // +Metrics:stateset:name="status_phase",help="The machines current phase.",labelName="phase",list={"Pending","Provisioning","Provisioned","Running","Deleting","Deleted","Failed","Unknown"} Phase string `json:"phase,omitempty"` // certificatesExpiryDate is the expiry date of the machine certificates. // This value is only set for control plane machines. // +optional + // +Metrics:gauge:name="status_certificatesexpirydate",help="Information about certificate expiration date of a control plane node.",nilIsZero=true CertificatesExpiryDate *metav1.Time `json:"certificatesExpiryDate,omitempty"` // bootstrapReady is the state of the bootstrap provider. @@ -585,6 +589,8 @@ type MachineStatus struct { // conditions defines current service state of the Machine. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a machine.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // deletion contains information relating to removal of the Machine. @@ -688,11 +694,20 @@ type Bootstrap struct { // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="Kubernetes version associated with this Machine" // Machine is the Schema for the machines API. +// +Metrics:gvk:namePrefix="capi_machine" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=".spec.clusterName" +// +Metrics:info:name="info",help="Information about a machine.",labelsFromPath={bootstrap_reference_kind:.spec.bootstrap.configRef.kind,bootstrap_reference_name:.spec.bootstrap.configRef.name,container_runtime_version:.status.nodeInfo.containerRuntimeVersion,control_plane_name:.metadata.labels.cluster\.x-k8s\.io/control-plane-name,failure_domain:.spec.failureDomain,infrastructure_reference_kind:.spec.infrastructureRef.kind,infrastructure_reference_name:.spec.infrastructureRef.name,kernel_version:.status.nodeInfo.kernelVersion,kube_proxy_version:.status.nodeInfo.kubeProxyVersion,kubelet_version:.status.nodeInfo.kubeletVersion,os_image:.status.nodeInfo.osImage,provider_id:.spec.providerID,version:.spec.version} type Machine struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the machine is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of Machine. diff --git a/api/v1beta1/machinedeployment_types.go b/api/v1beta1/machinedeployment_types.go index 80307605d5ac..9ec6f0295554 100644 --- a/api/v1beta1/machinedeployment_types.go +++ b/api/v1beta1/machinedeployment_types.go @@ -264,6 +264,7 @@ type MachineDeploymentSpec struct { // * An existing MachineDeployment which initially wasn't controlled by the autoscaler // should be later controlled by the autoscaler // +optional + // +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a machinedeployment." Replicas *int32 `json:"replicas,omitempty"` // rolloutAfter is a field to indicate a rollout should be performed @@ -311,6 +312,7 @@ type MachineDeploymentSpec struct { // paused indicates that the deployment is paused. // +optional + // +Metrics:gauge:name="spec_paused",help="Whether the machinedeployment is paused and any of its resources will not be processed by the controllers.",nilIsZero=true Paused bool `json:"paused,omitempty"` // progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it @@ -368,6 +370,7 @@ type MachineRollingUpdateDeployment struct { // that the total number of machines available at all times // during the update is at least 70% of desired machines. // +optional + // +Metrics:gauge:name="spec_strategy_rollingupdate_max_unavailable",help="Maximum number of unavailable replicas during a rolling update of a machinedeployment." MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` // maxSurge is the maximum number of machines that can be scheduled above the @@ -384,6 +387,7 @@ type MachineRollingUpdateDeployment struct { // be scaled up further, ensuring that total number of machines running // at any time during the update is at most 130% of desired machines. // +optional + // +Metrics:gauge:name="spec_strategy_rollingupdate_max_surge",help="Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a machinedeployment." MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` // deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. @@ -466,20 +470,24 @@ type MachineDeploymentStatus struct { // replicas is the total number of non-terminated machines targeted by this deployment // (their labels match the selector). // +optional + // +Metrics:gauge:name="status_replicas",help="The number of replicas per machinedeployment.",nilIsZero=true Replicas int32 `json:"replicas"` // updatedReplicas is the total number of non-terminated machines targeted by this deployment // that have the desired template spec. // +optional + // +Metrics:gauge:name="status_replicas_updated",help="The number of updated replicas per machinedeployment.",nilIsZero=true UpdatedReplicas int32 `json:"updatedReplicas"` // readyReplicas is the total number of ready machines targeted by this deployment. // +optional + // +Metrics:gauge:name="status_replicas_ready",help="The number of ready replicas per machinedeployment.",nilIsZero=true ReadyReplicas int32 `json:"readyReplicas"` // availableReplicas is the total number of available machines (ready for at least minReadySeconds) // targeted by this deployment. // +optional + // +Metrics:gauge:name="status_replicas_available",help="The number of available replicas per machinedeployment.",nilIsZero=true AvailableReplicas int32 `json:"availableReplicas"` // unavailableReplicas is the total number of unavailable machines targeted by this deployment. @@ -491,15 +499,19 @@ type MachineDeploymentStatus struct { // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. // // +optional + // +Metrics:gauge:name="status_replicas_unavailable",help="The number of unavailable replicas per machinedeployment.",nilIsZero=true UnavailableReplicas int32 `json:"unavailableReplicas"` // phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). // +optional // +kubebuilder:validation:Enum=ScalingUp;ScalingDown;Running;Failed;Unknown + // +Metrics:stateset:name="status_phase",help="The machinedeployments current phase.",labelName="phase",list={"ScalingUp","ScalingDown","Running","Failed","Unknown"} Phase string `json:"phase,omitempty"` // conditions defines current service state of the MachineDeployment. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a machinedeployment.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinedeployment.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachineDeployment's status with the V1Beta2 version. @@ -589,11 +601,20 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase { // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.template.spec.version",description="Kubernetes version associated with this MachineDeployment" // MachineDeployment is the Schema for the machinedeployments API. +// +Metrics:gvk:namePrefix="capi_machinedeployment" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=".spec.clusterName" +// +Metrics:info:name="info",help="Information about a machinedeployment.",labelsFromPath={bootstrap_reference_kind:.spec.template.spec.bootstrap.configRef.kind,bootstrap_reference_name:.spec.template.spec.bootstrap.configRef.name,infrastructure_reference_kind:.spec.template.spec.infrastructureRef.kind,infrastructure_reference_name:.spec.template.spec.infrastructureRef.name,version:.spec.template.spec.version} type MachineDeployment struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the machinedeployment is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of MachineDeployment. diff --git a/api/v1beta1/machinehealthcheck_types.go b/api/v1beta1/machinehealthcheck_types.go index 0646bad1169c..58fd71ceb97d 100644 --- a/api/v1beta1/machinehealthcheck_types.go +++ b/api/v1beta1/machinehealthcheck_types.go @@ -155,17 +155,20 @@ type MachineHealthCheckStatus struct { // expectedMachines is the total number of machines counted by this machine health check // +kubebuilder:validation:Minimum=0 // +optional + // +Metrics:gauge:name="status_expected_machines",help="Total number of machines counted by this machinehealthcheck.",nilIsZero=true ExpectedMachines int32 `json:"expectedMachines"` // currentHealthy is the total number of healthy machines counted by this machine health check // +kubebuilder:validation:Minimum=0 // +optional + // +Metrics:gauge:name="status_current_healthy",help="Current number of healthy machines.",nilIsZero=true CurrentHealthy int32 `json:"currentHealthy"` // remediationsAllowed is the number of further remediations allowed by this machine health check before // maxUnhealthy short circuiting will be applied // +kubebuilder:validation:Minimum=0 // +optional + // +Metrics:gauge:name="status_remediations_allowed",help="Number of machine remediations that are currently allowed.",nilIsZero=true RemediationsAllowed int32 `json:"remediationsAllowed"` // observedGeneration is the latest generation observed by the controller. @@ -181,6 +184,8 @@ type MachineHealthCheckStatus struct { // conditions defines current service state of the MachineHealthCheck. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a machinehealthcheck.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinehealthcheck.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachineHealthCheck's status with the V1Beta2 version. @@ -213,11 +218,20 @@ type MachineHealthCheckV1Beta2Status struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineHealthCheck" // MachineHealthCheck is the Schema for the machinehealthchecks API. +// +Metrics:gvk:namePrefix="capi_machinehealthcheck" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=".spec.clusterName" +// +Metrics:info:name="info",help="Information about a machinehealthcheck.",labelsFromPath={maxUnhealthy:.spec.maxUnhealthy} type MachineHealthCheck struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the machinehealthcheck is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the specification of machine health check policy diff --git a/api/v1beta1/machineset_types.go b/api/v1beta1/machineset_types.go index cf52f70a1680..e0ee629aed59 100644 --- a/api/v1beta1/machineset_types.go +++ b/api/v1beta1/machineset_types.go @@ -63,6 +63,7 @@ type MachineSetSpec struct { // * An existing MachineSet which initially wasn't controlled by the autoscaler // should be later controlled by the autoscaler // +optional + // +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a machineset.",nilIsZero=true Replicas *int32 `json:"replicas,omitempty"` // minReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available. @@ -293,6 +294,7 @@ type MachineSetStatus struct { // replicas is the most recently observed number of replicas. // +optional + // +Metrics:gauge:name="status_replicas",help="The number of replicas per machineset.",nilIsZero=true Replicas int32 `json:"replicas"` // fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet. @@ -300,14 +302,17 @@ type MachineSetStatus struct { // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. // // +optional + // +Metrics:gauge:name="status_replicas_fully_labeled",help="The number of fully labeled replicas per machineset.",nilIsZero=true FullyLabeledReplicas int32 `json:"fullyLabeledReplicas"` // readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". // +optional + // +Metrics:gauge:name="status_replicas_ready",help="The number of ready replicas per machineset.",nilIsZero=true ReadyReplicas int32 `json:"readyReplicas"` // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet. // +optional + // +Metrics:gauge:name="status_replicas_available",help="The number of available replicas per machineset.",nilIsZero=true AvailableReplicas int32 `json:"availableReplicas"` // observedGeneration reflects the generation of the most recently observed MachineSet. @@ -355,6 +360,8 @@ type MachineSetStatus struct { // conditions defines current service state of the MachineSet. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a machineset.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machineset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachineSet's status with the V1Beta2 version. @@ -425,11 +432,20 @@ func (m *MachineSet) Validate() field.ErrorList { // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.template.spec.version",description="Kubernetes version associated with this MachineSet" // MachineSet is the Schema for the machinesets API. +// +Metrics:gvk:namePrefix="capi_machineset" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=".spec.clusterName" +// +Metrics:info:name="info",help="Information about a machineset.",labelsFromPath={bootstrap_reference_kind:.spec.template.spec.bootstrap.configRef.kind,bootstrap_reference_name:.spec.template.spec.bootstrap.configRef.name,infrastructure_reference_kind:.spec.template.spec.infrastructureRef.kind,infrastructure_reference_name:.spec.template.spec.infrastructureRef.name,version:.spec.template.spec.version} type MachineSet struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the machineset is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of MachineSet. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go index ed0b7365a2f9..07deefbcb4c9 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go @@ -486,6 +486,8 @@ type KubeadmConfigStatus struct { // conditions defines current service state of the KubeadmConfig. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a kubeadmconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a kubeadmconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in KubeadmConfig's status with the V1Beta2 version. @@ -513,11 +515,20 @@ type KubeadmConfigV1Beta2Status struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfig" // KubeadmConfig is the Schema for the kubeadmconfigs API. +// +Metrics:gvk:namePrefix="capi_kubeadmconfig" +// +Metrics:labelFromPath:name="name",JSONPath=.metadata.name +// +Metrics:labelFromPath:name="namespace",JSONPath=.metadata.namespace +// +Metrics:labelFromPath:name="uid",JSONPath=.metadata.uid +// +Metrics:labelFromPath:name="cluster_name",JSONPath=.metadata.labels.cluster\.x-k8s\.io/cluster-name +// +Metrics:info:name="info",help="Information about a kubeadmconfig.",labelsFromPath={name:.metadata.name} type KubeadmConfig struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the kubeadmconfig is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of KubeadmConfig. diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go index 0ab5d5d499a2..a08b1ef74bf9 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go @@ -83,6 +83,7 @@ type KubeadmControlPlaneSpec struct { // odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). // This is a pointer to distinguish between explicit zero and not specified. // +optional + // +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a kubeadmcontrolplane." Replicas *int32 `json:"replicas,omitempty"` // version defines the desired Kubernetes version. @@ -214,6 +215,7 @@ type RollingUpdate struct { // Example: when this is set to 1, the control plane can be scaled // up immediately when the rolling update starts. // +optional + // +Metrics:gauge:name="spec_strategy_rollingupdate_max_surge",help="Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a kubeadmcontrolplane." MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` } @@ -295,6 +297,7 @@ type KubeadmControlPlaneStatus struct { // replicas is the total number of non-terminated machines targeted by this control plane // (their labels match the selector). // +optional + // +Metrics:gauge:name="status_replicas",help="The number of replicas per kubeadmcontrolplane.",nilIsZero=true Replicas int32 `json:"replicas"` // version represents the minimum Kubernetes version for the control plane machines @@ -307,10 +310,12 @@ type KubeadmControlPlaneStatus struct { // updatedReplicas is the total number of non-terminated machines targeted by this control plane // that have the desired template spec. // +optional + // +Metrics:gauge:name="status_replicas_updated",help="The number of updated replicas per kubeadmcontrolplane.",nilIsZero=true UpdatedReplicas int32 `json:"updatedReplicas"` // readyReplicas is the total number of fully running and ready control plane machines. // +optional + // +Metrics:gauge:name="status_replicas_ready",help="The number of ready replicas per kubeadmcontrolplane.",nilIsZero=true ReadyReplicas int32 `json:"readyReplicas"` // unavailableReplicas is the total number of unavailable machines targeted by this control plane. @@ -322,6 +327,7 @@ type KubeadmControlPlaneStatus struct { // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. // // +optional + // +Metrics:gauge:name="status_replicas_unavailable",help="The number of unavailable replicas per kubeadmcontrolplane.",nilIsZero=true UnavailableReplicas int32 `json:"unavailableReplicas"` // initialized denotes that the KubeadmControlPlane API Server is initialized and thus @@ -365,6 +371,8 @@ type KubeadmControlPlaneStatus struct { // conditions defines current service state of the KubeadmControlPlane. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a kubeadmcontrolplane.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a kubeadmcontrolplane.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // lastRemediation stores info about last remediation performed. @@ -438,11 +446,20 @@ type LastRemediationStatus struct { // +kubebuilder:printcolumn:name="Version",type=string,JSONPath=".spec.version",description="Kubernetes version associated with this control plane" // KubeadmControlPlane is the Schema for the KubeadmControlPlane API. +// +Metrics:gvk:namePrefix="capi_kubeadmcontrolplane" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=.metadata.ownerReferences.\[kind=Cluster\].name +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:info:name="info",help="Information about a kubeadmcontrolplane.",labelsFromPath={version:".spec.version"} type KubeadmControlPlane struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the kubeadmcontrolplane is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of KubeadmControlPlane. diff --git a/exp/api/v1beta1/machinepool_types.go b/exp/api/v1beta1/machinepool_types.go index be97236182d4..66ca3bdb3148 100644 --- a/exp/api/v1beta1/machinepool_types.go +++ b/exp/api/v1beta1/machinepool_types.go @@ -42,6 +42,7 @@ type MachinePoolSpec struct { // replicas is the number of desired machines. Defaults to 1. // This is a pointer to distinguish between explicit zero and not specified. // +optional + // +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a machinepool." Replicas *int32 `json:"replicas,omitempty"` // template describes the machines that will be created. @@ -84,14 +85,17 @@ type MachinePoolStatus struct { // replicas is the most recently observed number of replicas. // +optional + // +Metrics:gauge:name="status_replicas",help="The number of replicas per machinepool.",nilIsZero=true Replicas int32 `json:"replicas"` // readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". // +optional + // +Metrics:gauge:name="status_replicas_ready",help="The number of ready replicas per machinepool.",nilIsZero=true ReadyReplicas int32 `json:"readyReplicas,omitempty"` // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool. // +optional + // +Metrics:gauge:name="status_replicas_available",help="The number of available replicas per machinepool.",nilIsZero=true AvailableReplicas int32 `json:"availableReplicas,omitempty"` // unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. @@ -103,6 +107,7 @@ type MachinePoolStatus struct { // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. // // +optional + // +Metrics:gauge:name="status_replicas_unavailable",help="The number of unavailable replicas per machinepool.",nilIsZero=true UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` // failureReason indicates that there is a problem reconciling the state, and @@ -126,6 +131,7 @@ type MachinePoolStatus struct { // phase represents the current phase of cluster actuation. // +optional // +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Running;ScalingUp;ScalingDown;Scaling;Deleting;Failed;Unknown + // +Metrics:stateset:name="status_phase",help="The machinepools current phase.",labelName="phase",list={"ScalingUp","ScalingDown","Running","Failed","Unknown"} Phase string `json:"phase,omitempty"` // bootstrapReady is the state of the bootstrap provider. @@ -142,6 +148,8 @@ type MachinePoolStatus struct { // conditions define the current service state of the MachinePool. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a machinepool.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinepool.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachinePool's status with the V1Beta2 version. @@ -270,11 +278,20 @@ func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase { // +k8s:conversion-gen=false // MachinePool is the Schema for the machinepools API. +// +Metrics:gvk:namePrefix="capi_machinepool" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=".spec.clusterName" +// +Metrics:info:name="info",help="Information about a machinepool.",labelsFromPath={bootstrap_configuration_reference_kind:.spec.template.spec.bootstrap.configRef.kind,bootstrap_configuration_reference_name:.spec.template.spec.bootstrap.configRef.name,failure_domain:.spec.template.spec.failureDomain,infrastructure_reference_kind:.spec.template.spec.infrastructureRef.kind,infrastructure_reference_name:.spec.template.spec.infrastructureRef.name,version:.spec.template.spec.version} type MachinePool struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional + // +Metrics:gauge:name="created",JSONPath=".creationTimestamp",help="Unix creation timestamp." + // +Metrics:info:name="annotation_paused",JSONPath=.annotations['cluster\.x-k8s\.io/paused'],help="Whether the machinepool is paused and any of its resources will not be processed by the controllers.",labelsFromPath={paused_value:"."} + // +Metrics:info:name="owner",JSONPath=".ownerReferences",help="Owner references.",labelsFromPath={owner_is_controller:".controller",owner_kind:".kind",owner_name:".name",owner_uid:".uid"} metav1.ObjectMeta `json:"metadata,omitempty"` // spec is the desired state of MachinePool. From ef8cb8b51e960c5bfc558ec23e146ac0c588e495 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 15:47:35 +0100 Subject: [PATCH 02/14] add v1beta2 conditions --- api/addons/v1beta1/clusterresourceset_types.go | 2 ++ api/v1beta1/cluster_types.go | 2 ++ api/v1beta1/clusterclass_types.go | 2 ++ api/v1beta1/machine_types.go | 2 ++ api/v1beta1/machinedeployment_types.go | 2 ++ api/v1beta1/machinehealthcheck_types.go | 2 ++ api/v1beta1/machineset_types.go | 2 ++ bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go | 2 ++ .../kubeadm/api/v1beta1/kubeadm_control_plane_types.go | 2 ++ exp/api/v1beta1/machinepool_types.go | 2 ++ exp/ipam/api/v1beta1/ipaddressclaim_types.go | 2 ++ exp/runtime/api/v1alpha1/extensionconfig_types.go | 2 ++ test/infrastructure/docker/api/v1beta1/devcluster_types.go | 2 ++ test/infrastructure/docker/api/v1beta1/devmachine_types.go | 4 ++++ test/infrastructure/docker/api/v1beta1/dockercluster_types.go | 4 ++++ test/infrastructure/docker/api/v1beta1/dockermachine_types.go | 4 ++++ 16 files changed, 38 insertions(+) diff --git a/api/addons/v1beta1/clusterresourceset_types.go b/api/addons/v1beta1/clusterresourceset_types.go index d6b6d29f7d2b..42abd7c8e222 100644 --- a/api/addons/v1beta1/clusterresourceset_types.go +++ b/api/addons/v1beta1/clusterresourceset_types.go @@ -141,6 +141,8 @@ type ClusterResourceSetV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a clusterresourceset.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a clusterresourceset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index 997caa3b1b94..21e91c5a9568 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -1024,6 +1024,8 @@ type ClusterV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a cluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a cluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // controlPlane groups all the observations about Cluster's ControlPlane current state. diff --git a/api/v1beta1/clusterclass_types.go b/api/v1beta1/clusterclass_types.go index 4e9420ff356c..5eacfe32c5bd 100644 --- a/api/v1beta1/clusterclass_types.go +++ b/api/v1beta1/clusterclass_types.go @@ -1177,6 +1177,8 @@ type ClusterClassV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a clusterclass.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a clusterclass.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/machine_types.go b/api/v1beta1/machine_types.go index b3e63b19d6cc..67f92b61f618 100644 --- a/api/v1beta1/machine_types.go +++ b/api/v1beta1/machine_types.go @@ -616,6 +616,8 @@ type MachineV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machine.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/machinedeployment_types.go b/api/v1beta1/machinedeployment_types.go index 9ec6f0295554..e4dc53f70bef 100644 --- a/api/v1beta1/machinedeployment_types.go +++ b/api/v1beta1/machinedeployment_types.go @@ -528,6 +528,8 @@ type MachineDeploymentV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machinedeployment.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machinedeployment.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this MachineDeployment. A machine is considered ready when Machine's Ready condition is true. diff --git a/api/v1beta1/machinehealthcheck_types.go b/api/v1beta1/machinehealthcheck_types.go index 58fd71ceb97d..b9c9be5b5d9f 100644 --- a/api/v1beta1/machinehealthcheck_types.go +++ b/api/v1beta1/machinehealthcheck_types.go @@ -202,6 +202,8 @@ type MachineHealthCheckV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machinehealthcheck.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machinehealthcheck.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/machineset_types.go b/api/v1beta1/machineset_types.go index e0ee629aed59..1c522a3cf219 100644 --- a/api/v1beta1/machineset_types.go +++ b/api/v1beta1/machineset_types.go @@ -378,6 +378,8 @@ type MachineSetV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machineset.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machineset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when Machine's Ready condition is true. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go index 07deefbcb4c9..771fdfbe52a4 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go @@ -504,6 +504,8 @@ type KubeadmConfigV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a kubeadmconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a kubeadmconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go index a08b1ef74bf9..b2eda200f86d 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go @@ -394,6 +394,8 @@ type KubeadmControlPlaneV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a kubeadmcontrolplane.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a kubeadmcontrolplane.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this KubeadmControlPlane. A machine is considered ready when Machine's Ready condition is true. diff --git a/exp/api/v1beta1/machinepool_types.go b/exp/api/v1beta1/machinepool_types.go index 66ca3bdb3148..666be1334363 100644 --- a/exp/api/v1beta1/machinepool_types.go +++ b/exp/api/v1beta1/machinepool_types.go @@ -167,6 +167,8 @@ type MachinePoolV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machinepool.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machinepool.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when Machine's Ready condition is true. diff --git a/exp/ipam/api/v1beta1/ipaddressclaim_types.go b/exp/ipam/api/v1beta1/ipaddressclaim_types.go index 635df232c674..1d696669c204 100644 --- a/exp/ipam/api/v1beta1/ipaddressclaim_types.go +++ b/exp/ipam/api/v1beta1/ipaddressclaim_types.go @@ -59,6 +59,8 @@ type IPAddressClaimV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a ipaddressclaim.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a ipaddressclaim.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/exp/runtime/api/v1alpha1/extensionconfig_types.go b/exp/runtime/api/v1alpha1/extensionconfig_types.go index 6bb04a28254c..6dddd3e03dae 100644 --- a/exp/runtime/api/v1alpha1/extensionconfig_types.go +++ b/exp/runtime/api/v1alpha1/extensionconfig_types.go @@ -141,6 +141,8 @@ type ExtensionConfigV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a extensionconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a extensionconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/devcluster_types.go b/test/infrastructure/docker/api/v1beta1/devcluster_types.go index 248296c97f2c..b5805bebb883 100644 --- a/test/infrastructure/docker/api/v1beta1/devcluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/devcluster_types.go @@ -135,6 +135,8 @@ type DevClusterV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a devcluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a devcluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/devmachine_types.go b/test/infrastructure/docker/api/v1beta1/devmachine_types.go index 4d4f0318705c..6b303aba7f4b 100644 --- a/test/infrastructure/docker/api/v1beta1/devmachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/devmachine_types.go @@ -358,6 +358,8 @@ type DevMachineStatus struct { // conditions defines current service state of the DevMachine. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a devmachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a devmachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DevMachine's status with the V1Beta2 version. @@ -392,6 +394,8 @@ type DevMachineV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a devmachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a devmachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go index c450c83072be..11e036a85c76 100644 --- a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go @@ -94,6 +94,8 @@ type DockerClusterStatus struct { // Conditions defines current service state of the DockerCluster. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a dockercluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a dockercluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DockerCluster's's status with the V1Beta2 version. @@ -110,6 +112,8 @@ type DockerClusterV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a dockercluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a dockercluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go index edc8401cb678..ab79d66bc12c 100644 --- a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go @@ -96,6 +96,8 @@ type DockerMachineStatus struct { // Conditions defines current service state of the DockerMachine. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a dockermachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a dockermachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DockerMachine's status with the V1Beta2 version. @@ -112,6 +114,8 @@ type DockerMachineV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a dockermachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a dockermachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } From 4843862683f47bf55376c17cdefd9624bf555d0a Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Fri, 30 Aug 2024 10:56:20 +0200 Subject: [PATCH 03/14] metrics: drop templates for metrics generation and rename yaml files --- config/metrics/kustomization.yaml | 7 +- .../{crd-metrics-config.yaml => metrics.yaml} | 0 .../{crd-clusterrole.yaml => rbac.yaml} | 0 config/metrics/templates/README.md | 7 - config/metrics/templates/cluster.yaml | 79 --------- config/metrics/templates/clusterclass.yaml | 26 --- config/metrics/templates/common_metrics.yaml | 52 ------ config/metrics/templates/header.yaml | 3 - config/metrics/templates/kubeadmconfig.yaml | 30 ---- .../templates/kubeadmcontrolplane.yaml | 84 ---------- config/metrics/templates/machine.yaml | 130 --------------- .../metrics/templates/machinedeployment.yaml | 153 ------------------ .../metrics/templates/machinehealthcheck.yaml | 53 ------ config/metrics/templates/machinepool.yaml | 119 -------------- config/metrics/templates/machineset.yaml | 100 ------------ config/metrics/templates/owner_metric.yaml | 17 -- 16 files changed, 4 insertions(+), 856 deletions(-) rename config/metrics/{crd-metrics-config.yaml => metrics.yaml} (100%) rename config/metrics/{crd-clusterrole.yaml => rbac.yaml} (100%) delete mode 100644 config/metrics/templates/README.md delete mode 100644 config/metrics/templates/cluster.yaml delete mode 100644 config/metrics/templates/clusterclass.yaml delete mode 100644 config/metrics/templates/common_metrics.yaml delete mode 100644 config/metrics/templates/header.yaml delete mode 100644 config/metrics/templates/kubeadmconfig.yaml delete mode 100644 config/metrics/templates/kubeadmcontrolplane.yaml delete mode 100644 config/metrics/templates/machine.yaml delete mode 100644 config/metrics/templates/machinedeployment.yaml delete mode 100644 config/metrics/templates/machinehealthcheck.yaml delete mode 100644 config/metrics/templates/machinepool.yaml delete mode 100644 config/metrics/templates/machineset.yaml delete mode 100644 config/metrics/templates/owner_metric.yaml diff --git a/config/metrics/kustomization.yaml b/config/metrics/kustomization.yaml index 3955c8d0d945..efdaabd4ea99 100644 --- a/config/metrics/kustomization.yaml +++ b/config/metrics/kustomization.yaml @@ -1,12 +1,13 @@ resources: - - ./crd-clusterrole.yaml + - ./rbac.yaml namespace: observability +namePrefix: capi- configMapGenerator: -- name: kube-state-metrics-crd-config-capi +- name: kube-state-metrics-crd-config files: - - capi.yaml=crd-metrics-config.yaml + - capi.yaml=metrics.yaml options: disableNameSuffixHash: true labels: diff --git a/config/metrics/crd-metrics-config.yaml b/config/metrics/metrics.yaml similarity index 100% rename from config/metrics/crd-metrics-config.yaml rename to config/metrics/metrics.yaml diff --git a/config/metrics/crd-clusterrole.yaml b/config/metrics/rbac.yaml similarity index 100% rename from config/metrics/crd-clusterrole.yaml rename to config/metrics/rbac.yaml diff --git a/config/metrics/templates/README.md b/config/metrics/templates/README.md deleted file mode 100644 index 14970cdb1aae..000000000000 --- a/config/metrics/templates/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Metrics - -**Disclaimer**: This is a temporary workaround. The long-term goal is to generate metric configuration from API type markers. - -The make target `generate-metrics-config` is used to generate a single file which contains the Cluster API specific custom resource configuration for kube-state-metrics. - -To regenerate the file `../crd-metrics-config.yaml`, execute the `make generate-metrics-config` command. diff --git a/config/metrics/templates/cluster.yaml b/config/metrics/templates/cluster.yaml deleted file mode 100644 index f1e91daa6b57..000000000000 --- a/config/metrics/templates/cluster.yaml +++ /dev/null @@ -1,79 +0,0 @@ - - groupVersionKind: - group: cluster.x-k8s.io - kind: Cluster - version: v1beta1 - labelsFromPath: - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_cluster - metrics: - - name: info - help: Information about a cluster. - each: - info: - labelsFromPath: - topology_version: - - spec - - topology - - version - topology_class: - - spec - - topology - - class - control_plane_endpoint_host: - - spec - - controlPlaneEndpoint - - host - control_plane_endpoint_port: - - spec - - controlPlaneEndpoint - - port - control_plane_reference_kind: - - spec - - controlPlaneRef - - kind - control_plane_reference_name: - - spec - - controlPlaneRef - - name - infrastructure_reference_kind: - - spec - - infrastructureRef - - kind - infrastructure_reference_name: - - spec - - infrastructureRef - - name - type: Info - - name: spec_paused - help: Whether the cluster is paused and any of its resources will not be processed by the controllers. - each: - gauge: - nilIsZero: true - path: - - spec - - paused - type: Gauge - - name: status_phase - help: The clusters current phase. - each: - stateSet: - labelName: phase - list: - - Pending - - Provisioning - - Provisioned - - Deleting - - Failed - - Unknown - path: - - status - - phase - type: StateSet diff --git a/config/metrics/templates/clusterclass.yaml b/config/metrics/templates/clusterclass.yaml deleted file mode 100644 index 21b464d45e06..000000000000 --- a/config/metrics/templates/clusterclass.yaml +++ /dev/null @@ -1,26 +0,0 @@ - - groupVersionKind: - group: cluster.x-k8s.io - kind: ClusterClass - version: v1beta1 - labelsFromPath: - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_clusterclass - metrics: - - name: info - help: Information about a clusterclass. - each: - info: - # TODO: added metadata.name even it's already defined above as the metric doesn't work with empty labelsFromPath. - labelsFromPath: - name: - - metadata - - name - type: Info diff --git a/config/metrics/templates/common_metrics.yaml b/config/metrics/templates/common_metrics.yaml deleted file mode 100644 index 073631b9c88b..000000000000 --- a/config/metrics/templates/common_metrics.yaml +++ /dev/null @@ -1,52 +0,0 @@ - - name: created - help: Unix creation timestamp. - each: - gauge: - path: - - metadata - - creationTimestamp - type: Gauge - - name: annotation_paused - help: Whether the ${RESOURCE} is paused and any of its resources will not be processed by the controllers. - each: - info: - path: - - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] - type: Info - - name: status_condition - help: The condition of a ${RESOURCE}. - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - 'True' - - 'False' - - Unknown - path: - - status - - conditions - valueFrom: - - status - type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a ${RESOURCE}. - each: - gauge: - labelsFromPath: - type: - - type - status: - - status - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge diff --git a/config/metrics/templates/header.yaml b/config/metrics/templates/header.yaml deleted file mode 100644 index 6b74624c47d6..000000000000 --- a/config/metrics/templates/header.yaml +++ /dev/null @@ -1,3 +0,0 @@ -kind: CustomResourceStateMetrics -spec: - resources: diff --git a/config/metrics/templates/kubeadmconfig.yaml b/config/metrics/templates/kubeadmconfig.yaml deleted file mode 100644 index ffb240172a60..000000000000 --- a/config/metrics/templates/kubeadmconfig.yaml +++ /dev/null @@ -1,30 +0,0 @@ - - groupVersionKind: - group: bootstrap.cluster.x-k8s.io - kind: KubeadmConfig - version: v1beta1 - labelsFromPath: - cluster_name: - - metadata - - labels - - cluster.x-k8s.io/cluster-name - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_kubeadmconfig - metrics: - - name: info - help: Information about a kubeadmconfig. - each: - info: - # TODO: added metadata.name even it's already defined above as the metric doesn't work with empty labelsFromPath. - labelsFromPath: - name: - - metadata - - name - type: Info diff --git a/config/metrics/templates/kubeadmcontrolplane.yaml b/config/metrics/templates/kubeadmcontrolplane.yaml deleted file mode 100644 index 08db0c4e4f0e..000000000000 --- a/config/metrics/templates/kubeadmcontrolplane.yaml +++ /dev/null @@ -1,84 +0,0 @@ - - groupVersionKind: - group: controlplane.cluster.x-k8s.io - kind: KubeadmControlPlane - version: v1beta1 - labelsFromPath: - cluster_name: - - metadata - - ownerReferences - - '[kind=Cluster]' - - name - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_kubeadmcontrolplane - metrics: - - name: info - help: Information about a kubeadmcontrolplane. - each: - info: - labelsFromPath: - version: - - spec - - version - type: Info - - name: status_replicas - help: The number of replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - replicas - nilIsZero: true - type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - readyReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_unavailable - help: The number of unavailable replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - unavailableReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_updated - help: The number of updated replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - updatedReplicas - nilIsZero: true - type: Gauge - - name: spec_replicas - help: The number of desired machines for a kubeadmcontrolplane. - each: - gauge: - path: - - spec - - replicas - type: Gauge - - name: spec_strategy_rollingupdate_max_surge - help: Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a kubeadmcontrolplane. - each: - gauge: - path: - - spec - - rolloutStrategy - - rollingUpdate - - maxSurge - type: Gauge diff --git a/config/metrics/templates/machine.yaml b/config/metrics/templates/machine.yaml deleted file mode 100644 index b49b1d3b7c7e..000000000000 --- a/config/metrics/templates/machine.yaml +++ /dev/null @@ -1,130 +0,0 @@ - - groupVersionKind: - group: cluster.x-k8s.io - kind: Machine - version: v1beta1 - labelsFromPath: - cluster_name: - - spec - - clusterName - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_machine - metrics: - - name: info - help: Information about a machine. - each: - info: - labelsFromPath: - container_runtime_version: - - status - - nodeInfo - - containerRuntimeVersion - failure_domain: - - spec - - failureDomain - kernel_version: - - status - - nodeInfo - - kernelVersion - kubelet_version: - - status - - nodeInfo - - kubeletVersion - kube_proxy_version: - - status - - nodeInfo - - kubeProxyVersion - os_image: - - status - - nodeInfo - - osImage - provider_id: - - spec - - providerID - version: - - spec - - version - bootstrap_reference_kind: - - spec - - bootstrap - - configRef - - kind - bootstrap_reference_name: - - spec - - bootstrap - - configRef - - name - infrastructure_reference_kind: - - spec - - infrastructureRef - - kind - infrastructure_reference_name: - - spec - - infrastructureRef - - name - control_plane_name: - - metadata - - labels - - cluster.x-k8s.io/control-plane-name - type: Info - - name: addresses - help: Address information about a machine. - each: - info: - path: - - status - - addresses - labelsFromPath: - type: - - type - address: - - address - type: Info - - name: status_certificatesexpirydate - help: Information about certificate expiration date of a control plane node. - each: - gauge: - nilIsZero: true - path: - - status - - certificatesExpiryDate - type: Gauge - - name: status_noderef - help: Information about the node reference of a machine. - each: - info: - labelsFromPath: - node_name: - - status - - nodeRef - - name - node_uid: - - status - - nodeRef - - uid - type: Info - - name: status_phase - help: The machines current phase. - each: - stateSet: - labelName: phase - list: - - Pending - - Provisioning - - Provisioned - - Running - - Deleting - - Deleted - - Failed - - Unknown - path: - - status - - phase - type: StateSet diff --git a/config/metrics/templates/machinedeployment.yaml b/config/metrics/templates/machinedeployment.yaml deleted file mode 100644 index 1ece3552149a..000000000000 --- a/config/metrics/templates/machinedeployment.yaml +++ /dev/null @@ -1,153 +0,0 @@ - - groupVersionKind: - group: cluster.x-k8s.io - kind: MachineDeployment - version: v1beta1 - labelsFromPath: - cluster_name: - - spec - - clusterName - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_machinedeployment - metrics: - - name: info - help: Information about a machinedeployment. - each: - info: - labelsFromPath: - version: - - spec - - template - - spec - - version - bootstrap_reference_kind: - - spec - - template - - spec - - bootstrap - - configRef - - kind - bootstrap_reference_name: - - spec - - template - - spec - - bootstrap - - configRef - - name - infrastructure_reference_kind: - - spec - - template - - spec - - infrastructureRef - - kind - infrastructure_reference_name: - - spec - - template - - spec - - infrastructureRef - - name - type: Info - - name: spec_paused - help: Whether the machinedeployment is paused and any of its resources will not be processed by the controllers. - each: - gauge: - nilIsZero: true - path: - - spec - - paused - type: Gauge - - name: spec_replicas - help: The number of desired machines for a machinedeployment. - each: - gauge: - path: - - spec - - replicas - type: Gauge - - name: spec_strategy_rollingupdate_max_surge - help: Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a machinedeployment. - each: - gauge: - path: - - spec - - strategy - - rollingUpdate - - maxSurge - type: Gauge - - name: spec_strategy_rollingupdate_max_unavailable - help: Maximum number of unavailable replicas during a rolling update of a machinedeployment. - each: - gauge: - path: - - spec - - strategy - - rollingUpdate - - maxUnavailable - type: Gauge - - name: status_phase - help: The machinedeployments current phase. - each: - stateSet: - labelName: phase - list: - - ScalingUp - - ScalingDown - - Running - - Failed - - Unknown - path: - - status - - phase - type: StateSet - - name: status_replicas - help: The number of replicas per machinedeployment. - each: - gauge: - path: - - status - - replicas - nilIsZero: true - type: Gauge - - name: status_replicas_available - help: The number of available replicas per machinedeployment. - each: - gauge: - path: - - status - - availableReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per machinedeployment. - each: - gauge: - path: - - status - - readyReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_unavailable - help: The number of unavailable replicas per machinedeployment. - each: - gauge: - path: - - status - - unavailableReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_updated - help: The number of updated replicas per machinedeployment. - each: - gauge: - path: - - status - - updatedReplicas - nilIsZero: true - type: Gauge diff --git a/config/metrics/templates/machinehealthcheck.yaml b/config/metrics/templates/machinehealthcheck.yaml deleted file mode 100644 index a14a164be72b..000000000000 --- a/config/metrics/templates/machinehealthcheck.yaml +++ /dev/null @@ -1,53 +0,0 @@ - - groupVersionKind: - group: cluster.x-k8s.io - kind: MachineHealthCheck - version: v1beta1 - labelsFromPath: - cluster_name: - - spec - - clusterName - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_machinehealthcheck - metrics: - - name: info - help: Information about a machinehealthcheck. - each: - info: - # TODO: added metadata.name even it's already defined above as the metric doesn't work with empty labelsFromPath. - labelsFromPath: - name: - - metadata - - name - type: Info - - name: status_current_healthy - help: Current number of healthy machines. - each: - gauge: - path: - - status - - currentHealthy - type: Gauge - - name: status_expected_machines - help: Total number of pods counted by this machinehealthcheck. - each: - gauge: - path: - - status - - expectedMachines - type: Gauge - - name: status_remediations_allowed - help: Number of machine remediations that are currently allowed. - each: - gauge: - path: - - status - - remediationsAllowed - type: Gauge diff --git a/config/metrics/templates/machinepool.yaml b/config/metrics/templates/machinepool.yaml deleted file mode 100644 index a4dbb4aa7254..000000000000 --- a/config/metrics/templates/machinepool.yaml +++ /dev/null @@ -1,119 +0,0 @@ - - groupVersionKind: - group: cluster.x-k8s.io - kind: MachinePool - version: v1beta1 - labelsFromPath: - cluster_name: - - spec - - clusterName - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_machinepool - metrics: - - name: spec_replicas - help: The number of desired machines for a machinepool. - each: - gauge: - path: - - spec - - replicas - type: Gauge - - name: status_replicas - help: The number of replicas per machinepool. - each: - gauge: - path: - - status - - replicas - nilIsZero: true - type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per machinepool. - each: - gauge: - path: - - status - - readyReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_available - help: The number of available replicas per machinepool. - each: - gauge: - path: - - status - - availableReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_unavailable - help: The number of unavailable replicas per machinepool. - each: - gauge: - path: - - status - - unavailableReplicas - nilIsZero: true - type: Gauge - - name: info - each: - type: Info - info: - labelsFromPath: - infrastructure_reference_name: - - spec - - template - - spec - - infrastructureRef - - name - infrastructure_reference_kind: - - spec - - template - - spec - - infrastructureRef - - kind - bootstrap_configuration_reference_name: - - spec - - template - - spec - - bootstrap - - configRef - - name - bootstrap_configuration_reference_kind: - - spec - - template - - spec - - bootstrap - - configRef - - kind - failure_domain: - - spec - - template - - spec - - failureDomain - version: - - spec - - template - - spec - - version - - name: status_phase - help: The machinepools current phase. - each: - stateSet: - labelName: phase - list: - - ScalingUp - - ScalingDown - - Running - - Failed - - Unknown - path: - - status - - phase - type: StateSet diff --git a/config/metrics/templates/machineset.yaml b/config/metrics/templates/machineset.yaml deleted file mode 100644 index e2bde1ecde6e..000000000000 --- a/config/metrics/templates/machineset.yaml +++ /dev/null @@ -1,100 +0,0 @@ - - groupVersionKind: - group: cluster.x-k8s.io - kind: MachineSet - version: v1beta1 - labelsFromPath: - cluster_name: - - spec - - clusterName - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_machineset - metrics: - - name: info - help: Information about a machineset. - each: - info: - labelsFromPath: - version: - - spec - - template - - spec - - version - bootstrap_reference_kind: - - spec - - template - - spec - - bootstrap - - configRef - - kind - bootstrap_reference_name: - - spec - - template - - spec - - bootstrap - - configRef - - name - infrastructure_reference_kind: - - spec - - template - - spec - - infrastructureRef - - kind - infrastructure_reference_name: - - spec - - template - - spec - - infrastructureRef - - name - type: Info - - name: spec_replicas - help: The number of desired machines for a machineset. - each: - gauge: - path: - - spec - - replicas - nilIsZero: true - type: Gauge - - name: status_replicas_available - help: The number of available replicas per machineset. - each: - gauge: - path: - - status - - availableReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_fully_labeled - help: The number of fully labeled replicas per machineset. - each: - gauge: - path: - - status - - fullyLabeledReplicas - type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per machineset. - each: - gauge: - path: - - status - - readyReplicas - nilIsZero: true - type: Gauge - - name: status_replicas - help: The number of replicas per machineset. - each: - gauge: - path: - - status - - replicas - nilIsZero: true - type: Gauge diff --git a/config/metrics/templates/owner_metric.yaml b/config/metrics/templates/owner_metric.yaml deleted file mode 100644 index ae276010ef00..000000000000 --- a/config/metrics/templates/owner_metric.yaml +++ /dev/null @@ -1,17 +0,0 @@ - - name: owner - help: Owner references. - each: - info: - labelsFromPath: - owner_is_controller: - - controller - owner_kind: - - kind - owner_name: - - name - owner_uid: - - uid - path: - - metadata - - ownerReferences - type: Info From 2f685df94d30a8a1fcd73721535a08e85f4d414c Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Fri, 30 Aug 2024 10:56:55 +0200 Subject: [PATCH 04/14] metrics: sort entries in metrics.yaml for better comparison to the new generated one --- config/metrics/metrics.yaml | 1733 +++++++++++++++++++---------------- 1 file changed, 921 insertions(+), 812 deletions(-) diff --git a/config/metrics/metrics.yaml b/config/metrics/metrics.yaml index 718af5a9bd9f..391aa77a1663 100644 --- a/config/metrics/metrics.yaml +++ b/config/metrics/metrics.yaml @@ -1,12 +1,15 @@ -# This file was auto-generated via: make generate-metrics-config -kind: CustomResourceStateMetrics spec: resources: - - groupVersionKind: - group: cluster.x-k8s.io - kind: ClusterClass + - errorLogV: 0 + groupVersionKind: + group: bootstrap.cluster.x-k8s.io + kind: KubeadmConfig version: v1beta1 labelsFromPath: + cluster_name: + - metadata + - labels + - cluster.x-k8s.io/cluster-name name: - metadata - name @@ -16,48 +19,66 @@ spec: uid: - metadata - uid - metricNamePrefix: capi_clusterclass + metricNamePrefix: capi_kubeadmconfig metrics: - - name: info - help: Information about a clusterclass. - each: + - each: info: - # TODO: added metadata.name even it's already defined above as the metric doesn't work with empty labelsFromPath. labelsFromPath: - name: - - metadata - - name + paused_value: [] + path: + - metadata + - annotations + - cluster.x-k8s.io/paused type: Info - - name: created - help: Unix creation timestamp. - each: + help: Whether the kubeadmconfig is paused and any of its resources will not + be processed by the controllers. + name: annotation_paused + - each: gauge: + nilIsZero: false path: - metadata - creationTimestamp + valueFrom: null type: Gauge - - name: annotation_paused - help: Whether the clusterclass is paused and any of its resources will not be processed by the controllers. - each: + help: Unix creation timestamp. + name: created + - each: + info: + labelsFromPath: + name: + - metadata + - name + path: null + type: Info + help: Information about a kubeadmconfig. + name: info + - each: info: + labelsFromPath: + owner_is_controller: + - controller + owner_kind: + - kind + owner_name: + - name + owner_uid: + - uid path: - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] + - ownerReferences type: Info - - name: status_condition - help: The condition of a clusterclass. - each: + help: Owner references. + name: owner + - each: stateSet: labelName: status labelsFromPath: type: - type list: - - 'True' - - 'False' + - "True" + - "False" - Unknown path: - status @@ -65,39 +86,27 @@ spec: valueFrom: - status type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a clusterclass. - each: + help: The condition of a kubeadmconfig. + name: status_condition + - each: gauge: labelsFromPath: - type: - - type status: - status + type: + - type + nilIsZero: false path: - status - conditions valueFrom: - lastTransitionTime type: Gauge - - name: owner - help: Owner references. - each: - info: - labelsFromPath: - owner_is_controller: - - controller - owner_kind: - - kind - owner_name: - - name - owner_uid: - - uid - path: - - metadata - - ownerReferences - type: Info - - groupVersionKind: + help: The condition last transition time of a kubeadmconfig. + name: status_condition_last_transition_time + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: group: cluster.x-k8s.io kind: Cluster version: v1beta1 @@ -113,19 +122,31 @@ spec: - uid metricNamePrefix: capi_cluster metrics: - - name: info - help: Information about a cluster. - each: + - each: + info: + labelsFromPath: + paused_value: [] + path: + - metadata + - annotations + - cluster.x-k8s.io/paused + type: Info + help: Whether the cluster is paused and any of its resources will not be processed + by the controllers. + name: annotation_paused + - each: + gauge: + nilIsZero: false + path: + - metadata + - creationTimestamp + valueFrom: null + type: Gauge + help: Unix creation timestamp. + name: created + - each: info: labelsFromPath: - topology_version: - - spec - - topology - - version - topology_class: - - spec - - topology - - class control_plane_endpoint_host: - spec - controlPlaneEndpoint @@ -150,62 +171,38 @@ spec: - spec - infrastructureRef - name + topology_class: + - spec + - topology + - class + topology_version: + - spec + - topology + - version + path: null type: Info - - name: spec_paused - help: Whether the cluster is paused and any of its resources will not be processed by the controllers. - each: + help: Information about a cluster. + name: info + - each: gauge: nilIsZero: true path: - spec - paused + valueFrom: null type: Gauge - - name: status_phase - help: The clusters current phase. - each: - stateSet: - labelName: phase - list: - - Pending - - Provisioning - - Provisioned - - Deleting - - Failed - - Unknown - path: - - status - - phase - type: StateSet - - name: created - help: Unix creation timestamp. - each: - gauge: - path: - - metadata - - creationTimestamp - type: Gauge - - name: annotation_paused - help: Whether the cluster is paused and any of its resources will not be processed by the controllers. - each: - info: - path: - - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] - type: Info - - name: status_condition - help: The condition of a cluster. - each: + help: Whether the cluster is paused and any of its resources will not be processed + by the controllers. + name: spec_paused + - each: stateSet: labelName: status labelsFromPath: type: - type list: - - 'True' - - 'False' + - "True" + - "False" - Unknown path: - status @@ -213,31 +210,48 @@ spec: valueFrom: - status type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a cluster. - each: + help: The condition of a cluster. + name: status_condition + - each: gauge: labelsFromPath: - type: - - type status: - status + type: + - type + nilIsZero: false path: - status - conditions valueFrom: - lastTransitionTime type: Gauge - - groupVersionKind: - group: controlplane.cluster.x-k8s.io - kind: KubeadmControlPlane + help: The condition last transition time of a cluster. + name: status_condition_last_transition_time + - each: + stateSet: + labelName: phase + list: + - Pending + - Provisioning + - Provisioned + - Deleting + - Failed + - Unknown + path: + - status + - phase + valueFrom: null + type: StateSet + help: The clusters current phase. + name: status_phase + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: cluster.x-k8s.io + kind: ClusterClass version: v1beta1 labelsFromPath: - cluster_name: - - metadata - - ownerReferences - - '[kind=Cluster]' - - name name: - metadata - name @@ -247,101 +261,66 @@ spec: uid: - metadata - uid - metricNamePrefix: capi_kubeadmcontrolplane + metricNamePrefix: capi_clusterclass metrics: - - name: info - help: Information about a kubeadmcontrolplane. - each: + - each: info: labelsFromPath: - version: - - spec - - version - type: Info - - name: status_replicas - help: The number of replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - replicas - nilIsZero: true - type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - readyReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_unavailable - help: The number of unavailable replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - unavailableReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_updated - help: The number of updated replicas per kubeadmcontrolplane. - each: - gauge: - path: - - status - - updatedReplicas - nilIsZero: true - type: Gauge - - name: spec_replicas - help: The number of desired machines for a kubeadmcontrolplane. - each: - gauge: - path: - - spec - - replicas - type: Gauge - - name: spec_strategy_rollingupdate_max_surge - help: Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a kubeadmcontrolplane. - each: - gauge: + paused_value: [] path: - - spec - - rolloutStrategy - - rollingUpdate - - maxSurge - type: Gauge - - name: created - help: Unix creation timestamp. - each: + - metadata + - annotations + - cluster.x-k8s.io/paused + type: Info + help: Whether the clusterclass is paused and any of its resources will not be + processed by the controllers. + name: annotation_paused + - each: gauge: + nilIsZero: false path: - metadata - creationTimestamp + valueFrom: null type: Gauge - - name: annotation_paused - help: Whether the kubeadmcontrolplane is paused and any of its resources will not be processed by the controllers. - each: + help: Unix creation timestamp. + name: created + - each: + info: + labelsFromPath: + name: + - metadata + - name + path: null + type: Info + help: Information about a clusterclass. + name: info + - each: info: + labelsFromPath: + owner_is_controller: + - controller + owner_kind: + - kind + owner_name: + - name + owner_uid: + - uid path: - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] + - ownerReferences type: Info - - name: status_condition - help: The condition of a kubeadmcontrolplane. - each: + help: Owner references. + name: owner + - each: stateSet: labelName: status labelsFromPath: type: - type list: - - 'True' - - 'False' + - "True" + - "False" - Unknown path: - status @@ -349,47 +328,34 @@ spec: valueFrom: - status type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a kubeadmcontrolplane. - each: + help: The condition of a clusterclass. + name: status_condition + - each: gauge: labelsFromPath: - type: - - type status: - status + type: + - type + nilIsZero: false path: - status - conditions valueFrom: - lastTransitionTime type: Gauge - - name: owner - help: Owner references. - each: - info: - labelsFromPath: - owner_is_controller: - - controller - owner_kind: - - kind - owner_name: - - name - owner_uid: - - uid - path: - - metadata - - ownerReferences - type: Info - - groupVersionKind: - group: bootstrap.cluster.x-k8s.io - kind: KubeadmConfig + help: The condition last transition time of a clusterclass. + name: status_condition_last_transition_time + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: cluster.x-k8s.io + kind: Machine version: v1beta1 labelsFromPath: cluster_name: - - metadata - - labels - - cluster.x-k8s.io/cluster-name + - spec + - clusterName name: - metadata - name @@ -399,130 +365,87 @@ spec: uid: - metadata - uid - metricNamePrefix: capi_kubeadmconfig + metricNamePrefix: capi_machine metrics: - - name: info - help: Information about a kubeadmconfig. - each: + - each: info: - # TODO: added metadata.name even it's already defined above as the metric doesn't work with empty labelsFromPath. labelsFromPath: - name: - - metadata - - name - type: Info - - name: created - help: Unix creation timestamp. - each: - gauge: + address: + - address + type: + - type path: - - metadata - - creationTimestamp - type: Gauge - - name: annotation_paused - help: Whether the kubeadmconfig is paused and any of its resources will not be processed by the controllers. - each: + - status + - addresses + type: Info + help: Address information about a machine. + name: addresses + - each: info: + labelsFromPath: + paused_value: [] path: - metadata - annotations - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] type: Info - - name: status_condition - help: The condition of a kubeadmconfig. - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - 'True' - - 'False' - - Unknown - path: - - status - - conditions - valueFrom: - - status - type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a kubeadmconfig. - each: + help: Whether the machine is paused and any of its resources will not be processed + by the controllers. + name: annotation_paused + - each: gauge: - labelsFromPath: - type: - - type - status: - - status + nilIsZero: false path: - - status - - conditions - valueFrom: - - lastTransitionTime + - metadata + - creationTimestamp + valueFrom: null type: Gauge - - name: owner - help: Owner references. - each: + help: Unix creation timestamp. + name: created + - each: info: labelsFromPath: - owner_is_controller: - - controller - owner_kind: + bootstrap_reference_kind: + - spec + - bootstrap + - configRef - kind - owner_name: + bootstrap_reference_name: + - spec + - bootstrap + - configRef - name - owner_uid: - - uid - path: - - metadata - - ownerReferences - type: Info - - groupVersionKind: - group: cluster.x-k8s.io - kind: Machine - version: v1beta1 - labelsFromPath: - cluster_name: - - spec - - clusterName - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_machine - metrics: - - name: info - help: Information about a machine. - each: - info: - labelsFromPath: container_runtime_version: - status - nodeInfo - containerRuntimeVersion + control_plane_name: + - metadata + - labels + - cluster.x-k8s.io/control-plane-name failure_domain: - spec - failureDomain + infrastructure_reference_kind: + - spec + - infrastructureRef + - kind + infrastructure_reference_name: + - spec + - infrastructureRef + - name kernel_version: - status - nodeInfo - kernelVersion - kubelet_version: - - status - - nodeInfo - - kubeletVersion kube_proxy_version: - status - nodeInfo - kubeProxyVersion + kubelet_version: + - status + - nodeInfo + - kubeletVersion os_image: - status - nodeInfo @@ -533,113 +456,46 @@ spec: version: - spec - version - bootstrap_reference_kind: - - spec - - bootstrap - - configRef - - kind - bootstrap_reference_name: - - spec - - bootstrap - - configRef - - name - infrastructure_reference_kind: - - spec - - infrastructureRef - - kind - infrastructure_reference_name: - - spec - - infrastructureRef - - name - control_plane_name: - - metadata - - labels - - cluster.x-k8s.io/control-plane-name - type: Info - - name: addresses - help: Address information about a machine. - each: - info: - path: - - status - - addresses - labelsFromPath: - type: - - type - address: - - address + path: null type: Info - - name: status_certificatesexpirydate - help: Information about certificate expiration date of a control plane node. - each: - gauge: - nilIsZero: true - path: - - status - - certificatesExpiryDate - type: Gauge - - name: status_noderef - help: Information about the node reference of a machine. - each: + help: Information about a machine. + name: info + - each: info: labelsFromPath: - node_name: - - status - - nodeRef + owner_is_controller: + - controller + owner_kind: + - kind + owner_name: - name - node_uid: - - status - - nodeRef + owner_uid: - uid - type: Info - - name: status_phase - help: The machines current phase. - each: - stateSet: - labelName: phase - list: - - Pending - - Provisioning - - Provisioned - - Running - - Deleting - - Deleted - - Failed - - Unknown path: - - status - - phase - type: StateSet - - name: created - help: Unix creation timestamp. - each: + - metadata + - ownerReferences + type: Info + help: Owner references. + name: owner + - each: gauge: + nilIsZero: true path: - - metadata - - creationTimestamp + - status + - certificatesExpiryDate + valueFrom: null type: Gauge - - name: annotation_paused - help: Whether the machine is paused and any of its resources will not be processed by the controllers. - each: - info: - path: - - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] - type: Info - - name: status_condition - help: The condition of a machine. - each: + help: Information about certificate expiration date of a control plane node. + name: status_certificatesexpirydate + - each: stateSet: labelName: status labelsFromPath: type: - type list: - - 'True' - - 'False' + - "True" + - "False" - Unknown path: - status @@ -647,39 +503,61 @@ spec: valueFrom: - status type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a machine. - each: + help: The condition of a machine. + name: status_condition + - each: gauge: labelsFromPath: - type: - - type status: - status + type: + - type + nilIsZero: false path: - status - conditions valueFrom: - lastTransitionTime type: Gauge - - name: owner - help: Owner references. - each: + help: The condition last transition time of a machine. + name: status_condition_last_transition_time + - each: info: labelsFromPath: - owner_is_controller: - - controller - owner_kind: - - kind - owner_name: + node_name: + - status + - nodeRef - name - owner_uid: + node_uid: + - status + - nodeRef - uid - path: - - metadata - - ownerReferences + path: null type: Info - - groupVersionKind: + help: Information about the node reference of a machine. + name: status_noderef + - each: + stateSet: + labelName: phase + list: + - Pending + - Provisioning + - Provisioned + - Running + - Deleting + - Deleted + - Failed + - Unknown + path: + - status + - phase + valueFrom: null + type: StateSet + help: The machines current phase. + name: status_phase + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: group: cluster.x-k8s.io kind: MachineDeployment version: v1beta1 @@ -698,18 +576,33 @@ spec: - uid metricNamePrefix: capi_machinedeployment metrics: - - name: info - help: Information about a machinedeployment. - each: + - each: info: labelsFromPath: - version: - - spec - - template - - spec - - version - bootstrap_reference_kind: - - spec + paused_value: [] + path: + - metadata + - annotations + - cluster.x-k8s.io/paused + type: Info + help: Whether the machinedeployment is paused and any of its resources will + not be processed by the controllers. + name: annotation_paused + - each: + gauge: + nilIsZero: false + path: + - metadata + - creationTimestamp + valueFrom: null + type: Gauge + help: Unix creation timestamp. + name: created + - each: + info: + labelsFromPath: + bootstrap_reference_kind: + - spec - template - spec - bootstrap @@ -734,47 +627,113 @@ spec: - spec - infrastructureRef - name + version: + - spec + - template + - spec + - version + path: null + type: Info + help: Information about a machinedeployment. + name: info + - each: + info: + labelsFromPath: + owner_is_controller: + - controller + owner_kind: + - kind + owner_name: + - name + owner_uid: + - uid + path: + - metadata + - ownerReferences type: Info - - name: spec_paused - help: Whether the machinedeployment is paused and any of its resources will not be processed by the controllers. - each: + help: Owner references. + name: owner + - each: gauge: nilIsZero: true path: - spec - paused + valueFrom: null type: Gauge - - name: spec_replicas - help: The number of desired machines for a machinedeployment. - each: + help: Whether the machinedeployment is paused and any of its resources will + not be processed by the controllers. + name: spec_paused + - each: gauge: + nilIsZero: false path: - spec - replicas + valueFrom: null type: Gauge - - name: spec_strategy_rollingupdate_max_surge - help: Maximum number of replicas that can be scheduled above the desired number of replicas during a rolling update of a machinedeployment. - each: + help: The number of desired machines for a machinedeployment. + name: spec_replicas + - each: gauge: + nilIsZero: false path: - spec - strategy - rollingUpdate - maxSurge + valueFrom: null type: Gauge - - name: spec_strategy_rollingupdate_max_unavailable - help: Maximum number of unavailable replicas during a rolling update of a machinedeployment. - each: + help: Maximum number of replicas that can be scheduled above the desired number + of replicas during a rolling update of a machinedeployment. + name: spec_strategy_rollingupdate_max_surge + - each: gauge: + nilIsZero: false path: - spec - strategy - rollingUpdate - maxUnavailable + valueFrom: null type: Gauge - - name: status_phase - help: The machinedeployments current phase. - each: + help: Maximum number of unavailable replicas during a rolling update of a machinedeployment. + name: spec_strategy_rollingupdate_max_unavailable + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - conditions + valueFrom: + - status + type: StateSet + help: The condition of a machinedeployment. + name: status_condition + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The condition last transition time of a machinedeployment. + name: status_condition_last_transition_time + - each: stateSet: labelName: phase list: @@ -786,122 +745,63 @@ spec: path: - status - phase + valueFrom: null type: StateSet - - name: status_replicas - help: The number of replicas per machinedeployment. - each: + help: The machinedeployments current phase. + name: status_phase + - each: gauge: + nilIsZero: true path: - status - replicas - nilIsZero: true + valueFrom: null type: Gauge - - name: status_replicas_available - help: The number of available replicas per machinedeployment. - each: + help: The number of replicas per machinedeployment. + name: status_replicas + - each: gauge: + nilIsZero: true path: - status - availableReplicas - nilIsZero: true + valueFrom: null type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per machinedeployment. - each: + help: The number of available replicas per machinedeployment. + name: status_replicas_available + - each: gauge: + nilIsZero: true path: - status - readyReplicas - nilIsZero: true + valueFrom: null type: Gauge - - name: status_replicas_unavailable - help: The number of unavailable replicas per machinedeployment. - each: + help: The number of ready replicas per machinedeployment. + name: status_replicas_ready + - each: gauge: + nilIsZero: true path: - status - unavailableReplicas - nilIsZero: true + valueFrom: null type: Gauge - - name: status_replicas_updated - help: The number of updated replicas per machinedeployment. - each: + help: The number of unavailable replicas per machinedeployment. + name: status_replicas_unavailable + - each: gauge: - path: - - status - - updatedReplicas nilIsZero: true - type: Gauge - - name: created - help: Unix creation timestamp. - each: - gauge: - path: - - metadata - - creationTimestamp - type: Gauge - - name: annotation_paused - help: Whether the machinedeployment is paused and any of its resources will not be processed by the controllers. - each: - info: - path: - - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] - type: Info - - name: status_condition - help: The condition of a machinedeployment. - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - 'True' - - 'False' - - Unknown - path: - - status - - conditions - valueFrom: - - status - type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a machinedeployment. - each: - gauge: - labelsFromPath: - type: - - type - status: - - status path: - status - - conditions - valueFrom: - - lastTransitionTime + - updatedReplicas + valueFrom: null type: Gauge - - name: owner - help: Owner references. - each: - info: - labelsFromPath: - owner_is_controller: - - controller - owner_kind: - - kind - owner_name: - - name - owner_uid: - - uid - path: - - metadata - - ownerReferences - type: Info - - groupVersionKind: + help: The number of updated replicas per machinedeployment. + name: status_replicas_updated + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: group: cluster.x-k8s.io kind: MachineHealthCheck version: v1beta1 @@ -920,70 +820,64 @@ spec: - uid metricNamePrefix: capi_machinehealthcheck metrics: - - name: info - help: Information about a machinehealthcheck. - each: + - each: info: - # TODO: added metadata.name even it's already defined above as the metric doesn't work with empty labelsFromPath. labelsFromPath: - name: - - metadata - - name - type: Info - - name: status_current_healthy - help: Current number of healthy machines. - each: - gauge: - path: - - status - - currentHealthy - type: Gauge - - name: status_expected_machines - help: Total number of pods counted by this machinehealthcheck. - each: - gauge: - path: - - status - - expectedMachines - type: Gauge - - name: status_remediations_allowed - help: Number of machine remediations that are currently allowed. - each: - gauge: + paused_value: [] path: - - status - - remediationsAllowed - type: Gauge - - name: created - help: Unix creation timestamp. - each: + - metadata + - annotations + - cluster.x-k8s.io/paused + type: Info + help: Whether the machinehealthcheck is paused and any of its resources will + not be processed by the controllers. + name: annotation_paused + - each: gauge: + nilIsZero: false path: - metadata - creationTimestamp + valueFrom: null type: Gauge - - name: annotation_paused - help: Whether the machinehealthcheck is paused and any of its resources will not be processed by the controllers. - each: + help: Unix creation timestamp. + name: created + - each: + info: + labelsFromPath: + name: + - metadata + - name + path: null + type: Info + help: Information about a machinehealthcheck. + name: info + - each: info: + labelsFromPath: + owner_is_controller: + - controller + owner_kind: + - kind + owner_name: + - name + owner_uid: + - uid path: - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] + - ownerReferences type: Info - - name: status_condition - help: The condition of a machinehealthcheck. - each: + help: Owner references. + name: owner + - each: stateSet: labelName: status labelsFromPath: type: - type list: - - 'True' - - 'False' + - "True" + - "False" - Unknown path: - status @@ -991,41 +885,59 @@ spec: valueFrom: - status type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a machinehealthcheck. - each: + help: The condition of a machinehealthcheck. + name: status_condition + - each: gauge: labelsFromPath: - type: - - type status: - status + type: + - type + nilIsZero: false path: - status - conditions valueFrom: - lastTransitionTime type: Gauge - - name: owner - help: Owner references. - each: - info: - labelsFromPath: - owner_is_controller: - - controller - owner_kind: - - kind - owner_name: - - name - owner_uid: - - uid + help: The condition last transition time of a machinehealthcheck. + name: status_condition_last_transition_time + - each: + gauge: + nilIsZero: false path: - - metadata - - ownerReferences - type: Info - - groupVersionKind: + - status + - currentHealthy + valueFrom: null + type: Gauge + help: Current number of healthy machines. + name: status_current_healthy + - each: + gauge: + nilIsZero: false + path: + - status + - expectedMachines + valueFrom: null + type: Gauge + help: Total number of pods counted by this machinehealthcheck. + name: status_expected_machines + - each: + gauge: + nilIsZero: false + path: + - status + - remediationsAllowed + valueFrom: null + type: Gauge + help: Number of machine remediations that are currently allowed. + name: status_remediations_allowed + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: group: cluster.x-k8s.io - kind: MachineSet + kind: MachinePool version: v1beta1 labelsFromPath: cluster_name: @@ -1040,32 +952,52 @@ spec: uid: - metadata - uid - metricNamePrefix: capi_machineset + metricNamePrefix: capi_machinepool metrics: - - name: info - help: Information about a machineset. - each: + - each: info: labelsFromPath: - version: - - spec - - template - - spec - - version - bootstrap_reference_kind: - - spec - - template - - spec - - bootstrap - - configRef - - kind - bootstrap_reference_name: - - spec - - template + paused_value: [] + path: + - metadata + - annotations + - cluster.x-k8s.io/paused + type: Info + help: Whether the machinepool is paused and any of its resources will not be + processed by the controllers. + name: annotation_paused + - each: + gauge: + nilIsZero: false + path: + - metadata + - creationTimestamp + valueFrom: null + type: Gauge + help: Unix creation timestamp. + name: created + - each: + info: + labelsFromPath: + bootstrap_configuration_reference_kind: + - spec + - template + - spec + - bootstrap + - configRef + - kind + bootstrap_configuration_reference_name: + - spec + - template - spec - bootstrap - configRef - name + failure_domain: + - spec + - template + - spec + - failureDomain infrastructure_reference_kind: - spec - template @@ -1078,81 +1010,51 @@ spec: - spec - infrastructureRef - name + version: + - spec + - template + - spec + - version + path: null type: Info - - name: spec_replicas - help: The number of desired machines for a machineset. - each: - gauge: - path: - - spec - - replicas - nilIsZero: true - type: Gauge - - name: status_replicas_available - help: The number of available replicas per machineset. - each: - gauge: - path: - - status - - availableReplicas - nilIsZero: true - type: Gauge - - name: status_replicas_fully_labeled - help: The number of fully labeled replicas per machineset. - each: - gauge: - path: - - status - - fullyLabeledReplicas - type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per machineset. - each: - gauge: + help: "" + name: info + - each: + info: + labelsFromPath: + owner_is_controller: + - controller + owner_kind: + - kind + owner_name: + - name + owner_uid: + - uid path: - - status - - readyReplicas - nilIsZero: true - type: Gauge - - name: status_replicas - help: The number of replicas per machineset. - each: + - metadata + - ownerReferences + type: Info + help: Owner references. + name: owner + - each: gauge: + nilIsZero: false path: - - status + - spec - replicas - nilIsZero: true - type: Gauge - - name: created - help: Unix creation timestamp. - each: - gauge: - path: - - metadata - - creationTimestamp + valueFrom: null type: Gauge - - name: annotation_paused - help: Whether the machineset is paused and any of its resources will not be processed by the controllers. - each: - info: - path: - - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] - type: Info - - name: status_condition - help: The condition of a machineset. - each: + help: The number of desired machines for a machinepool. + name: spec_replicas + - each: stateSet: labelName: status labelsFromPath: type: - type list: - - 'True' - - 'False' + - "True" + - "False" - Unknown path: - status @@ -1160,187 +1062,197 @@ spec: valueFrom: - status type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a machineset. - each: + help: The condition of a machinepool. + name: status_condition + - each: gauge: labelsFromPath: - type: - - type status: - status + type: + - type + nilIsZero: false path: - status - conditions valueFrom: - lastTransitionTime type: Gauge - - name: owner - help: Owner references. - each: - info: - labelsFromPath: - owner_is_controller: - - controller - owner_kind: - - kind - owner_name: - - name - owner_uid: - - uid + help: The condition last transition time of a machinepool. + name: status_condition_last_transition_time + - each: + stateSet: + labelName: phase + list: + - ScalingUp + - ScalingDown + - Running + - Failed + - Unknown path: - - metadata - - ownerReferences - type: Info - - groupVersionKind: - group: cluster.x-k8s.io - kind: MachinePool - version: v1beta1 - labelsFromPath: - cluster_name: - - spec - - clusterName - name: - - metadata - - name - namespace: - - metadata - - namespace - uid: - - metadata - - uid - metricNamePrefix: capi_machinepool - metrics: - - name: spec_replicas - help: The number of desired machines for a machinepool. - each: + - status + - phase + valueFrom: null + type: StateSet + help: The machinepools current phase. + name: status_phase + - each: gauge: + nilIsZero: true path: - - spec + - status - replicas + valueFrom: null type: Gauge - - name: status_replicas help: The number of replicas per machinepool. - each: + name: status_replicas + - each: gauge: + nilIsZero: true path: - status - - replicas - nilIsZero: true + - availableReplicas + valueFrom: null type: Gauge - - name: status_replicas_ready - help: The number of ready replicas per machinepool. - each: + help: The number of available replicas per machinepool. + name: status_replicas_available + - each: gauge: + nilIsZero: true path: - status - readyReplicas - nilIsZero: true + valueFrom: null type: Gauge - - name: status_replicas_available - help: The number of available replicas per machinepool. - each: + help: The number of ready replicas per machinepool. + name: status_replicas_ready + - each: gauge: + nilIsZero: true path: - status - - availableReplicas - nilIsZero: true + - unavailableReplicas + valueFrom: null type: Gauge - - name: status_replicas_unavailable help: The number of unavailable replicas per machinepool. - each: + name: status_replicas_unavailable + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: cluster.x-k8s.io + kind: MachineSet + version: v1beta1 + labelsFromPath: + cluster_name: + - spec + - clusterName + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_machineset + metrics: + - each: + info: + labelsFromPath: + paused_value: [] + path: + - metadata + - annotations + - cluster.x-k8s.io/paused + type: Info + help: Whether the machineset is paused and any of its resources will not be + processed by the controllers. + name: annotation_paused + - each: gauge: + nilIsZero: false path: - - status - - unavailableReplicas - nilIsZero: true + - metadata + - creationTimestamp + valueFrom: null type: Gauge - - name: info - each: - type: Info + help: Unix creation timestamp. + name: created + - each: info: labelsFromPath: - infrastructure_reference_name: - - spec - - template - - spec - - infrastructureRef - - name - infrastructure_reference_kind: + bootstrap_reference_kind: - spec - template - spec - - infrastructureRef + - bootstrap + - configRef - kind - bootstrap_configuration_reference_name: + bootstrap_reference_name: - spec - template - spec - bootstrap - configRef - name - bootstrap_configuration_reference_kind: + infrastructure_reference_kind: - spec - template - spec - - bootstrap - - configRef + - infrastructureRef - kind - failure_domain: + infrastructure_reference_name: - spec - template - spec - - failureDomain + - infrastructureRef + - name version: - spec - template - spec - version - - name: status_phase - help: The machinepools current phase. - each: - stateSet: - labelName: phase - list: - - ScalingUp - - ScalingDown - - Running - - Failed - - Unknown - path: - - status - - phase - type: StateSet - - name: created - help: Unix creation timestamp. - each: - gauge: - path: - - metadata - - creationTimestamp - type: Gauge - - name: annotation_paused - help: Whether the machinepool is paused and any of its resources will not be processed by the controllers. - each: + path: null + type: Info + help: Information about a machineset. + name: info + - each: info: + labelsFromPath: + owner_is_controller: + - controller + owner_kind: + - kind + owner_name: + - name + owner_uid: + - uid path: - metadata - - annotations - - cluster.x-k8s.io/paused - labelsFromPath: - paused_value: [] + - ownerReferences type: Info - - name: status_condition - help: The condition of a machinepool. - each: + help: Owner references. + name: owner + - each: + gauge: + nilIsZero: true + path: + - spec + - replicas + valueFrom: null + type: Gauge + help: The number of desired machines for a machineset. + name: spec_replicas + - each: stateSet: labelName: status labelsFromPath: type: - type list: - - 'True' - - 'False' + - "True" + - "False" - Unknown path: - status @@ -1348,24 +1260,120 @@ spec: valueFrom: - status type: StateSet - - name: status_condition_last_transition_time - help: The condition last transition time of a machinepool. - each: + help: The condition of a machineset. + name: status_condition + - each: gauge: labelsFromPath: - type: - - type status: - status + type: + - type + nilIsZero: false path: - status - conditions valueFrom: - lastTransitionTime type: Gauge - - name: owner - help: Owner references. - each: + help: The condition last transition time of a machineset. + name: status_condition_last_transition_time + - each: + gauge: + nilIsZero: true + path: + - status + - replicas + valueFrom: null + type: Gauge + help: The number of replicas per machineset. + name: status_replicas + - each: + gauge: + nilIsZero: true + path: + - status + - availableReplicas + valueFrom: null + type: Gauge + help: The number of available replicas per machineset. + name: status_replicas_available + - each: + gauge: + nilIsZero: false + path: + - status + - fullyLabeledReplicas + valueFrom: null + type: Gauge + help: The number of fully labeled replicas per machineset. + name: status_replicas_fully_labeled + - each: + gauge: + nilIsZero: true + path: + - status + - readyReplicas + valueFrom: null + type: Gauge + help: The number of ready replicas per machineset. + name: status_replicas_ready + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: controlplane.cluster.x-k8s.io + kind: KubeadmControlPlane + version: v1beta1 + labelsFromPath: + cluster_name: + - metadata + - ownerReferences + - '[kind=Cluster]' + - name + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_kubeadmcontrolplane + metrics: + - each: + info: + labelsFromPath: + paused_value: [] + path: + - metadata + - annotations + - cluster.x-k8s.io/paused + type: Info + help: Whether the kubeadmcontrolplane is paused and any of its resources will + not be processed by the controllers. + name: annotation_paused + - each: + gauge: + nilIsZero: false + path: + - metadata + - creationTimestamp + valueFrom: null + type: Gauge + help: Unix creation timestamp. + name: created + - each: + info: + labelsFromPath: + version: + - spec + - version + path: null + type: Info + help: Information about a kubeadmcontrolplane. + name: info + - each: info: labelsFromPath: owner_is_controller: @@ -1380,3 +1388,104 @@ spec: - metadata - ownerReferences type: Info + help: Owner references. + name: owner + - each: + gauge: + nilIsZero: false + path: + - spec + - replicas + valueFrom: null + type: Gauge + help: The number of desired machines for a kubeadmcontrolplane. + name: spec_replicas + - each: + gauge: + nilIsZero: false + path: + - spec + - rolloutStrategy + - rollingUpdate + - maxSurge + valueFrom: null + type: Gauge + help: Maximum number of replicas that can be scheduled above the desired number + of replicas during a rolling update of a kubeadmcontrolplane. + name: spec_strategy_rollingupdate_max_surge + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - conditions + valueFrom: + - status + type: StateSet + help: The condition of a kubeadmcontrolplane. + name: status_condition + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The condition last transition time of a kubeadmcontrolplane. + name: status_condition_last_transition_time + - each: + gauge: + nilIsZero: true + path: + - status + - replicas + valueFrom: null + type: Gauge + help: The number of replicas per kubeadmcontrolplane. + name: status_replicas + - each: + gauge: + nilIsZero: true + path: + - status + - readyReplicas + valueFrom: null + type: Gauge + help: The number of ready replicas per kubeadmcontrolplane. + name: status_replicas_ready + - each: + gauge: + nilIsZero: true + path: + - status + - unavailableReplicas + valueFrom: null + type: Gauge + help: The number of unavailable replicas per kubeadmcontrolplane. + name: status_replicas_unavailable + - each: + gauge: + nilIsZero: true + path: + - status + - updatedReplicas + valueFrom: null + type: Gauge + help: The number of updated replicas per kubeadmcontrolplane. + name: status_replicas_updated + resourcePlural: "" + From d4cbd490e0f3959233983ded8dd48d766d2d58ad Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Fri, 30 Aug 2024 10:57:25 +0200 Subject: [PATCH 05/14] metrics: adjust generate-metrics-config to use controller-gen --- Makefile | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 5a2790b753c4..c0ea9dcba8f4 100644 --- a/Makefile +++ b/Makefile @@ -618,18 +618,12 @@ generate-e2e-templates-main: $(KUSTOMIZE) $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/clusterclass-quick-start-kcp-only --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/clusterclass-quick-start-kcp-only.yaml .PHONY: generate-metrics-config -generate-metrics-config: ## Generate ./config/metrics/crd-metrics-config.yaml - OUTPUT_FILE="./config/metrics/crd-metrics-config.yaml"; \ - METRIC_TEMPLATES_DIR="./config/metrics/templates"; \ - echo "# This file was auto-generated via: make generate-metrics-config" > "$${OUTPUT_FILE}"; \ - cat "$${METRIC_TEMPLATES_DIR}/header.yaml" >> "$${OUTPUT_FILE}"; \ - for resource in clusterclass cluster kubeadmcontrolplane kubeadmconfig machine machinedeployment machinehealthcheck machineset machinepool; do \ - cat "$${METRIC_TEMPLATES_DIR}/$${resource}.yaml"; \ - sed 's/$${RESOURCE}/'$${resource}'/g' "$${METRIC_TEMPLATES_DIR}/common_metrics.yaml"; \ - if [[ "$${resource}" != "cluster" ]]; then \ - cat "$${METRIC_TEMPLATES_DIR}/owner_metric.yaml"; \ - fi \ - done >> "$${OUTPUT_FILE}"; \ +generate-metrics-config: $(CONTROLLER_GEN) ## Generate ./config/metrics/crd-metrics-config.yaml + $(CONTROLLER_GEN) metrics output:metrics:dir=./config/metrics \ + paths=./api/... \ + paths=./controlplane/kubeadm/api/... \ + paths=./bootstrap/kubeadm/api/... \ + paths=./exp/api/... .PHONY: generate-diagrams generate-diagrams: ## Generate diagrams for *.plantuml files From 1d270f64e587f7bc2b71942c80b305d98737e931 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Fri, 30 Aug 2024 11:15:23 +0200 Subject: [PATCH 06/14] DROPME: use controller-gen from fork --- Makefile | 6 ++- scripts/go_install_fork.sh | 85 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 2 deletions(-) create mode 100755 scripts/go_install_fork.sh diff --git a/Makefile b/Makefile index c0ea9dcba8f4..67103f1c41f2 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,7 @@ CAPD_DIR := $(TEST_DIR)/infrastructure/docker CAPIM_DIR := $(TEST_DIR)/infrastructure/inmemory TEST_EXTENSION_DIR := $(TEST_DIR)/extension GO_INSTALL := ./scripts/go_install.sh +GO_INSTALL_FORK := ./scripts/go_install_fork.sh OBSERVABILITY_DIR := hack/observability export PATH := $(abspath $(TOOLS_BIN_DIR)):$(PATH) @@ -112,10 +113,11 @@ SETUP_ENVTEST_BIN := setup-envtest SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER)) SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest -CONTROLLER_GEN_VER := v0.17.2 +CONTROLLER_GEN_VER := 28f149a996f13a897b7b60ad18f4080b9a183ff9 CONTROLLER_GEN_BIN := controller-gen CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)) CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen +CONTROLLER_GEN_PKG_REPLACE := sigs.k8s.io/controller-tools=github.com/chrischdi/controller-tools GOTESTSUM_VER := v1.11.0 GOTESTSUM_BIN := gotestsum @@ -1405,7 +1407,7 @@ $(GOVULNCHECK_BIN): $(GOVULNCHECK) ## Build a local copy of govulncheck. $(IMPORT_BOSS_BIN): $(IMPORT_BOSS) $(CONTROLLER_GEN): # Build controller-gen from tools folder. - GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(CONTROLLER_GEN_PKG) $(CONTROLLER_GEN_BIN) $(CONTROLLER_GEN_VER) + GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL_FORK) $(CONTROLLER_GEN_PKG) $(CONTROLLER_GEN_BIN) $(CONTROLLER_GEN_VER) $(CONTROLLER_GEN_PKG_REPLACE) ## We are forcing a rebuilt of conversion-gen via PHONY so that we're always using an up-to-date version. ## We can't use a versioned name for the binary, because that would be reflected in generated files. diff --git a/scripts/go_install_fork.sh b/scripts/go_install_fork.sh new file mode 100755 index 000000000000..39204ad658ee --- /dev/null +++ b/scripts/go_install_fork.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +# Copyright 2021 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +if [ -z "${1}" ]; then + echo "must provide module as first parameter" + exit 1 +fi + +if [ -z "${2}" ]; then + echo "must provide binary name as second parameter" + exit 1 +fi + +if [ -z "${3}" ]; then + echo "must provide version as third parameter" + exit 1 +fi + +if [ -z "${4}" ]; then + echo "must provide the replace parameter as third parameter" + exit 1 +fi + +if [ -z "${GOBIN}" ]; then + echo "GOBIN is not set. Must set GOBIN to install the bin in a specified directory." + exit 1 +fi + +rm -f "${GOBIN}/${2}"* || true + +export GOWORK="off" + +ORIGINAL_WORKDIR="$(pwd)" +TMP_MODULE_DIR="${2}.tmp" + +# Create TMP_MODULE_DIR to create a go module for building the binary. +# This is required because CAPI's hack/tools is not compatible to `go install`. +rm -r "${TMP_MODULE_DIR}" || true +mkdir -p "${TMP_MODULE_DIR}" +cd "${TMP_MODULE_DIR}" + +# Initialize a go module and place a tools.go file for building the binary. +go mod init "tools" + +# Set a replace from the original module to the fork +go mod edit -replace "${4}@${3}" + +# Create go file which imports the required package and resolve dependencies. +cat << EOF > tools.go +//go:build tools +// +build tools +package tools + +import ( + _ "${1}" +) +EOF + +go mod tidy + +# Build the binary. +go build -tags=tools -o "${GOBIN}/${2}-${3}" "${1}" + +# Get back to the original directory and cleanup the temporary directory. +cd "${ORIGINAL_WORKDIR}" +rm -r "${TMP_MODULE_DIR}" + +# Link the unversioned name to the versioned binary. +ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}" From 560dd76554cd1db4a25b3133f733684dbf93b33b Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Fri, 30 Aug 2024 12:26:03 +0200 Subject: [PATCH 07/14] metrics: regenerate --- config/metrics/metrics.yaml | 353 ++++++++++++++++++++++++++++++++++-- config/metrics/rbac.yaml | 22 +-- 2 files changed, 350 insertions(+), 25 deletions(-) diff --git a/config/metrics/metrics.yaml b/config/metrics/metrics.yaml index 391aa77a1663..f7f87c33b4c1 100644 --- a/config/metrics/metrics.yaml +++ b/config/metrics/metrics.yaml @@ -1,3 +1,7 @@ +# Generated by controller-gen version v0.0.0-00010101000000-000000000000 +# Generated based on types for kube-state-metrics v2.13.0 +--- +kind: CustomResourceStateMetrics spec: resources: - errorLogV: 0 @@ -104,6 +108,42 @@ spec: type: Gauge help: The condition last transition time of a kubeadmconfig. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a kubeadmconfig. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a kubeadmconfig. + name: status_condition_v1beta2_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -228,6 +268,42 @@ spec: type: Gauge help: The condition last transition time of a cluster. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a cluster. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a cluster. + name: status_condition_v1beta2_last_transition_time - each: stateSet: labelName: phase @@ -346,6 +422,42 @@ spec: type: Gauge help: The condition last transition time of a clusterclass. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a clusterclass. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a clusterclass. + name: status_condition_v1beta2_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -521,18 +633,52 @@ spec: type: Gauge help: The condition last transition time of a machine. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a machine. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a machine. + name: status_condition_v1beta2_last_transition_time - each: info: labelsFromPath: node_name: - - status - - nodeRef - name node_uid: - - status - - nodeRef - uid - path: null + path: + - status + - nodeRef type: Info help: Information about the node reference of a machine. name: status_noderef @@ -733,6 +879,42 @@ spec: type: Gauge help: The condition last transition time of a machinedeployment. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a machinedeployment. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a machinedeployment. + name: status_condition_v1beta2_last_transition_time - each: stateSet: labelName: phase @@ -845,9 +1027,9 @@ spec: - each: info: labelsFromPath: - name: - - metadata - - name + maxUnhealthy: + - spec + - maxUnhealthy path: null type: Info help: Information about a machinehealthcheck. @@ -903,11 +1085,47 @@ spec: type: Gauge help: The condition last transition time of a machinehealthcheck. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a machinehealthcheck. + name: status_condition_v1beta2 - each: gauge: + labelsFromPath: + status: + - status + type: + - type nilIsZero: false path: - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a machinehealthcheck. + name: status_condition_v1beta2_last_transition_time + - each: + gauge: + nilIsZero: true + path: + - status - currentHealthy valueFrom: null type: Gauge @@ -915,17 +1133,17 @@ spec: name: status_current_healthy - each: gauge: - nilIsZero: false + nilIsZero: true path: - status - expectedMachines valueFrom: null type: Gauge - help: Total number of pods counted by this machinehealthcheck. + help: Total number of machines counted by this machinehealthcheck. name: status_expected_machines - each: gauge: - nilIsZero: false + nilIsZero: true path: - status - remediationsAllowed @@ -1017,7 +1235,7 @@ spec: - version path: null type: Info - help: "" + help: Information about a machinepool. name: info - each: info: @@ -1080,6 +1298,42 @@ spec: type: Gauge help: The condition last transition time of a machinepool. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a machinepool. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a machinepool. + name: status_condition_v1beta2_last_transition_time - each: stateSet: labelName: phase @@ -1278,6 +1532,42 @@ spec: type: Gauge help: The condition last transition time of a machineset. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a machineset. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a machineset. + name: status_condition_v1beta2_last_transition_time - each: gauge: nilIsZero: true @@ -1300,7 +1590,7 @@ spec: name: status_replicas_available - each: gauge: - nilIsZero: false + nilIsZero: true path: - status - fullyLabeledReplicas @@ -1447,6 +1737,42 @@ spec: type: Gauge help: The condition last transition time of a kubeadmcontrolplane. name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a kubeadmcontrolplane. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a kubeadmcontrolplane. + name: status_condition_v1beta2_last_transition_time - each: gauge: nilIsZero: true @@ -1488,4 +1814,3 @@ spec: help: The number of updated replicas per kubeadmcontrolplane. name: status_replicas_updated resourcePlural: "" - diff --git a/config/metrics/rbac.yaml b/config/metrics/rbac.yaml index bcd5bde16ba3..bed50b0a70a0 100644 --- a/config/metrics/rbac.yaml +++ b/config/metrics/rbac.yaml @@ -2,20 +2,28 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: kube-state-metrics-custom-resource-capi labels: kube-state-metrics/aggregate-to-manager: "true" + name: manager-metrics-role rules: +- apiGroups: + - bootstrap.cluster.x-k8s.io + resources: + - kubeadmconfigs + verbs: + - get + - list + - watch - apiGroups: - cluster.x-k8s.io resources: - clusterclasses - clusters - machinedeployments + - machinehealthchecks - machinepools - - machinesets - machines - - machinehealthchecks + - machinesets verbs: - get - list @@ -28,11 +36,3 @@ rules: - get - list - watch -- apiGroups: - - bootstrap.cluster.x-k8s.io - resources: - - kubeadmconfigs - verbs: - - get - - list - - watch From 179e183239a1bda4f7ac2d2d0ae1abb5b8bab9a9 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 15:35:34 +0100 Subject: [PATCH 08/14] fixup! DROPME: use controller-gen from fork --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 67103f1c41f2..3645a71a4b54 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ SETUP_ENVTEST_BIN := setup-envtest SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER)) SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest -CONTROLLER_GEN_VER := 28f149a996f13a897b7b60ad18f4080b9a183ff9 +CONTROLLER_GEN_VER := 8e10d2c621f3468a5570bfcc9f49ca3a39001872 CONTROLLER_GEN_BIN := controller-gen CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)) CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen @@ -1407,7 +1407,7 @@ $(GOVULNCHECK_BIN): $(GOVULNCHECK) ## Build a local copy of govulncheck. $(IMPORT_BOSS_BIN): $(IMPORT_BOSS) $(CONTROLLER_GEN): # Build controller-gen from tools folder. - GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL_FORK) $(CONTROLLER_GEN_PKG) $(CONTROLLER_GEN_BIN) $(CONTROLLER_GEN_VER) $(CONTROLLER_GEN_PKG_REPLACE) + GOTOOLCHAIN=go1.24.1 GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL_FORK) $(CONTROLLER_GEN_PKG) $(CONTROLLER_GEN_BIN) $(CONTROLLER_GEN_VER) $(CONTROLLER_GEN_PKG_REPLACE) ## We are forcing a rebuilt of conversion-gen via PHONY so that we're always using an up-to-date version. ## We can't use a versioned name for the binary, because that would be reflected in generated files. From 3b9b68f58bed47b79daae8d6d1cf885136b8fc05 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 16:05:54 +0100 Subject: [PATCH 09/14] first step for v1beta2 dashboards --- hack/observability/grafana/chart/values.yaml | 10 + .../cluster-api-performance-v1beta2.json | 5104 +++++++++++++++++ .../dashboards/cluster-api-state-v1beta2.json | 3373 +++++++++++ hack/observability/grafana/kustomization.yaml | 6 + 4 files changed, 8493 insertions(+) create mode 100644 hack/observability/grafana/dashboards/cluster-api-performance-v1beta2.json create mode 100644 hack/observability/grafana/dashboards/cluster-api-state-v1beta2.json diff --git a/hack/observability/grafana/chart/values.yaml b/hack/observability/grafana/chart/values.yaml index a9411253874c..41fcd5510ac2 100644 --- a/hack/observability/grafana/chart/values.yaml +++ b/hack/observability/grafana/chart/values.yaml @@ -119,6 +119,16 @@ extraConfigmapMounts: mountPath: /var/lib/grafana/dashboards/default/runtime-extensions.json subPath: runtime-extensions.json optional: false +- name: grafana-dashboard-cluster-api-performance-v1beta2 + configMap: grafana-dashboard-cluster-api-performance-v1beta2 + mountPath: /var/lib/grafana/dashboards/default/cluster-api-performance-v1beta2.json + subPath: cluster-api-performance-v1beta2.json + optional: false +- name: grafana-dashboard-cluster-api-state-v1beta2 + configMap: grafana-dashboard-cluster-api-state-v1beta2 + mountPath: /var/lib/grafana/dashboards/default/cluster-api-state-v1beta2.json + subPath: cluster-api-state-v1beta2.json + optional: false # Disable grafana test framework testFramework: diff --git a/hack/observability/grafana/dashboards/cluster-api-performance-v1beta2.json b/hack/observability/grafana/dashboards/cluster-api-performance-v1beta2.json new file mode 100644 index 000000000000..a609a985ced4 --- /dev/null +++ b/hack/observability/grafana/dashboards/cluster-api-performance-v1beta2.json @@ -0,0 +1,5104 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 2, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 28, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 29, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_clusterclass_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# ClusterClass", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 30, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_cluster_info{name=~\"${Cluster:pipe}\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# Cluster", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 31, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_kubeadmcontrolplane_info{cluster_name=~\"${Cluster:pipe}\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# KubeadmControlPlane", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 9, + "y": 1 + }, + "id": 32, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinedeployment_info{cluster_name=~\"${Cluster:pipe}\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# MachineDeployment", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 1 + }, + "id": 33, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machineset_info{cluster_name=~\"${Cluster:pipe}\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# MachineSet", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 15, + "y": 1 + }, + "id": 34, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinepool_info{cluster_name=~\"${Cluster:pipe}\"})", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "# MachinePool", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 18, + "y": 1 + }, + "id": 35, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machine_info{cluster_name=~\"${Cluster:pipe}\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# Machine", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 21, + "y": 1 + }, + "id": 36, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinehealthcheck_info{cluster_name=~\"${Cluster:pipe}\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# MachineHealthCheck", + "type": "stat" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 7, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 5, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\")) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Cluster time until last Machine NodeHealthy since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 4, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Cluster time until InfrastructureReady since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 6, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Cluster time until ControlPlaneReady since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 38, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"})", + "legendFormat": "until InfrastructureReady since creationTimestamp", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"})", + "hide": false, + "legendFormat": "until ControlPlaneReady since creationTimestamp", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "hide": false, + "legendFormat": "until last Machine NodeHealthy since creationTimestamp", + "range": true, + "refId": "C" + } + ], + "title": "Average time", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Creation Timestamp" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\")) by (name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(capi_cluster_info{name=~\"${Cluster:pipe}\"} * on(name) group_right () label_replace(capi_machine_info{control_plane_name!=\"\"}, \"name\", \"$0\", \"cluster_name\", \".*\")) by(name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(capi_cluster_info{name=~\"${Cluster:pipe}\"} * on(name) group_right () label_replace(capi_machine_info{control_plane_name=\"\"}, \"name\", \"$0\", \"cluster_name\", \".*\")) by(name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name) * 1000", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "F" + } + ], + "title": "Cluster overview", + "transformations": [ + { + "id": "joinByField", + "options": { + "byField": "name", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Time 4": true, + "Time 5": true, + "Time 6": true, + "Value #B": false + }, + "indexByName": { + "Time 1": 4, + "Time 2": 6, + "Time 3": 8, + "Time 4": 10, + "Time 5": 11, + "Time 6": 12, + "Value #A": 5, + "Value #B": 7, + "Value #C": 9, + "Value #D": 1, + "Value #E": 2, + "Value #F": 3, + "name": 0 + }, + "renameByName": { + "Value": "Creation until InfrastructureReady", + "Value #A": "Time until InfrastructureReady", + "Value #B": "Time until ControlPlaneReady", + "Value #C": "Time until last Machine NodeHealthy", + "Value #D": "# CP", + "Value #E": "# Worker", + "Value #F": "Creation Timestamp", + "name": "Cluster Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 31 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Cluster time until condition first true since creationTimestamp (all)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 31 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg((min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h])>= time() - 60*5) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Cluster time until condition first true since creationTimestamp (last 5m)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name))", + "legendFormat": "Average", + "range": true, + "refId": "A" + } + ], + "title": "Cluster time until last Machine NodeHealthy since creationTimestamp (all)", + "type": "timeseries" + } + ], + "title": "Cluster", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 27, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 39, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_kubeadmcontrolplane_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () capi_kubeadmcontrolplane_created{cluster_name=~\"${Cluster:pipe}\"}) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "KubeadmControlPlane time until Ready since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 40, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_kubeadmcontrolplane_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () capi_kubeadmcontrolplane_created{cluster_name=~\"${Cluster:pipe}\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Average time until Ready since creationTimestamp", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Creation Timestamp" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 41, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_kubeadmcontrolplane_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () capi_kubeadmcontrolplane_created{cluster_name=~\"${Cluster:pipe}\"}) by (name)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(capi_kubeadmcontrolplane_created{cluster_name=~\"${Cluster:pipe}\"}) by (name) * 1000", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + } + ], + "title": "KubeadmControlPlane overview", + "transformations": [ + { + "id": "joinByField", + "options": { + "byField": "name", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Time 4": true, + "Value #B": false + }, + "indexByName": { + "Time 1": 2, + "Time 2": 4, + "Value #A": 3, + "Value #B": 1, + "name": 0 + }, + "renameByName": { + "Value": "Time until Ready", + "Value #A": "Time until Ready", + "Value #B": "Creation Timestamp", + "Value #C": "Time until last Machine NodeHealthy", + "Value #D": "# CP", + "Value #E": "# Worker", + "name": "KubeadmControlPlane Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 28 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_kubeadmcontrolplane_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_kubeadmcontrolplane_created{cluster_name=~\"${Cluster:pipe}\"}) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "KubeadmControlPlane time until condition first true since creationTimestamp (all)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 28 + }, + "id": 16, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg((min_over_time(capi_kubeadmcontrolplane_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h])>= time() - 60*5) - on(name) group_left () capi_kubeadmcontrolplane_created{cluster_name=~\"${Cluster:pipe}\"}) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "KubeadmControlPlane time until condition first true since creationTimestamp (last 5m)", + "type": "timeseries" + } + ], + "title": "KubeadmControlPlane", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 8, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 10, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Control Plane Machine time until NodeHealthy since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 11, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"BootstrapReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Control Plane Machine time until BootstrapReady since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 12, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Control Plane Machine time until InfrastructureReady since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 42, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"BootstrapReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name)))", + "legendFormat": "until BootstrapReady since creationTimestamp", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name)))", + "hide": false, + "legendFormat": "until InfrastructureReady since creationTimestamp", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name)))", + "hide": false, + "legendFormat": "until NodeHealthy since creationTimestamp", + "range": true, + "refId": "C" + } + ], + "title": "Average time", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Creation Timestamp" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 2, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"BootstrapReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (name)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right capi_machine_info{control_plane_name!=\"\"}) by (name) * 1000", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "D" + } + ], + "title": "Control Plane Machines Overview", + "transformations": [ + { + "id": "joinByField", + "options": { + "byField": "name", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Value #B": false + }, + "indexByName": { + "Time 1": 2, + "Time 2": 4, + "Time 3": 6, + "Time 4": 8, + "Value #A": 3, + "Value #B": 5, + "Value #C": 7, + "Value #D": 1, + "name": 0 + }, + "renameByName": { + "Value": "Creation until BootstrapReady", + "Value #A": "Time until BootstrapReady", + "Value #B": "Time until InfrastructureReady", + "Value #C": "Time until NodeHealthy", + "Value #D": "Creation Timestamp", + "name": "Machine Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 41 + }, + "id": 17, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Control Plane Machine time until condition first true since creationTimestamp (all)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 41 + }, + "id": 18, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg((min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h])>= time() - 60*5) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name!=\"\"}) by (name))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Control Plane Machine time until condition first true since creationTimestamp (last 5m)", + "type": "timeseries" + } + ], + "title": "Control Plane Machine", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 9, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 43, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Worker Machine time until NodeHealthy since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 44, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"BootstrapReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Worker Machine time until BootstrapReady since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 45, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Worker Machine time until InfrastructureReady since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 46, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"BootstrapReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name)))", + "legendFormat": "until BootstrapReady since creationTimestamp", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name)))", + "hide": false, + "legendFormat": "until InfrastructureReady since creationTimestamp", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name)))", + "hide": false, + "legendFormat": "until NodeHealthy since creationTimestamp", + "range": true, + "refId": "C" + } + ], + "title": "Average time", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Creation Timestamp" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 47, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"BootstrapReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (name)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"InfrastructureReady\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (name)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right capi_machine_info{control_plane_name=\"\"}) by (name) * 1000", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "D" + } + ], + "title": "Worker Machines Overview", + "transformations": [ + { + "id": "joinByField", + "options": { + "byField": "name", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Value #B": false + }, + "indexByName": { + "Time 1": 2, + "Time 2": 4, + "Time 3": 6, + "Time 4": 8, + "Value #A": 3, + "Value #B": 5, + "Value #C": 7, + "Value #D": 1, + "name": 0 + }, + "renameByName": { + "Value": "Creation until BootstrapReady", + "Value #A": "Time until BootstrapReady", + "Value #B": "Time until InfrastructureReady", + "Value #C": "Time until NodeHealthy", + "Value #D": "Creation Timestamp", + "name": "Machine Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Machine time until condition first true since creationTimestamp (all)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 42 + }, + "id": 20, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg((min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h])>= time() - 60*5) - on(name) group_left () (capi_machine_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right avg(capi_machine_info{control_plane_name=\"\"}) by (name))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Machine time until condition first true since creationTimestamp (last 5m)", + "type": "timeseries" + } + ], + "title": "Worker Machine", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 37, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 48, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name!=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Control Plane KubeadmConfig time until Ready since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 49, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name!=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name))))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Average time until Ready since creationTimestamp", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Creation Timestamp" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 50, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name!=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (name)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name!=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name))) by (name) * 1000", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + } + ], + "title": "Control Plane KubeadmConfig Overview", + "transformations": [ + { + "id": "joinByField", + "options": { + "byField": "name", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Value #B": false + }, + "indexByName": { + "Time 1": 2, + "Time 2": 4, + "Value #A": 3, + "Value #B": 1, + "name": 0 + }, + "renameByName": { + "Value": "Time until Ready", + "Value #A": "Time until Ready", + "Value #B": "Creation Timestamp", + "Value #C": "Time until NodeHealthy", + "name": "KubeadmConfig Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 31 + }, + "id": 21, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name!=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Control Plane KubeadmConfig time until condition first true since creationTimestamp (all)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 31 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg((min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h])>= time() - 60*5) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name!=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Control Plane KubeadmConfig time until condition first true since creationTimestamp (last 5m)", + "type": "timeseries" + } + ], + "title": "Control Plane KubeadmConfig", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 26, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 0, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 95 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 51, + "options": { + "barRadius": 0, + "barWidth": 0.9, + "fullHighlight": false, + "groupWidth": 1, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (name)", + "format": "time_series", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Worker KubeadmConfig time until Ready since creationTimestamp", + "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 52, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name))))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Average time until Ready since creationTimestamp", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Creation Timestamp" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 53, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"Ready\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (name)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name))) by (name) * 1000", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + } + ], + "title": "Worker KubeadmConfig Overview", + "transformations": [ + { + "id": "joinByField", + "options": { + "byField": "name", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Value #B": false + }, + "indexByName": { + "Time 1": 2, + "Time 2": 4, + "Value #A": 3, + "Value #B": 1, + "name": 0 + }, + "renameByName": { + "Value": "Time until Ready", + "Value #A": "Time until Ready", + "Value #B": "Creation Timestamp", + "Value #C": "Time until NodeHealthy", + "name": "KubeadmConfig Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker KubeadmConfig time until condition first true since creationTimestamp (all)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 24, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg((min_over_time(capi_kubeadmconfig_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h])>= time() - 60*5) - on(name) group_left () (capi_kubeadmconfig_created{cluster_name=~\"${Cluster:pipe}\"} * on (name) group_right () (avg(label_replace(capi_machine_info{control_plane_name=\"\"}, \"name\", \"$0\", \"bootstrap_reference_name\", \".*\")) by (name)))) by (type)", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker KubeadmConfig time until condition first true since creationTimestamp (last 5m)", + "type": "timeseries" + } + ], + "title": "Worker KubeadmConfig", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 54, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Delta first 10 to last 10" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 55, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "min(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "quantile(0.5, min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "quantile(0.9, min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "quantile(0.99, min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "stddev(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (type)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () bottomk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name))) by (type)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () topk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name))) by (type)\n", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () topk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name))) by (type) - avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () bottomk(10, avg(capi_cluster_created) by (name))) by (type)) / avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\"}[168h]) - on(name) group_left () bottomk(10, avg(capi_cluster_created) by (name))) by (type)\n", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "J" + } + ], + "title": "Cluster Time until Condition true since creationTimestamp", + "transformations": [ + { + "id": "joinByField", + "options": { + "byField": "type", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": { + "Time 2": "", + "Time 3": "", + "Time 4": "", + "Value #A": "Min", + "Value #B": "Max", + "Value #C": "Average", + "Value #D": "P50", + "Value #E": "P90", + "Value #F": "P99", + "Value #G": "Standard deviation", + "Value #H": "Average first 10", + "Value #I": "Average last 10", + "Value #J": "Delta first 10 to last 10", + "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () bottomk(10, avg(capi_cluster_created) by (name)))": "Average first 10", + "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created)": "Average", + "avg(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () topk(10, avg(capi_cluster_created) by (name)))\n": "Average last 10", + "max(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created)": "Max", + "min(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created)": "Min", + "quantile(0.5, min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created)": "P50", + "quantile(0.9, min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created)": "P90", + "quantile(0.99, min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created)": "P99", + "stddev(min_over_time(capi_cluster_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"ControlPlaneReady\"}[168h]) - on(name) group_left () capi_cluster_created)": "Standard deviation", + "type": "Type" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Delta first 10 to last 10" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 56, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "min(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "quantile(0.5, label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "quantile(0.9, label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "quantile(0.99, label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(capi_cluster_created{name=~\"${Cluster:pipe}\"}, \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(bottomk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)), \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(topk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)), \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(topk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)), \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\")) - avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(bottomk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)), \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))) / avg(label_replace(max(min_over_time(capi_machine_status_condition_v1beta2_last_transition_time{status=\"True\",type=\"NodeHealthy\"}[168h])) by (cluster_name) - on (cluster_name) label_replace(bottomk(10, avg(capi_cluster_created{name=~\"${Cluster:pipe}\"}) by (name)), \"cluster_name\", \"$0\", \"name\", \".*\") unless count(capi_machine_status_condition_v1beta2_last_transition_time{status=\"False\",type=\"NodeHealthy\"}) by (cluster_name), \"name\", \"$0\", \"cluster_name\", \".*\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "I" + } + ], + "title": "Cluster time until last Machine NodeHealthy since creationTimestamp", + "transformations": [ + { + "id": "joinByField", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": { + "Time": "", + "Value #A": "Min", + "Value #B": "Max", + "Value #C": "Average", + "Value #D": "P50", + "Value #E": "P90", + "Value #F": "P99", + "Value #G": "Average first 10", + "Value #H": "Average last 10", + "Value #I": "Delta first 10 to last 10" + } + } + } + ], + "type": "table" + } + ], + "title": "KPIs", + "type": "row" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": ".*", + "current": { + "selected": false, + "text": ".*", + "value": ".*" + }, + "description": "Cluster prefix to filter by", + "hide": 0, + "includeAll": true, + "label": "Cluster", + "multi": true, + "name": "Cluster", + "options": [ + { + "selected": false, + "text": "All", + "value": "$__all" + } + ], + "query": "", + "queryValue": ".*", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Cluster API Performance v1beta2", + "uid": "b2660352-4f3c-4024-837c-393d901e6982", + "version": 11, + "weekStart": "" +} diff --git a/hack/observability/grafana/dashboards/cluster-api-state-v1beta2.json b/hack/observability/grafana/dashboards/cluster-api-state-v1beta2.json new file mode 100644 index 000000000000..6985fb2ed732 --- /dev/null +++ b/hack/observability/grafana/dashboards/cluster-api-state-v1beta2.json @@ -0,0 +1,3373 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 26, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_clusterclass_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# ClusterClass", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_cluster_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# Cluster", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_kubeadmcontrolplane_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# KubeadmControlPlane", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 9, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinedeployment_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# MachineDeployment", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 1 + }, + "id": 5, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machineset_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# MachineSet", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 15, + "y": 1 + }, + "id": 7, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinepool_info)", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "# MachinePool", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 18, + "y": 1 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machine_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# Machine", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 21, + "y": 1 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinehealthcheck_info)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "# MachineHealthCheck", + "type": "stat" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 22, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_cluster_info)", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_cluster_status_condition_v1beta2{status=\"True\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_cluster_status_condition_v1beta2{status=\"False\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "Cluster by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 6 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_cluster_info) by (topology_version)", + "legendFormat": "{{topology_version}}", + "range": true, + "refId": "A" + } + ], + "title": "Cluster by version", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_cluster_status_phase == 1) by (phase)", + "legendFormat": "{{phase}}", + "range": true, + "refId": "A" + } + ], + "title": "Cluster by status phase", + "type": "timeseries" + } + ], + "title": "Cluster", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 21, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 7 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_kubeadmcontrolplane_info)", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_kubeadmcontrolplane_status_condition_v1beta2{status=\"True\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_kubeadmcontrolplane_status_condition_v1beta2{status=\"False\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "KubeadmControlPlane by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 7 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_kubeadmcontrolplane_info) by (version)", + "legendFormat": "{{version}}", + "range": true, + "refId": "A" + } + ], + "title": "KubeadmControlPlane by version", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 7 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_kubeadmcontrolplane_spec_replicas)", + "legendFormat": "spec replicas", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_kubeadmcontrolplane_status_replicas)", + "hide": false, + "legendFormat": "status replicas", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_kubeadmcontrolplane_status_replicas_ready)", + "hide": false, + "legendFormat": "status ready replicas", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_kubeadmcontrolplane_status_replicas_unavailable)", + "hide": false, + "legendFormat": "status unavailable replicas", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_kubeadmcontrolplane_status_replicas_updated)", + "hide": false, + "legendFormat": "status updated replicas", + "range": true, + "refId": "E" + } + ], + "title": "KubeadmControlPlane replicas", + "type": "timeseries" + } + ], + "title": "KubeadmControlPlane", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 20, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_info)", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinedeployment_status_condition_v1beta2{status=\"True\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinedeployment_status_condition_v1beta2{status=\"False\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "MachineDeployment by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 8 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_info) by (version)", + "legendFormat": "{{version}}", + "range": true, + "refId": "A" + } + ], + "title": "MachineDeployment by version", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 8 + }, + "id": 17, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_spec_replicas)", + "legendFormat": "spec replicas", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_status_replicas)", + "hide": false, + "legendFormat": "status replicas", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_status_replicas_ready)", + "hide": false, + "legendFormat": "status ready replicas", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_status_replicas_unavailable)", + "hide": false, + "legendFormat": "status unavailable replicas", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_status_replicas_updated)", + "hide": false, + "legendFormat": "status updated replicas", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinedeployment_status_replicas_available)", + "hide": false, + "legendFormat": "status available replicas", + "range": true, + "refId": "F" + } + ], + "title": "MachineDeployment replicas", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 8 + }, + "id": 18, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinedeployment_status_phase == 1) by (phase)", + "legendFormat": "{{phase}}", + "range": true, + "refId": "A" + } + ], + "title": "MachineDeployment by status phase", + "type": "timeseries" + } + ], + "title": "MachineDeployment", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 19, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 23, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machineset_info)", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machineset_status_condition_v1beta2{status=\"True\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machineset_status_condition_v1beta2{status=\"False\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "MachineSet by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 24, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machineset_info) by (version)", + "legendFormat": "{{version}}", + "range": true, + "refId": "A" + } + ], + "title": "MachineSet by version", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 9 + }, + "id": 25, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machineset_spec_replicas)", + "legendFormat": "spec replicas", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machineset_status_replicas)", + "hide": false, + "legendFormat": "status replicas", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machineset_status_replicas_ready)", + "hide": false, + "legendFormat": "status ready replicas", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machineset_status_replicas_available)", + "hide": false, + "legendFormat": "status available replicas", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machineset_status_replicas_fully_labeled)", + "hide": false, + "legendFormat": "status fully labeled replicas", + "range": true, + "refId": "D" + } + ], + "title": "MachineSet replicas", + "type": "timeseries" + } + ], + "title": "MachineSet", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 35, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinepool_info)", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinepool_status_condition_v1beta2{status=\"True\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinepool_status_condition_v1beta2{status=\"False\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "MachinePool by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 10 + }, + "id": 37, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinepool_info) by (version)", + "legendFormat": "{{version}}", + "range": true, + "refId": "A" + } + ], + "title": "MachinePool by version", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 10 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinepool_spec_replicas)", + "legendFormat": "spec replicas", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinepool_status_replicas)", + "hide": false, + "legendFormat": "status replicas", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinepool_status_replicas_ready)", + "hide": false, + "legendFormat": "status ready replicas", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinepool_status_replicas_unavailable)", + "hide": false, + "legendFormat": "status unavailable replicas", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinepool_status_replicas_available)", + "hide": false, + "legendFormat": "status available replicas", + "range": true, + "refId": "F" + } + ], + "title": "MachinePool replicas", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 10 + }, + "id": 39, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinepool_status_phase == 1) by (phase)", + "legendFormat": "{{phase}}", + "range": true, + "refId": "A" + } + ], + "title": "MachinePool by status phase", + "type": "timeseries" + } + ], + "title": "MachinePool", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 42, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 11 + }, + "id": 28, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machine_info{control_plane_name!=\"\"})", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(avg(capi_machine_info{control_plane_name!=\"\"}) by (name) * on(name) group_right () (capi_machine_status_condition_v1beta2{status=\"True\"} == 1)) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(avg(capi_machine_info{control_plane_name!=\"\"}) by (name) * on(name) group_right () (capi_machine_status_condition_v1beta2{status=\"False\"} == 1)) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "Control Plane Machine by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 11 + }, + "id": 29, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machine_info{control_plane_name!=\"\"}) by (version)", + "legendFormat": "{{version}}", + "range": true, + "refId": "A" + } + ], + "title": "Control Plane Machine by version", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 11 + }, + "id": 30, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(avg(capi_machine_info{control_plane_name!=\"\"}) by (name) * on (name) group_right () (capi_machine_status_phase == 1)) by (phase)", + "legendFormat": "{{phase}}", + "range": true, + "refId": "A" + } + ], + "title": "Control Plane Machine by status phase", + "type": "timeseries" + } + ], + "title": "Control Plane Machine", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 27, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 12 + }, + "id": 31, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machine_info{control_plane_name=\"\"})", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(avg(capi_machine_info{control_plane_name=\"\"}) by (name) * on(name) group_right () (capi_machine_status_condition_v1beta2{status=\"True\"} == 1)) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(avg(capi_machine_info{control_plane_name=\"\"}) by (name) * on(name) group_right () (capi_machine_status_condition_v1beta2{status=\"False\"} == 1)) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "Worker Machine by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 12 + }, + "id": 32, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machine_info{control_plane_name=\"\"}) by (version)", + "legendFormat": "{{version}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Machine by version", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 12 + }, + "id": 33, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(avg(capi_machine_info{control_plane_name=\"\"}) by (name) * on (name) group_right () (capi_machine_status_phase == 1)) by (phase)", + "legendFormat": "{{phase}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Machine by status phase", + "type": "timeseries" + } + ], + "title": "Worker Machine", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 34, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 12 + }, + "id": 40, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinehealthcheck_info)", + "legendFormat": "All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinehealthcheck_status_condition_v1beta2{status=\"True\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(capi_machinehealthcheck_status_condition_v1beta2{status=\"False\"} == 1) by (type)", + "hide": false, + "legendFormat": "{{type}} (False)", + "range": true, + "refId": "C" + } + ], + "title": "MachineHealthCheck by conditions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 12 + }, + "id": 41, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinehealthcheck_status_expected_machines)", + "legendFormat": "status expected", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum (capi_machinehealthcheck_status_current_healthy)", + "hide": false, + "legendFormat": "status current healthy", + "range": true, + "refId": "B" + } + ], + "title": "MachineHealthCheck replicas", + "type": "timeseries" + } + ], + "title": "MachineHealthCheck", + "type": "row" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Cluster API State v1beta2", + "uid": "f782099f-f732-4d48-80ed-5fb7d9148d9g", + "version": 1, + "weekStart": "" +} diff --git a/hack/observability/grafana/kustomization.yaml b/hack/observability/grafana/kustomization.yaml index 68a8aed7bafb..42c6d2e8365d 100644 --- a/hack/observability/grafana/kustomization.yaml +++ b/hack/observability/grafana/kustomization.yaml @@ -28,3 +28,9 @@ configMapGenerator: - name: grafana-dashboard-runtime-extensions files: - dashboards/runtime-extensions.json +- name: grafana-dashboard-cluster-api-state-v1beta2 + files: + - dashboards/cluster-api-state-v1beta2.json +- name: grafana-dashboard-cluster-api-performance-v1beta2 + files: + - dashboards/cluster-api-performance-v1beta2.json From a8ee478e419d120480f9e78e9ff69e047050c399 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 16:28:33 +0100 Subject: [PATCH 10/14] add markers to dockercluster devcluster dockermachine devmachine extensionconfig ipaddressclaim and crs --- api/addons/v1beta1/clusterresourceset_types.go | 4 ++++ exp/ipam/api/v1beta1/ipaddressclaim_types.go | 5 +++++ exp/runtime/api/v1alpha1/extensionconfig_types.go | 4 ++++ test/infrastructure/docker/api/v1beta1/devcluster_types.go | 7 +++++++ test/infrastructure/docker/api/v1beta1/devmachine_types.go | 5 +++++ .../docker/api/v1beta1/dockercluster_types.go | 5 +++++ .../docker/api/v1beta1/dockermachine_types.go | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/api/addons/v1beta1/clusterresourceset_types.go b/api/addons/v1beta1/clusterresourceset_types.go index 42abd7c8e222..3dc9452ff347 100644 --- a/api/addons/v1beta1/clusterresourceset_types.go +++ b/api/addons/v1beta1/clusterresourceset_types.go @@ -182,6 +182,10 @@ func (m *ClusterResourceSet) SetV1Beta2Conditions(conditions []metav1.Condition) // ClusterResourceSet is the Schema for the clusterresourcesets API. // For advanced use cases an add-on provider should be used instead. +// +Metrics:gvk:namePrefix="capi_clusterresourceset" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" type ClusterResourceSet struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. diff --git a/exp/ipam/api/v1beta1/ipaddressclaim_types.go b/exp/ipam/api/v1beta1/ipaddressclaim_types.go index 1d696669c204..cbe2f94e8325 100644 --- a/exp/ipam/api/v1beta1/ipaddressclaim_types.go +++ b/exp/ipam/api/v1beta1/ipaddressclaim_types.go @@ -73,6 +73,11 @@ type IPAddressClaimV1Beta2Status struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of IPAdressClaim" // IPAddressClaim is the Schema for the ipaddressclaim API. +// +Metrics:gvk:namePrefix="capi_ipaddressclaim" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=.metadata.labels.cluster\.x-k8s\.io/cluster-name type IPAddressClaim struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. diff --git a/exp/runtime/api/v1alpha1/extensionconfig_types.go b/exp/runtime/api/v1alpha1/extensionconfig_types.go index 6dddd3e03dae..fbcf3e5a660a 100644 --- a/exp/runtime/api/v1alpha1/extensionconfig_types.go +++ b/exp/runtime/api/v1alpha1/extensionconfig_types.go @@ -209,6 +209,10 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ExtensionConfig" // ExtensionConfig is the Schema for the ExtensionConfig API. +// +Metrics:gvk:namePrefix="capi_extensionconfig" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" type ExtensionConfig struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. diff --git a/test/infrastructure/docker/api/v1beta1/devcluster_types.go b/test/infrastructure/docker/api/v1beta1/devcluster_types.go index b5805bebb883..a8d99385dd48 100644 --- a/test/infrastructure/docker/api/v1beta1/devcluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/devcluster_types.go @@ -120,6 +120,8 @@ type DevClusterStatus struct { // conditions defines current service state of the DevCluster. // +optional + // +Metrics:stateset:name="status_condition",help="The condition of a devcluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a devcluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DevCluster's status with the V1Beta2 version. @@ -148,6 +150,11 @@ type DevClusterV1Beta2Status struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of the DevCluster" // DevCluster is the schema for the dev cluster infrastructure API. +// +Metrics:gvk:namePrefix="capi_devcluster" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=.metadata.labels.cluster\.x-k8s\.io/cluster-name type DevCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/test/infrastructure/docker/api/v1beta1/devmachine_types.go b/test/infrastructure/docker/api/v1beta1/devmachine_types.go index 6b303aba7f4b..a0d9a06c07d2 100644 --- a/test/infrastructure/docker/api/v1beta1/devmachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/devmachine_types.go @@ -410,6 +410,11 @@ type DevMachineV1Beta2Status struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of the DevMachine" // DevMachine is the schema for the dev machine infrastructure API. +// +Metrics:gvk:namePrefix="capi_devmachine" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=.metadata.labels.cluster\.x-k8s\.io/cluster-name type DevMachine struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go index 11e036a85c76..531427b4f2bf 100644 --- a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go @@ -135,6 +135,11 @@ type APIEndpoint struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerCluster" // DockerCluster is the Schema for the dockerclusters API. +// +Metrics:gvk:namePrefix="capi_dockercluster" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=.metadata.labels.cluster\.x-k8s\.io/cluster-name type DockerCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go index ab79d66bc12c..1c381e54882b 100644 --- a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go @@ -130,6 +130,11 @@ type DockerMachineV1Beta2Status struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerMachine" // DockerMachine is the Schema for the dockermachines API. +// +Metrics:gvk:namePrefix="capi_dockermachine" +// +Metrics:labelFromPath:name="name",JSONPath=".metadata.name" +// +Metrics:labelFromPath:name="namespace",JSONPath=".metadata.namespace" +// +Metrics:labelFromPath:name="uid",JSONPath=".metadata.uid" +// +Metrics:labelFromPath:name="cluster_name",JSONPath=.metadata.labels.cluster\.x-k8s\.io/cluster-name type DockerMachine struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` From c427a0d6e2602f34d2837c4abe419fd91fd42dd7 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 16:31:49 +0100 Subject: [PATCH 11/14] update Makefile for api directories --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3645a71a4b54..939acc0865b5 100644 --- a/Makefile +++ b/Makefile @@ -625,7 +625,10 @@ generate-metrics-config: $(CONTROLLER_GEN) ## Generate ./config/metrics/crd-metr paths=./api/... \ paths=./controlplane/kubeadm/api/... \ paths=./bootstrap/kubeadm/api/... \ - paths=./exp/api/... + paths=./exp/api/... \ + paths=./exp/ipam/api/... \ + paths=./exp/runtime/api/... \ + paths=./test/infrastructure/docker/api/... .PHONY: generate-diagrams generate-diagrams: ## Generate diagrams for *.plantuml files From 51d8c61752069f56771ab9f8abfe7334e629e501 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 16:31:58 +0100 Subject: [PATCH 12/14] regenerate --- config/metrics/metrics.yaml | 534 ++++++++++++++++++++++++++++++++++++ config/metrics/rbac.yaml | 35 +++ 2 files changed, 569 insertions(+) diff --git a/config/metrics/metrics.yaml b/config/metrics/metrics.yaml index f7f87c33b4c1..f0572ef798fe 100644 --- a/config/metrics/metrics.yaml +++ b/config/metrics/metrics.yaml @@ -4,6 +4,60 @@ kind: CustomResourceStateMetrics spec: resources: + - errorLogV: 0 + groupVersionKind: + group: addons.cluster.x-k8s.io + kind: ClusterResourceSet + version: v1beta1 + labelsFromPath: + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_clusterresourceset + metrics: + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a clusterresourceset. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a clusterresourceset. + name: status_condition_v1beta2_last_transition_time + resourcePlural: "" - errorLogV: 0 groupVersionKind: group: bootstrap.cluster.x-k8s.io @@ -1814,3 +1868,483 @@ spec: help: The number of updated replicas per kubeadmcontrolplane. name: status_replicas_updated resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: infrastructure.cluster.x-k8s.io + kind: DevCluster + version: v1beta1 + labelsFromPath: + cluster_name: + - metadata + - labels + - cluster.x-k8s.io/cluster-name + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_devcluster + metrics: + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - conditions + valueFrom: + - status + type: StateSet + help: The condition of a devcluster. + name: status_condition + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The condition's last transition time of a devcluster. + name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a devcluster. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a devcluster. + name: status_condition_v1beta2_last_transition_time + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: infrastructure.cluster.x-k8s.io + kind: DevMachine + version: v1beta1 + labelsFromPath: + cluster_name: + - metadata + - labels + - cluster.x-k8s.io/cluster-name + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_devmachine + metrics: + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - conditions + valueFrom: + - status + type: StateSet + help: The condition of a devmachine. + name: status_condition + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The condition last transition time of a devmachine. + name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a devmachine. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a devmachine. + name: status_condition_v1beta2_last_transition_time + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: infrastructure.cluster.x-k8s.io + kind: DockerCluster + version: v1beta1 + labelsFromPath: + cluster_name: + - metadata + - labels + - cluster.x-k8s.io/cluster-name + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_dockercluster + metrics: + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - conditions + valueFrom: + - status + type: StateSet + help: The condition of a dockercluster. + name: status_condition + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The condition last transition time of a dockercluster. + name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a dockercluster. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a dockercluster. + name: status_condition_v1beta2_last_transition_time + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: infrastructure.cluster.x-k8s.io + kind: DockerMachine + version: v1beta1 + labelsFromPath: + cluster_name: + - metadata + - labels + - cluster.x-k8s.io/cluster-name + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_dockermachine + metrics: + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - conditions + valueFrom: + - status + type: StateSet + help: The condition of a dockermachine. + name: status_condition + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The condition last transition time of a dockermachine. + name: status_condition_last_transition_time + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a dockermachine. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a dockermachine. + name: status_condition_v1beta2_last_transition_time + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: ipam.cluster.x-k8s.io + kind: IPAddressClaim + version: v1beta1 + labelsFromPath: + cluster_name: + - metadata + - labels + - cluster.x-k8s.io/cluster-name + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_ipaddressclaim + metrics: + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a ipaddressclaim. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a ipaddressclaim. + name: status_condition_v1beta2_last_transition_time + resourcePlural: "" + - errorLogV: 0 + groupVersionKind: + group: runtime.cluster.x-k8s.io + kind: ExtensionConfig + version: v1alpha1 + labelsFromPath: + name: + - metadata + - name + namespace: + - metadata + - namespace + uid: + - metadata + - uid + metricNamePrefix: capi_extensionconfig + metrics: + - each: + stateSet: + labelName: status + labelsFromPath: + type: + - type + list: + - "True" + - "False" + - Unknown + path: + - status + - v1beta2 + - conditions + valueFrom: + - status + type: StateSet + help: The v1beta2 condition of a extensionconfig. + name: status_condition_v1beta2 + - each: + gauge: + labelsFromPath: + status: + - status + type: + - type + nilIsZero: false + path: + - status + - v1beta2 + - conditions + valueFrom: + - lastTransitionTime + type: Gauge + help: The v1beta2 condition's last transition time of a extensionconfig. + name: status_condition_v1beta2_last_transition_time + resourcePlural: "" diff --git a/config/metrics/rbac.yaml b/config/metrics/rbac.yaml index bed50b0a70a0..f24506732b06 100644 --- a/config/metrics/rbac.yaml +++ b/config/metrics/rbac.yaml @@ -6,6 +6,14 @@ metadata: kube-state-metrics/aggregate-to-manager: "true" name: manager-metrics-role rules: +- apiGroups: + - addons.cluster.x-k8s.io + resources: + - clusterresourcesets + verbs: + - get + - list + - watch - apiGroups: - bootstrap.cluster.x-k8s.io resources: @@ -36,3 +44,30 @@ rules: - get - list - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - devclusters + - devmachines + - dockerclusters + - dockermachines + verbs: + - get + - list + - watch +- apiGroups: + - ipam.cluster.x-k8s.io + resources: + - ipaddressclaims + verbs: + - get + - list + - watch +- apiGroups: + - runtime.cluster.x-k8s.io + resources: + - extensionconfigs + verbs: + - get + - list + - watch From 511f61216c6177c35f6cc236c367b54133e03e34 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 16:41:32 +0100 Subject: [PATCH 13/14] drop v1beta1 conditions and rename v1beta2 conditions metric --- api/addons/v1beta1/clusterresourceset_types.go | 4 ++-- api/v1beta1/cluster_types.go | 6 ++---- api/v1beta1/clusterclass_types.go | 6 ++---- api/v1beta1/machine_types.go | 6 ++---- api/v1beta1/machinedeployment_types.go | 6 ++---- api/v1beta1/machinehealthcheck_types.go | 6 ++---- api/v1beta1/machineset_types.go | 6 ++---- bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go | 6 ++---- .../kubeadm/api/v1beta1/kubeadm_control_plane_types.go | 6 ++---- exp/api/v1beta1/machinepool_types.go | 6 ++---- exp/ipam/api/v1beta1/ipaddressclaim_types.go | 4 ++-- exp/runtime/api/v1alpha1/extensionconfig_types.go | 4 ++-- test/infrastructure/docker/api/v1beta1/devcluster_types.go | 6 ++---- test/infrastructure/docker/api/v1beta1/devmachine_types.go | 6 ++---- .../docker/api/v1beta1/dockercluster_types.go | 6 ++---- .../docker/api/v1beta1/dockermachine_types.go | 6 ++---- 16 files changed, 32 insertions(+), 58 deletions(-) diff --git a/api/addons/v1beta1/clusterresourceset_types.go b/api/addons/v1beta1/clusterresourceset_types.go index 3dc9452ff347..ddb49c3800fe 100644 --- a/api/addons/v1beta1/clusterresourceset_types.go +++ b/api/addons/v1beta1/clusterresourceset_types.go @@ -141,8 +141,8 @@ type ClusterResourceSetV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a clusterresourceset.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a clusterresourceset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a clusterresourceset.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a clusterresourceset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index 21e91c5a9568..71ab9e13ccce 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -1000,8 +1000,6 @@ type ClusterStatus struct { // conditions defines current service state of the cluster. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a cluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a cluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // observedGeneration is the latest generation observed by the controller. @@ -1024,8 +1022,8 @@ type ClusterV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a cluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a cluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a cluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a cluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // controlPlane groups all the observations about Cluster's ControlPlane current state. diff --git a/api/v1beta1/clusterclass_types.go b/api/v1beta1/clusterclass_types.go index 5eacfe32c5bd..8c8705019d80 100644 --- a/api/v1beta1/clusterclass_types.go +++ b/api/v1beta1/clusterclass_types.go @@ -1155,8 +1155,6 @@ type ClusterClassStatus struct { // conditions defines current observed state of the ClusterClass. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a clusterclass.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a clusterclass.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // observedGeneration is the latest generation observed by the controller. @@ -1177,8 +1175,8 @@ type ClusterClassV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a clusterclass.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a clusterclass.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a clusterclass.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a clusterclass.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/machine_types.go b/api/v1beta1/machine_types.go index 67f92b61f618..6c82deaff0f4 100644 --- a/api/v1beta1/machine_types.go +++ b/api/v1beta1/machine_types.go @@ -589,8 +589,6 @@ type MachineStatus struct { // conditions defines current service state of the Machine. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a machine.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // deletion contains information relating to removal of the Machine. @@ -616,8 +614,8 @@ type MachineV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machine.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a machine.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a machine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/machinedeployment_types.go b/api/v1beta1/machinedeployment_types.go index e4dc53f70bef..697a70e607eb 100644 --- a/api/v1beta1/machinedeployment_types.go +++ b/api/v1beta1/machinedeployment_types.go @@ -510,8 +510,6 @@ type MachineDeploymentStatus struct { // conditions defines current service state of the MachineDeployment. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a machinedeployment.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinedeployment.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachineDeployment's status with the V1Beta2 version. @@ -528,8 +526,8 @@ type MachineDeploymentV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machinedeployment.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machinedeployment.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a machinedeployment.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a machinedeployment.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this MachineDeployment. A machine is considered ready when Machine's Ready condition is true. diff --git a/api/v1beta1/machinehealthcheck_types.go b/api/v1beta1/machinehealthcheck_types.go index b9c9be5b5d9f..026741273ce3 100644 --- a/api/v1beta1/machinehealthcheck_types.go +++ b/api/v1beta1/machinehealthcheck_types.go @@ -184,8 +184,6 @@ type MachineHealthCheckStatus struct { // conditions defines current service state of the MachineHealthCheck. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a machinehealthcheck.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinehealthcheck.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachineHealthCheck's status with the V1Beta2 version. @@ -202,8 +200,8 @@ type MachineHealthCheckV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machinehealthcheck.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machinehealthcheck.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a machinehealthcheck.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a machinehealthcheck.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1beta1/machineset_types.go b/api/v1beta1/machineset_types.go index 1c522a3cf219..6f3fa3a787ca 100644 --- a/api/v1beta1/machineset_types.go +++ b/api/v1beta1/machineset_types.go @@ -360,8 +360,6 @@ type MachineSetStatus struct { // conditions defines current service state of the MachineSet. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a machineset.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machineset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachineSet's status with the V1Beta2 version. @@ -378,8 +376,8 @@ type MachineSetV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machineset.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machineset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a machineset.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a machineset.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when Machine's Ready condition is true. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go index 771fdfbe52a4..096eb99f0834 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go @@ -486,8 +486,6 @@ type KubeadmConfigStatus struct { // conditions defines current service state of the KubeadmConfig. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a kubeadmconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a kubeadmconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in KubeadmConfig's status with the V1Beta2 version. @@ -504,8 +502,8 @@ type KubeadmConfigV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a kubeadmconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a kubeadmconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a kubeadmconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a kubeadmconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go index b2eda200f86d..1831f3a5b898 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go @@ -371,8 +371,6 @@ type KubeadmControlPlaneStatus struct { // conditions defines current service state of the KubeadmControlPlane. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a kubeadmcontrolplane.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a kubeadmcontrolplane.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // lastRemediation stores info about last remediation performed. @@ -394,8 +392,8 @@ type KubeadmControlPlaneV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a kubeadmcontrolplane.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a kubeadmcontrolplane.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a kubeadmcontrolplane.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a kubeadmcontrolplane.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this KubeadmControlPlane. A machine is considered ready when Machine's Ready condition is true. diff --git a/exp/api/v1beta1/machinepool_types.go b/exp/api/v1beta1/machinepool_types.go index 666be1334363..a4c028246833 100644 --- a/exp/api/v1beta1/machinepool_types.go +++ b/exp/api/v1beta1/machinepool_types.go @@ -148,8 +148,6 @@ type MachinePoolStatus struct { // conditions define the current service state of the MachinePool. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a machinepool.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinepool.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachinePool's status with the V1Beta2 version. @@ -167,8 +165,8 @@ type MachinePoolV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a machinepool.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a machinepool.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a machinepool.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a machinepool.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` // readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when Machine's Ready condition is true. diff --git a/exp/ipam/api/v1beta1/ipaddressclaim_types.go b/exp/ipam/api/v1beta1/ipaddressclaim_types.go index cbe2f94e8325..baf34f728420 100644 --- a/exp/ipam/api/v1beta1/ipaddressclaim_types.go +++ b/exp/ipam/api/v1beta1/ipaddressclaim_types.go @@ -59,8 +59,8 @@ type IPAddressClaimV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a ipaddressclaim.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a ipaddressclaim.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a ipaddressclaim.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a ipaddressclaim.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/exp/runtime/api/v1alpha1/extensionconfig_types.go b/exp/runtime/api/v1alpha1/extensionconfig_types.go index fbcf3e5a660a..348f7f73d590 100644 --- a/exp/runtime/api/v1alpha1/extensionconfig_types.go +++ b/exp/runtime/api/v1alpha1/extensionconfig_types.go @@ -141,8 +141,8 @@ type ExtensionConfigV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a extensionconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a extensionconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a extensionconfig.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a extensionconfig.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/devcluster_types.go b/test/infrastructure/docker/api/v1beta1/devcluster_types.go index a8d99385dd48..124734393b0e 100644 --- a/test/infrastructure/docker/api/v1beta1/devcluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/devcluster_types.go @@ -120,8 +120,6 @@ type DevClusterStatus struct { // conditions defines current service state of the DevCluster. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a devcluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a devcluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DevCluster's status with the V1Beta2 version. @@ -137,8 +135,8 @@ type DevClusterV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a devcluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a devcluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a devcluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a devcluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/devmachine_types.go b/test/infrastructure/docker/api/v1beta1/devmachine_types.go index a0d9a06c07d2..f0a234e3458b 100644 --- a/test/infrastructure/docker/api/v1beta1/devmachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/devmachine_types.go @@ -358,8 +358,6 @@ type DevMachineStatus struct { // conditions defines current service state of the DevMachine. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a devmachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a devmachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DevMachine's status with the V1Beta2 version. @@ -394,8 +392,8 @@ type DevMachineV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a devmachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a devmachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a devmachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a devmachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go index 531427b4f2bf..0ab28117c512 100644 --- a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go @@ -94,8 +94,6 @@ type DockerClusterStatus struct { // Conditions defines current service state of the DockerCluster. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a dockercluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a dockercluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DockerCluster's's status with the V1Beta2 version. @@ -112,8 +110,8 @@ type DockerClusterV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a dockercluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a dockercluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a dockercluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a dockercluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go index 1c381e54882b..a59ecf1a52b1 100644 --- a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go @@ -96,8 +96,6 @@ type DockerMachineStatus struct { // Conditions defines current service state of the DockerMachine. // +optional - // +Metrics:stateset:name="status_condition",help="The condition of a dockermachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a dockermachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions clusterv1.Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in DockerMachine's status with the V1Beta2 version. @@ -114,8 +112,8 @@ type DockerMachineV1Beta2Status struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 - // +Metrics:stateset:name="status_condition_v1beta2",help="The v1beta2 condition of a dockermachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} - // +Metrics:gauge:name="status_condition_v1beta2_last_transition_time",help="The v1beta2 condition's last transition time of a dockermachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} + // +Metrics:stateset:name="status_condition",help="The condition of a dockermachine.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"} + // +Metrics:gauge:name="status_condition_last_transition_time",help="The condition's last transition time of a dockermachine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"} Conditions []metav1.Condition `json:"conditions,omitempty"` } From bb7541d8a6c1b6b322045417c40e6bf1020c56a7 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Thu, 20 Mar 2025 16:42:13 +0100 Subject: [PATCH 14/14] regenerate --- config/metrics/metrics.yaml | 542 ++++-------------------------------- 1 file changed, 50 insertions(+), 492 deletions(-) diff --git a/config/metrics/metrics.yaml b/config/metrics/metrics.yaml index f0572ef798fe..6ace01c4711d 100644 --- a/config/metrics/metrics.yaml +++ b/config/metrics/metrics.yaml @@ -38,8 +38,8 @@ spec: valueFrom: - status type: StateSet - help: The v1beta2 condition of a clusterresourceset. - name: status_condition_v1beta2 + help: The condition of a clusterresourceset. + name: status_condition - each: gauge: labelsFromPath: @@ -55,8 +55,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a clusterresourceset. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a clusterresourceset. + name: status_condition_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -140,47 +140,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a kubeadmconfig. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a kubeadmconfig. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a kubeadmconfig. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -196,8 +162,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a kubeadmconfig. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a kubeadmconfig. + name: status_condition_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -300,47 +266,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a cluster. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a cluster. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a cluster. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -356,8 +288,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a cluster. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a cluster. + name: status_condition_last_transition_time - each: stateSet: labelName: phase @@ -454,47 +386,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a clusterclass. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a clusterclass. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a clusterclass. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -510,8 +408,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a clusterclass. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a clusterclass. + name: status_condition_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -665,47 +563,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a machine. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a machine. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a machine. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -721,8 +585,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a machine. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a machine. + name: status_condition_last_transition_time - each: info: labelsFromPath: @@ -911,47 +775,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a machinedeployment. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a machinedeployment. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a machinedeployment. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -967,8 +797,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a machinedeployment. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a machinedeployment. + name: status_condition_last_transition_time - each: stateSet: labelName: phase @@ -1117,47 +947,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a machinehealthcheck. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a machinehealthcheck. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a machinehealthcheck. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -1173,8 +969,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a machinehealthcheck. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a machinehealthcheck. + name: status_condition_last_transition_time - each: gauge: nilIsZero: true @@ -1330,47 +1126,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a machinepool. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a machinepool. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a machinepool. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -1386,8 +1148,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a machinepool. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a machinepool. + name: status_condition_last_transition_time - each: stateSet: labelName: phase @@ -1564,47 +1326,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a machineset. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a machineset. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a machineset. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -1620,8 +1348,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a machineset. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a machineset. + name: status_condition_last_transition_time - each: gauge: nilIsZero: true @@ -1769,47 +1497,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a kubeadmcontrolplane. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a kubeadmcontrolplane. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a kubeadmcontrolplane. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -1825,8 +1519,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a kubeadmcontrolplane. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a kubeadmcontrolplane. + name: status_condition_last_transition_time - each: gauge: nilIsZero: true @@ -1901,6 +1595,7 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status @@ -1917,48 +1612,13 @@ spec: nilIsZero: false path: - status + - v1beta2 - conditions valueFrom: - lastTransitionTime type: Gauge help: The condition's last transition time of a devcluster. name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a devcluster. - name: status_condition_v1beta2 - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - v1beta2 - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The v1beta2 condition's last transition time of a devcluster. - name: status_condition_v1beta2_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -1993,47 +1653,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a devmachine. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a devmachine. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a devmachine. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -2049,8 +1675,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a devmachine. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a devmachine. + name: status_condition_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -2085,47 +1711,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a dockercluster. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a dockercluster. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a dockercluster. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -2141,8 +1733,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a dockercluster. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a dockercluster. + name: status_condition_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -2177,47 +1769,13 @@ spec: - Unknown path: - status + - v1beta2 - conditions valueFrom: - status type: StateSet help: The condition of a dockermachine. name: status_condition - - each: - gauge: - labelsFromPath: - status: - - status - type: - - type - nilIsZero: false - path: - - status - - conditions - valueFrom: - - lastTransitionTime - type: Gauge - help: The condition last transition time of a dockermachine. - name: status_condition_last_transition_time - - each: - stateSet: - labelName: status - labelsFromPath: - type: - - type - list: - - "True" - - "False" - - Unknown - path: - - status - - v1beta2 - - conditions - valueFrom: - - status - type: StateSet - help: The v1beta2 condition of a dockermachine. - name: status_condition_v1beta2 - each: gauge: labelsFromPath: @@ -2233,8 +1791,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a dockermachine. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a dockermachine. + name: status_condition_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -2274,8 +1832,8 @@ spec: valueFrom: - status type: StateSet - help: The v1beta2 condition of a ipaddressclaim. - name: status_condition_v1beta2 + help: The condition of a ipaddressclaim. + name: status_condition - each: gauge: labelsFromPath: @@ -2291,8 +1849,8 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a ipaddressclaim. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a ipaddressclaim. + name: status_condition_last_transition_time resourcePlural: "" - errorLogV: 0 groupVersionKind: @@ -2328,8 +1886,8 @@ spec: valueFrom: - status type: StateSet - help: The v1beta2 condition of a extensionconfig. - name: status_condition_v1beta2 + help: The condition of a extensionconfig. + name: status_condition - each: gauge: labelsFromPath: @@ -2345,6 +1903,6 @@ spec: valueFrom: - lastTransitionTime type: Gauge - help: The v1beta2 condition's last transition time of a extensionconfig. - name: status_condition_v1beta2_last_transition_time + help: The condition's last transition time of a extensionconfig. + name: status_condition_last_transition_time resourcePlural: ""