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
// 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.
@@ -220,6 +223,7 @@ type MachineStatus struct {
220
223
221
224
// Conditions defines current service state of the Machine.
222
225
// +optional
226
+
// +Metrics:stateset:name="status_condition",help="The condition of a machine.",labelName="status",JSONPath={"status"},list={"True","False","Unknown"},labelsFromPath={"type":{"type"}}
223
227
ConditionsConditions`json:"conditions,omitempty"`
224
228
}
225
229
@@ -279,8 +283,17 @@ type Bootstrap struct {
279
283
// +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={container_runtime_version:{status,nodeInfo,containerRuntimeVersion},failure_domain:{spec,failureDomain},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
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,7 @@ type MachineDeploymentSpec struct {
97
97
// * An existing MachineDeployment which initially wasn't controlled by the autoscaler
98
98
// should be later controlled by the autoscaler
99
99
// +optional
100
+
// +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a machinedeployment."
100
101
Replicas*int32`json:"replicas,omitempty"`
101
102
102
103
// RolloutAfter is a field to indicate a rollout should be performed
@@ -134,6 +135,7 @@ type MachineDeploymentSpec struct {
134
135
135
136
// Indicates that the deployment is paused.
136
137
// +optional
138
+
// +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
137
139
Pausedbool`json:"paused,omitempty"`
138
140
139
141
// The maximum time in seconds for a deployment to make progress before it
@@ -183,6 +185,7 @@ type MachineRollingUpdateDeployment struct {
183
185
// that the total number of machines available at all times
184
186
// during the update is at least 70% of desired machines.
185
187
// +optional
188
+
// +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
@@ -199,6 +202,7 @@ type MachineRollingUpdateDeployment struct {
199
202
// be scaled up further, ensuring that total number of machines running
200
203
// at any time during the update is at most 130% of desired machines.
201
204
// +optional
205
+
// +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).
256
265
// +optional
266
+
// +Metrics:stateset:name="status_phase",help="The machinedeployments current phase.",labelName="phase",list={"ScalingUp","ScalingDown","Running","Failed","Unknown"}
257
267
Phasestring`json:"phase,omitempty"`
258
268
259
269
// Conditions defines current service state of the MachineDeployment.
260
270
// +optional
271
+
// +Metrics:stateset:name="status_condition",help="The condition of a machinedeployment.",labelName="status",JSONPath={"status"},list={"True","False","Unknown"},labelsFromPath={"type":{"type"}}
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.template.spec.version",description="Kubernetes version associated with this MachineDeployment"
320
331
321
332
// MachineDeployment is the Schema for the machinedeployments API.
// +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.
@@ -132,6 +135,7 @@ type MachineHealthCheckStatus struct {
132
135
133
136
// Conditions defines current service state of the MachineHealthCheck.
134
137
// +optional
138
+
// +Metrics:stateset:name="status_condition",help="The condition of a machinehealthcheck.",labelName="status",JSONPath={"status"},list={"True","False","Unknown"},labelsFromPath={"type":{"type"}}
135
139
ConditionsConditions`json:"conditions,omitempty"`
136
140
}
137
141
@@ -148,8 +152,16 @@ type MachineHealthCheckStatus struct {
148
152
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineHealthCheck"
149
153
150
154
// 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:{}}
Copy file name to clipboardExpand all lines: api/v1beta1/machineset_types.go
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ type MachineSetSpec struct {
44
44
// Defaults to 1.
45
45
// +optional
46
46
// +kubebuilder:default=1
47
+
// +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a machineset.",nilIsZero=true
47
48
Replicas*int32`json:"replicas,omitempty"`
48
49
49
50
// MinReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available.
@@ -128,18 +129,22 @@ type MachineSetStatus struct {
128
129
129
130
// Replicas is the most recently observed number of replicas.
130
131
// +optional
132
+
// +Metrics:gauge:name="status_replicas",help="The number of replicas per machineset.",nilIsZero=true
131
133
Replicasint32`json:"replicas"`
132
134
133
135
// The number of replicas that have labels matching the labels of the machine template of the MachineSet.
134
136
// +optional
137
+
// +Metrics:gauge:name="status_fully_labeled_replicas",help="The number of fully labeled replicas per machineset.",nilIsZero=true
// Conditions defines current service state of the MachineSet.
172
177
// +optional
178
+
// +Metrics:stateset:name="status_condition",help="The condition of a machineset.",labelName="status",JSONPath={"status"},list={"True","False","Unknown"},labelsFromPath={"type":{"type"}}
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.template.spec.version",description="Kubernetes version associated with this MachineSet"
213
219
214
220
// MachineSet is the Schema for the machinesets API.
// +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:{}}
Copy file name to clipboardExpand all lines: controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@ type KubeadmControlPlaneSpec struct {
76
76
// odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members).
77
77
// This is a pointer to distinguish between explicit zero and not specified.
78
78
// +optional
79
+
// +Metrics:gauge:name="spec_replicas",help="The number of desired machines for a kubeadmcontrolplane."
79
80
Replicas*int32`json:"replicas,omitempty"`
80
81
81
82
// Version defines the desired Kubernetes version.
@@ -181,6 +182,7 @@ type RollingUpdate struct {
181
182
// Example: when this is set to 1, the control plane can be scaled
182
183
// up immediately when the rolling update starts.
183
184
// +optional
185
+
// +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."
// Initialized denotes whether or not the control plane has the
@@ -292,6 +298,7 @@ type KubeadmControlPlaneStatus struct {
292
298
293
299
// Conditions defines current service state of the KubeadmControlPlane.
294
300
// +optional
301
+
// +Metrics:stateset:name="status_condition",help="The condition of a kubeadmcontrolplane.",labelName="status",JSONPath={"status"},list={"True","False","Unknown"},labelsFromPath={"type":{"type"}}
// +Metrics:info:name="info",help="Information about a kubeadmcontrolplane.",labelsFromPath={version:{"spec","version"}}
334
348
typeKubeadmControlPlanestruct {
335
-
metav1.TypeMeta`json:",inline"`
349
+
metav1.TypeMeta`json:",inline"`
350
+
// +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:{}}
0 commit comments