Skip to content

Commit 4e5587c

Browse files
committed
Add the Desired column to KCP, MD, MS, MachinePools
1 parent d13b5eb commit 4e5587c

File tree

8 files changed

+24
-0
lines changed

8 files changed

+24
-0
lines changed

api/v1beta1/machinedeployment_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase {
276276
// +kubebuilder:subresource:status
277277
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
278278
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster"
279+
// +kubebuilder:printcolumn:name="Desired",type=integer,JSONPath=".spec.replicas",description="Total number of machines desired by this MachineDeployment",priority=10
279280
// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="Total number of non-terminated machines targeted by this MachineDeployment"
280281
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this MachineDeployment"
281282
// +kubebuilder:printcolumn:name="Updated",type=integer,JSONPath=".status.updatedReplicas",description="Total number of non-terminated machines targeted by this deployment that have the desired template spec"

api/v1beta1/machineset_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ func (m *MachineSet) Validate() field.ErrorList {
205205
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
206206
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster"
207207
// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="Total number of non-terminated machines targeted by this machineset"
208+
// +kubebuilder:printcolumn:name="Desired",type=integer,JSONPath=".spec.replicas",description="Total number of machines desired by this machineset",priority=10
208209
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this machineset."
209210
// +kubebuilder:printcolumn:name="Available",type="integer",JSONPath=".status.availableReplicas",description="Total number of available machines (ready for at least minReadySeconds)"
210211
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineSet"

config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,11 @@ spec:
966966
jsonPath: .spec.clusterName
967967
name: Cluster
968968
type: string
969+
- description: Total number of machines desired by this MachineDeployment
970+
jsonPath: .spec.replicas
971+
name: Desired
972+
priority: 10
973+
type: integer
969974
- description: Total number of non-terminated machines targeted by this MachineDeployment
970975
jsonPath: .status.replicas
971976
name: Replicas

config/crd/bases/cluster.x-k8s.io_machinepools.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,11 @@ spec:
973973
jsonPath: .status.replicas
974974
name: Replicas
975975
type: string
976+
- description: Total number of machines desired by this MachinePool
977+
jsonPath: .spec.replicas
978+
name: Desired
979+
priority: 10
980+
type: integer
976981
- description: MachinePool status such as Terminating/Pending/Provisioning/Running/Failed
977982
etc
978983
jsonPath: .status.phase

config/crd/bases/cluster.x-k8s.io_machinesets.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,11 @@ spec:
850850
jsonPath: .status.replicas
851851
name: Replicas
852852
type: integer
853+
- description: Total number of machines desired by this machineset
854+
jsonPath: .spec.replicas
855+
name: Desired
856+
priority: 10
857+
type: integer
853858
- description: Total number of ready machines targeted by this machineset.
854859
jsonPath: .status.readyReplicas
855860
name: Ready

controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ type KubeadmControlPlaneStatus struct {
205205
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['cluster\\.x-k8s\\.io/cluster-name']",description="Cluster"
206206
// +kubebuilder:printcolumn:name="Initialized",type=boolean,JSONPath=".status.initialized",description="This denotes whether or not the control plane has the uploaded kubeadm-config configmap"
207207
// +kubebuilder:printcolumn:name="API Server Available",type=boolean,JSONPath=".status.ready",description="KubeadmControlPlane API Server is ready to receive requests"
208+
// +kubebuilder:printcolumn:name="Desired",type=integer,JSONPath=".spec.replicas",description="Total number of machines desired by this control plane",priority=10
208209
// +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=".status.replicas",description="Total number of non-terminated machines targeted by this control plane"
209210
// +kubebuilder:printcolumn:name="Ready",type=integer,JSONPath=".status.readyReplicas",description="Total number of fully running and ready control plane machines"
210211
// +kubebuilder:printcolumn:name="Updated",type=integer,JSONPath=".status.updatedReplicas",description="Total number of non-terminated machines targeted by this control plane that have the desired template spec"

controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,6 +2415,11 @@ spec:
24152415
jsonPath: .status.ready
24162416
name: API Server Available
24172417
type: boolean
2418+
- description: Total number of machines desired by this control plane
2419+
jsonPath: .spec.replicas
2420+
name: Desired
2421+
priority: 10
2422+
type: integer
24182423
- description: Total number of non-terminated machines targeted by this control
24192424
plane
24202425
jsonPath: .status.replicas

exp/api/v1beta1/machinepool_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase {
207207
// +kubebuilder:storageversion
208208
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster"
209209
// +kubebuilder:printcolumn:name="Replicas",type="string",JSONPath=".status.replicas",description="MachinePool replicas count"
210+
// +kubebuilder:printcolumn:name="Desired",type=integer,JSONPath=".spec.replicas",description="Total number of machines desired by this MachinePool",priority=10
210211
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="MachinePool status such as Terminating/Pending/Provisioning/Running/Failed etc"
211212
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachinePool"
212213
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.template.spec.version",description="Kubernetes version associated with this MachinePool"

0 commit comments

Comments
 (0)