diff --git a/Makefile b/Makefile index c6b427fcf32d..c75ffcba0037 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,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) @@ -111,10 +112,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.18.0 +CONTROLLER_GEN_VER := fb8e57da18d1a7e2faa074a3835f8326e9b64f75 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.12.3 GOTESTSUM_BIN := gotestsum @@ -635,9 +637,10 @@ 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 - @echo "Use PR state from 'https://github.com/kubernetes-sigs/cluster-api/pull/9347'"; \ - exit 1 +generate-metrics-config: $(CONTROLLER_GEN) ## Generate ./config/metrics/crd-metrics-config.yaml + $(CONTROLLER_GEN) metrics output:metrics:dir=./config/metrics \ + paths=./api/... \ + paths=./test/infrastructure/docker/api/... .PHONY: generate-diagrams generate-diagrams: ## Generate diagrams for *.plantuml files @@ -1447,7 +1450,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) + 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. diff --git a/api/addons/v1beta2/clusterresourceset_types.go b/api/addons/v1beta2/clusterresourceset_types.go index e57c404acfe4..c68d107cf68b 100644 --- a/api/addons/v1beta2/clusterresourceset_types.go +++ b/api/addons/v1beta2/clusterresourceset_types.go @@ -122,6 +122,8 @@ type ClusterResourceSetStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // observedGeneration reflects the generation of the most recently observed ClusterResourceSet. @@ -192,6 +194,10 @@ func (m *ClusterResourceSet) SetConditions(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/api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go b/api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go index 1f7d6ef4082d..9bf54ec1e054 100644 --- a/api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go +++ b/api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go @@ -453,6 +453,8 @@ type KubeadmConfigStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the KubeadmConfig initialization process. @@ -532,11 +534,20 @@ type KubeadmConfigV1Beta1DeprecatedStatus 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/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go b/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go index 95aeb6a5fb88..06b24691bf4e 100644 --- a/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go +++ b/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go @@ -421,6 +421,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. @@ -587,6 +588,7 @@ type KubeadmControlPlaneRolloutStrategyRollingUpdate 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"` } @@ -667,6 +669,8 @@ type KubeadmControlPlaneStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the KubeadmControlPlane initialization process. @@ -687,18 +691,22 @@ 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,omitempty"` // readyReplicas is the number of ready replicas for this KubeadmControlPlane. A machine is considered ready when Machine's Ready condition is true. // +optional + // +Metrics:gauge:name="status_replicas_ready",help="The number of ready replicas per kubeadmcontrolplane.",nilIsZero=true ReadyReplicas *int32 `json:"readyReplicas,omitempty"` // availableReplicas is the number of available replicas targeted by this KubeadmControlPlane. A machine is considered available when Machine's Available condition is true. // +optional + // +Metrics:gauge:name="status_replicas_available",help="The number of available replicas per kubeadmcontrolplane.",nilIsZero=true AvailableReplicas *int32 `json:"availableReplicas,omitempty"` // upToDateReplicas is the number of up-to-date replicas targeted by this KubeadmControlPlane. A machine is considered up-to-date when Machine's UpToDate condition is true. // +optional + // +Metrics:gauge:name="status_replicas_uptodate",help="The number of up-to-date replicas per kubeadmcontrolplane.",nilIsZero=true UpToDateReplicas *int32 `json:"upToDateReplicas,omitempty"` // version represents the minimum Kubernetes version for the control plane machines @@ -836,11 +844,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/api/core/v1beta1/machinehealthcheck_types.go b/api/core/v1beta1/machinehealthcheck_types.go index c8e4d27046a1..ebf0965c26ed 100644 --- a/api/core/v1beta1/machinehealthcheck_types.go +++ b/api/core/v1beta1/machinehealthcheck_types.go @@ -204,7 +204,7 @@ type MachineHealthCheckV1Beta2Status struct { 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 + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata{ // +optional metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/api/core/v1beta2/cluster_types.go b/api/core/v1beta2/cluster_types.go index af0969853155..e63a2b72bcae 100644 --- a/api/core/v1beta2/cluster_types.go +++ b/api/core/v1beta2/cluster_types.go @@ -462,6 +462,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. @@ -1320,6 +1321,8 @@ type ClusterStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the Cluster initialization process. @@ -1346,6 +1349,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"` // observedGeneration is the latest generation observed by the controller. @@ -1538,11 +1542,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.classRef.name",topology_class_namespace:".spec.topology.classRef.namespace",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/core/v1beta2/clusterclass_types.go b/api/core/v1beta2/clusterclass_types.go index 80d78f358553..6db45c433fe6 100644 --- a/api/core/v1beta2/clusterclass_types.go +++ b/api/core/v1beta2/clusterclass_types.go @@ -75,11 +75,19 @@ const ( // ClusterClass is a template which can be used to create managed topologies. // NOTE: This CRD can only be used if the ClusterTopology feature gate is enabled. +// +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. @@ -1512,6 +1520,8 @@ type ClusterClassStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // variables is a list of ClusterClassStatusVariable that are defined for the ClusterClass. diff --git a/api/core/v1beta2/machine_types.go b/api/core/v1beta2/machine_types.go index a60f736ba21c..2f150358d699 100644 --- a/api/core/v1beta2/machine_types.go +++ b/api/core/v1beta2/machine_types.go @@ -510,6 +510,8 @@ type MachineStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the Machine initialization process. @@ -519,6 +521,7 @@ 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"} NodeRef MachineNodeReference `json:"nodeRef,omitempty,omitzero"` // nodeInfo is a set of ids/uuids to uniquely identify the node. @@ -533,16 +536,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,omitzero"` // observedGeneration is the latest generation observed by the controller. @@ -740,11 +746,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/core/v1beta2/machinedeployment_types.go b/api/core/v1beta2/machinedeployment_types.go index b7182c278ef6..0ab813ff9dcb 100644 --- a/api/core/v1beta2/machinedeployment_types.go +++ b/api/core/v1beta2/machinedeployment_types.go @@ -258,6 +258,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"` // rollout allows you to configure the behaviour of rolling updates to the MachineDeployment Machines. @@ -291,6 +292,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"` } @@ -342,6 +344,7 @@ type MachineDeploymentRolloutStrategyRollingUpdate 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 @@ -358,6 +361,7 @@ type MachineDeploymentRolloutStrategyRollingUpdate 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"` } @@ -428,6 +432,8 @@ type MachineDeploymentStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // observedGeneration is the generation observed by the deployment controller. @@ -446,23 +452,28 @@ 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,omitempty"` // readyReplicas is the number of ready replicas for this MachineDeployment. A machine is considered ready when Machine's Ready condition is true. // +optional + // +Metrics:gauge:name="status_replicas_ready",help="The number of ready replicas per machinedeployment.",nilIsZero=true ReadyReplicas *int32 `json:"readyReplicas,omitempty"` // availableReplicas is the number of available replicas for this MachineDeployment. A machine is considered available when Machine's Available condition is true. // +optional + // +Metrics:gauge:name="status_replicas_available",help="The number of available replicas per machinedeployment.",nilIsZero=true AvailableReplicas *int32 `json:"availableReplicas,omitempty"` // upToDateReplicas is the number of up-to-date replicas targeted by this deployment. A machine is considered up-to-date when Machine's UpToDate condition is true. // +optional + // +Metrics:gauge:name="status_replicas_uptodate",help="The number of up-to-date replicas per machinedeployment.",nilIsZero=true UpToDateReplicas *int32 `json:"upToDateReplicas,omitempty"` // 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"` // deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed. @@ -586,11 +597,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/core/v1beta2/machinehealthcheck_types.go b/api/core/v1beta2/machinehealthcheck_types.go index 9a7e31cae44d..397090e525c0 100644 --- a/api/core/v1beta2/machinehealthcheck_types.go +++ b/api/core/v1beta2/machinehealthcheck_types.go @@ -243,22 +243,27 @@ type MachineHealthCheckStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // 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,omitempty"` // 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,omitempty"` // 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,omitempty"` // observedGeneration is the latest generation observed by the controller. @@ -309,11 +314,20 @@ type MachineHealthCheckV1Beta1DeprecatedStatus 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={remediation_triggerif_unhealthyrange:.spec.remediation.triggerIf.unhealthyRange,remediation_triggerif_unhealthylessthanorequalto:.spec.remediation.triggerIf.unhealthyLessThanOrEqualTo} 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/core/v1beta2/machinepool_types.go b/api/core/v1beta2/machinepool_types.go index a6d16aff1467..5c01531b92fe 100644 --- a/api/core/v1beta2/machinepool_types.go +++ b/api/core/v1beta2/machinepool_types.go @@ -75,6 +75,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. @@ -109,6 +110,8 @@ type MachinePoolStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the MachinePool initialization process. @@ -124,23 +127,28 @@ 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,omitempty"` // readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when Machine's Ready condition is true. // +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 for this MachinePool. A machine is considered available when Machine's Available condition is true. // +optional + // +Metrics:gauge:name="status_replicas_available",help="The number of available replicas per machinepool.",nilIsZero=true AvailableReplicas *int32 `json:"availableReplicas,omitempty"` // upToDateReplicas is the number of up-to-date replicas targeted by this MachinePool. A machine is considered up-to-date when Machine's UpToDate condition is true. // +optional + // +Metrics:gauge:name="status_replicas_uptodate",help="The number of up-to-date replicas per machinepool.",nilIsZero=true UpToDateReplicas *int32 `json:"upToDateReplicas,omitempty"` // 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"` // observedGeneration is the latest generation observed by the controller. @@ -336,11 +344,20 @@ func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase { // MachinePool is the Schema for the machinepools API. // NOTE: This CRD can only be used if the MachinePool feature gate is enabled. +// +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. diff --git a/api/core/v1beta2/machineset_types.go b/api/core/v1beta2/machineset_types.go index 8a5a92db7d1b..588c5ea2a542 100644 --- a/api/core/v1beta2/machineset_types.go +++ b/api/core/v1beta2/machineset_types.go @@ -61,6 +61,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"` // selector is a label query over machines that should match the replica count. @@ -283,6 +284,8 @@ type MachineSetStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // selector is the same as the label selector but in the string format to avoid introspection @@ -295,18 +298,22 @@ 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,omitempty"` // readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when Machine's Ready condition is true. // +optional + // +Metrics:gauge:name="status_replicas_ready",help="The number of ready replicas per machineset.",nilIsZero=true ReadyReplicas *int32 `json:"readyReplicas,omitempty"` // availableReplicas is the number of available replicas for this MachineSet. A machine is considered available when Machine's Available condition is true. // +optional + // +Metrics:gauge:name="status_replicas_available",help="The number of available replicas per machineset.",nilIsZero=true AvailableReplicas *int32 `json:"availableReplicas,omitempty"` // upToDateReplicas is the number of up-to-date replicas for this MachineSet. A machine is considered up-to-date when Machine's UpToDate condition is true. // +optional + // +Metrics:gauge:name="status_replicas_uptodate",help="The number of up-to-date replicas per machineset.",nilIsZero=true UpToDateReplicas *int32 `json:"upToDateReplicas,omitempty"` // observedGeneration reflects the generation of the most recently observed MachineSet. @@ -437,11 +444,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/api/ipam/v1beta2/ipaddressclaim_types.go b/api/ipam/v1beta2/ipaddressclaim_types.go index c702770b07a0..d0e5d0209c61 100644 --- a/api/ipam/v1beta2/ipaddressclaim_types.go +++ b/api/ipam/v1beta2/ipaddressclaim_types.go @@ -62,6 +62,8 @@ type IPAddressClaimStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // addressRef is a reference to the address that was created for this claim. @@ -112,6 +114,11 @@ type IPAddressClaimV1Beta1DeprecatedStatus 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/api/runtime/v1beta2/extensionconfig_types.go b/api/runtime/v1beta2/extensionconfig_types.go index cc8920d08663..6e5e18cd9ab0 100644 --- a/api/runtime/v1beta2/extensionconfig_types.go +++ b/api/runtime/v1beta2/extensionconfig_types.go @@ -125,6 +125,8 @@ type ExtensionConfigStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // handlers defines the current ExtensionHandlers supported by an Extension. @@ -225,6 +227,10 @@ const ( // ExtensionConfig is the Schema for the ExtensionConfig API. // NOTE: This CRD can only be used if the RuntimeSDK feature gate is enabled. +// +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/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 95% rename from config/metrics/crd-metrics-config.yaml rename to config/metrics/metrics.yaml index 6ace01c4711d..deeebe3961cc 100644 --- a/config/metrics/crd-metrics-config.yaml +++ b/config/metrics/metrics.yaml @@ -8,7 +8,7 @@ spec: groupVersionKind: group: addons.cluster.x-k8s.io kind: ClusterResourceSet - version: v1beta1 + version: v1beta2 labelsFromPath: name: - metadata @@ -33,7 +33,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -50,7 +49,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -62,7 +60,7 @@ spec: groupVersionKind: group: bootstrap.cluster.x-k8s.io kind: KubeadmConfig - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - metadata @@ -140,7 +138,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -157,7 +154,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -169,7 +165,7 @@ spec: groupVersionKind: group: cluster.x-k8s.io kind: Cluster - version: v1beta1 + version: v1beta2 labelsFromPath: name: - metadata @@ -234,7 +230,13 @@ spec: topology_class: - spec - topology - - class + - classRef + - name + topology_class_namespace: + - spec + - topology + - classRef + - namespace topology_version: - spec - topology @@ -266,7 +268,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -283,7 +284,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -312,7 +312,7 @@ spec: groupVersionKind: group: cluster.x-k8s.io kind: ClusterClass - version: v1beta1 + version: v1beta2 labelsFromPath: name: - metadata @@ -386,7 +386,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -403,7 +402,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -415,7 +413,7 @@ spec: groupVersionKind: group: cluster.x-k8s.io kind: Machine - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - spec @@ -563,7 +561,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -580,7 +577,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -592,8 +588,6 @@ spec: labelsFromPath: node_name: - name - node_uid: - - uid path: - status - nodeRef @@ -624,7 +618,7 @@ spec: groupVersionKind: group: cluster.x-k8s.io kind: MachineDeployment - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - spec @@ -743,6 +737,7 @@ spec: nilIsZero: false path: - spec + - rollout - strategy - rollingUpdate - maxSurge @@ -756,6 +751,7 @@ spec: nilIsZero: false path: - spec + - rollout - strategy - rollingUpdate - maxUnavailable @@ -775,7 +771,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -792,7 +787,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -850,27 +844,17 @@ spec: nilIsZero: true path: - status - - unavailableReplicas - valueFrom: null - type: Gauge - help: The number of unavailable replicas per machinedeployment. - name: status_replicas_unavailable - - each: - gauge: - nilIsZero: true - path: - - status - - updatedReplicas + - upToDateReplicas valueFrom: null type: Gauge - help: The number of updated replicas per machinedeployment. - name: status_replicas_updated + help: The number of up-to-date replicas per machinedeployment. + name: status_replicas_uptodate resourcePlural: "" - errorLogV: 0 groupVersionKind: group: cluster.x-k8s.io kind: MachineHealthCheck - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - spec @@ -911,9 +895,16 @@ spec: - each: info: labelsFromPath: - maxUnhealthy: + remediation_triggerif_unhealthylessthanorequalto: - spec - - maxUnhealthy + - remediation + - triggerIf + - unhealthyLessThanOrEqualTo + remediation_triggerif_unhealthyrange: + - spec + - remediation + - triggerIf + - unhealthyRange path: null type: Info help: Information about a machinehealthcheck. @@ -947,7 +938,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -964,7 +954,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1006,7 +995,7 @@ spec: groupVersionKind: group: cluster.x-k8s.io kind: MachinePool - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - spec @@ -1126,7 +1115,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1143,7 +1131,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1201,17 +1188,17 @@ spec: nilIsZero: true path: - status - - unavailableReplicas + - upToDateReplicas valueFrom: null type: Gauge - help: The number of unavailable replicas per machinepool. - name: status_replicas_unavailable + help: The number of up-to-date replicas per machinepool. + name: status_replicas_uptodate resourcePlural: "" - errorLogV: 0 groupVersionKind: group: cluster.x-k8s.io kind: MachineSet - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - spec @@ -1326,7 +1313,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1343,7 +1329,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1375,27 +1360,27 @@ spec: nilIsZero: true path: - status - - fullyLabeledReplicas + - readyReplicas valueFrom: null type: Gauge - help: The number of fully labeled replicas per machineset. - name: status_replicas_fully_labeled + help: The number of ready replicas per machineset. + name: status_replicas_ready - each: gauge: nilIsZero: true path: - status - - readyReplicas + - upToDateReplicas valueFrom: null type: Gauge - help: The number of ready replicas per machineset. - name: status_replicas_ready + help: The number of up-to-date replicas per machineset. + name: status_replicas_uptodate resourcePlural: "" - errorLogV: 0 groupVersionKind: group: controlplane.cluster.x-k8s.io kind: KubeadmControlPlane - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - metadata @@ -1477,7 +1462,8 @@ spec: nilIsZero: false path: - spec - - rolloutStrategy + - rollout + - strategy - rollingUpdate - maxSurge valueFrom: null @@ -1497,7 +1483,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1514,7 +1499,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1536,37 +1520,37 @@ spec: nilIsZero: true path: - status - - readyReplicas + - availableReplicas valueFrom: null type: Gauge - help: The number of ready replicas per kubeadmcontrolplane. - name: status_replicas_ready + help: The number of available replicas per kubeadmcontrolplane. + name: status_replicas_available - each: gauge: nilIsZero: true path: - status - - unavailableReplicas + - readyReplicas valueFrom: null type: Gauge - help: The number of unavailable replicas per kubeadmcontrolplane. - name: status_replicas_unavailable + help: The number of ready replicas per kubeadmcontrolplane. + name: status_replicas_ready - each: gauge: nilIsZero: true path: - status - - updatedReplicas + - upToDateReplicas valueFrom: null type: Gauge - help: The number of updated replicas per kubeadmcontrolplane. - name: status_replicas_updated + help: The number of up-to-date replicas per kubeadmcontrolplane. + name: status_replicas_uptodate resourcePlural: "" - errorLogV: 0 groupVersionKind: group: infrastructure.cluster.x-k8s.io kind: DevCluster - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - metadata @@ -1595,7 +1579,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1612,7 +1595,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1624,7 +1606,7 @@ spec: groupVersionKind: group: infrastructure.cluster.x-k8s.io kind: DevMachine - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - metadata @@ -1653,7 +1635,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1670,7 +1651,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1682,7 +1662,7 @@ spec: groupVersionKind: group: infrastructure.cluster.x-k8s.io kind: DockerCluster - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - metadata @@ -1711,7 +1691,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1728,7 +1707,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1740,7 +1718,7 @@ spec: groupVersionKind: group: infrastructure.cluster.x-k8s.io kind: DockerMachine - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - metadata @@ -1769,7 +1747,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1786,7 +1763,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1798,7 +1774,7 @@ spec: groupVersionKind: group: ipam.cluster.x-k8s.io kind: IPAddressClaim - version: v1beta1 + version: v1beta2 labelsFromPath: cluster_name: - metadata @@ -1827,7 +1803,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1844,7 +1819,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime @@ -1856,7 +1830,7 @@ spec: groupVersionKind: group: runtime.cluster.x-k8s.io kind: ExtensionConfig - version: v1alpha1 + version: v1beta2 labelsFromPath: name: - metadata @@ -1881,7 +1855,6 @@ spec: - Unknown path: - status - - v1beta2 - conditions valueFrom: - status @@ -1898,7 +1871,6 @@ spec: nilIsZero: false path: - status - - v1beta2 - conditions valueFrom: - lastTransitionTime diff --git a/config/metrics/crd-clusterrole.yaml b/config/metrics/rbac.yaml similarity index 95% rename from config/metrics/crd-clusterrole.yaml rename to config/metrics/rbac.yaml index 52ca08243e28..f24506732b06 100644 --- a/config/metrics/crd-clusterrole.yaml +++ b/config/metrics/rbac.yaml @@ -2,9 +2,9 @@ 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: - addons.cluster.x-k8s.io 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 diff --git a/hack/observability/grafana/chart/values.yaml b/hack/observability/grafana/chart/values.yaml index 4bde2a178383..ac941feaf035 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..7d18a491fb63 --- /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_uptodate)", + "hide": false, + "legendFormat": "status up-to-date 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_uptodate)", + "hide": false, + "legendFormat": "status up-to-date 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/dashboards/cluster-api-state.json b/hack/observability/grafana/dashboards/cluster-api-state.json index d26f86676aae..082288991d3a 100644 --- a/hack/observability/grafana/dashboards/cluster-api-state.json +++ b/hack/observability/grafana/dashboards/cluster-api-state.json @@ -1213,9 +1213,9 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "sum (capi_kubeadmcontrolplane_status_replicas_updated)", + "expr": "sum (capi_kubeadmcontrolplane_status_replicas_uptodate)", "hide": false, - "legendFormat": "status updated replicas", + "legendFormat": "status up-to-date replicas", "range": true, "refId": "E" } @@ -1572,9 +1572,9 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "sum (capi_machinedeployment_status_replicas_updated)", + "expr": "sum (capi_machinedeployment_status_replicas_uptodate)", "hide": false, - "legendFormat": "status updated replicas", + "legendFormat": "status up-to-date replicas", "range": true, "refId": "E" }, 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 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}" diff --git a/test/infrastructure/docker/api/v1beta2/devcluster_types.go b/test/infrastructure/docker/api/v1beta2/devcluster_types.go index 7bcbab322e0f..919e100e9bf3 100644 --- a/test/infrastructure/docker/api/v1beta2/devcluster_types.go +++ b/test/infrastructure/docker/api/v1beta2/devcluster_types.go @@ -119,6 +119,8 @@ type DevClusterStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the DevCluster initialization process. @@ -177,6 +179,11 @@ type DevClusterV1Beta1DeprecatedStatus 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/v1beta2/devmachine_types.go b/test/infrastructure/docker/api/v1beta2/devmachine_types.go index ad3dbbc85e68..a5ea2cf26359 100644 --- a/test/infrastructure/docker/api/v1beta2/devmachine_types.go +++ b/test/infrastructure/docker/api/v1beta2/devmachine_types.go @@ -357,6 +357,8 @@ type DevMachineStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the DevMachine initialization process. @@ -431,6 +433,11 @@ type DevMachineV1Beta1DeprecatedStatus 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/v1beta2/dockercluster_types.go b/test/infrastructure/docker/api/v1beta2/dockercluster_types.go index afb349e70110..bf51724fd21b 100644 --- a/test/infrastructure/docker/api/v1beta2/dockercluster_types.go +++ b/test/infrastructure/docker/api/v1beta2/dockercluster_types.go @@ -93,6 +93,8 @@ type DockerClusterStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the DockerCluster initialization process. @@ -167,6 +169,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/v1beta2/dockermachine_types.go b/test/infrastructure/docker/api/v1beta2/dockermachine_types.go index d43817f235b2..3fbcec36760d 100644 --- a/test/infrastructure/docker/api/v1beta2/dockermachine_types.go +++ b/test/infrastructure/docker/api/v1beta2/dockermachine_types.go @@ -90,6 +90,8 @@ type DockerMachineStatus struct { // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=32 + // +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"` // initialization provides observations of the DockerMachine initialization process. @@ -150,6 +152,11 @@ type DockerMachineV1Beta1DeprecatedStatus 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"`