You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/v1beta1/cluster_types.go
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ const (
46
46
typeClusterSpecstruct {
47
47
// Paused can be used to prevent controllers from processing the Cluster and all its associated objects.
48
48
// +optional
49
+
// +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
49
50
Pausedbool`json:"paused,omitempty"`
50
51
51
52
// Cluster network configuration.
@@ -430,6 +431,7 @@ type ClusterStatus struct {
430
431
// Phase represents the current phase of cluster actuation.
431
432
// E.g. Pending, Running, Terminating, Failed etc.
432
433
// +optional
434
+
// +Metrics:stateset:name="status_phase",help="The clusters current phase.",labelName="phase",list={"Pending","Provisioning","Provisioned","Deleting","Failed","Unknown"}
433
435
Phasestring`json:"phase,omitempty"`
434
436
435
437
// InfrastructureReady is the state of the infrastructure provider.
@@ -446,6 +448,8 @@ type ClusterStatus struct {
446
448
447
449
// Conditions defines current service state of the cluster.
448
450
// +optional
451
+
// +Metrics:stateset:name="status_condition",help="The condition of a cluster.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"}
452
+
// +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a cluster.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"}
449
453
ConditionsConditions`json:"conditions,omitempty"`
450
454
451
455
// ObservedGeneration is the latest generation observed by the controller.
@@ -514,8 +518,15 @@ func (v APIEndpoint) String() string {
514
518
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.topology.version",description="Kubernetes version associated with this Cluster"
// +Metrics:info:name="info",help="Information about a cluster.",labelsFromPath={topology_version:".spec.topology.version",topology_class:".spec.topology.class",control_plane_endpoint_host:".spec.controlPlaneEndpoint.host",control_plane_endpoint_port:".spec.controlPlaneEndpoint.port",control_plane_reference_kind:".spec.controlPlaneRef.kind",control_plane_reference_name:".spec.controlPlaneRef.name",infrastructure_reference_kind:".spec.infrastructureRef.kind",infrastructure_reference_name:".spec.infrastructureRef.name"}
// +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:"."}
// +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:"."}
@@ -890,6 +898,8 @@ type ClusterClassStatus struct {
890
898
891
899
// Conditions defines current observed state of the ClusterClass.
892
900
// +optional
901
+
// +Metrics:stateset:name="status_condition",help="The condition of a clusterclass.",labelName="status",JSONPath=.status,list={"True","False","Unknown"},labelsFromPath={"type":".type"}
902
+
// +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a clusterclass.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"}
893
903
ConditionsConditions`json:"conditions,omitempty"`
894
904
895
905
// ObservedGeneration is the latest generation observed by the controller.
// Phase represents the current phase of machine actuation.
200
202
// E.g. Pending, Running, Terminating, Failed etc.
201
203
// +optional
204
+
// +Metrics:stateset:name="status_phase",help="The machines current phase.",labelName="phase",list={"Pending","Provisioning","Provisioned","Running","Deleting","Deleted","Failed","Unknown"}
202
205
Phasestring`json:"phase,omitempty"`
203
206
204
207
// CertificatesExpiryDate is the expiry date of the machine certificates.
205
208
// This value is only set for control plane machines.
206
209
// +optional
210
+
// +Metrics:gauge:name="status_certificatesexpirydate",help="Information about certificate expiration date of a control plane node.",nilIsZero=true
// BootstrapReady is the state of the bootstrap provider.
@@ -220,6 +224,8 @@ type MachineStatus struct {
220
224
221
225
// Conditions defines current service state of the Machine.
222
226
// +optional
227
+
// +Metrics:stateset:name="status_condition",help="The condition of a machine.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"}
228
+
// +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machine.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"}
223
229
ConditionsConditions`json:"conditions,omitempty"`
224
230
}
225
231
@@ -279,8 +285,17 @@ type Bootstrap struct {
279
285
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="Kubernetes version associated with this Machine"
// +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}
// +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:"."}
Copy file name to clipboardExpand all lines: api/v1beta1/machinedeployment_types.go
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,7 @@ type MachineDeploymentSpec struct {
99
99
// * An existing MachineDeployment which initially wasn't controlled by the autoscaler
100
100
// should be later controlled by the autoscaler
101
101
// +optional
102
+
// +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a machinedeployment."
102
103
Replicas*int32`json:"replicas,omitempty"`
103
104
104
105
// RolloutAfter is a field to indicate a rollout should be performed
@@ -139,6 +140,7 @@ type MachineDeploymentSpec struct {
139
140
140
141
// Indicates that the deployment is paused.
141
142
// +optional
143
+
// +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
142
144
Pausedbool`json:"paused,omitempty"`
143
145
144
146
// The maximum time in seconds for a deployment to make progress before it
@@ -193,6 +195,7 @@ type MachineRollingUpdateDeployment struct {
193
195
// that the total number of machines available at all times
194
196
// during the update is at least 70% of desired machines.
195
197
// +optional
198
+
// +Metrics:gauge:name="spec_strategy_rollingupdate_max_unavailable",help="Maximum number of unavailable replicas during a rolling update of a machinedeployment."
// The maximum number of machines that can be scheduled above the
@@ -209,6 +212,7 @@ type MachineRollingUpdateDeployment struct {
209
212
// be scaled up further, ensuring that total number of machines running
210
213
// at any time during the update is at most 130% of desired machines.
211
214
// +optional
215
+
// +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."
// Phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown).
291
300
// +optional
301
+
// +Metrics:stateset:name="status_phase",help="The machinedeployments current phase.",labelName="phase",list={"ScalingUp","ScalingDown","Running","Failed","Unknown"}
292
302
Phasestring`json:"phase,omitempty"`
293
303
294
304
// Conditions defines current service state of the MachineDeployment.
295
305
// +optional
306
+
// +Metrics:stateset:name="status_condition",help="The condition of a machinedeployment.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"}
307
+
// +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinedeployment.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"}
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.template.spec.version",description="Kubernetes version associated with this MachineDeployment"
355
367
356
368
// MachineDeployment is the Schema for the machinedeployments API.
// +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}
// +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:"."}
// ObservedGeneration is the latest generation observed by the controller.
@@ -146,6 +149,8 @@ type MachineHealthCheckStatus struct {
146
149
147
150
// Conditions defines current service state of the MachineHealthCheck.
148
151
// +optional
152
+
// +Metrics:stateset:name="status_condition",help="The condition of a machinehealthcheck.",labelName="status",JSONPath=".status",list={"True","False","Unknown"},labelsFromPath={"type":".type"}
153
+
// +Metrics:gauge:name="status_condition_last_transition_time",help="The condition last transition time of a machinehealthcheck.",valueFrom=.lastTransitionTime,labelsFromPath={"type":".type","status":".status"}
149
154
ConditionsConditions`json:"conditions,omitempty"`
150
155
}
151
156
@@ -162,8 +167,17 @@ type MachineHealthCheckStatus struct {
162
167
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineHealthCheck"
163
168
164
169
// MachineHealthCheck is the Schema for the machinehealthchecks API.
// +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:"."}
0 commit comments