Skip to content

Commit

Permalink
Merge pull request #2426 from alexander-demichev/fields
Browse files Browse the repository at this point in the history
✨Add printer colums to machinesets
  • Loading branch information
k8s-ci-robot committed Feb 25, 2020
2 parents 215b16b + 0faf084 commit b814473
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions api/v1alpha3/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ func (m *MachineSet) Validate() field.ErrorList {
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="Total number of non-terminated machines targeted by this machineset"
// +kubebuilder:printcolumn:name="Available",type="integer",JSONPath=".status.availableReplicas",description="Total number of available machines (ready for at least minReadySeconds)"
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this machineset."

// MachineSet is the Schema for the machinesets API
type MachineSet struct {
Expand Down
15 changes: 14 additions & 1 deletion config/crd/bases/cluster.x-k8s.io_machinesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,20 @@ spec:
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
- name: v1alpha3
- additionalPrinterColumns:
- description: Total number of non-terminated machines targeted by this machineset
jsonPath: .status.replicas
name: Replicas
type: integer
- description: Total number of available machines (ready for at least minReadySeconds)
jsonPath: .status.availableReplicas
name: Available
type: integer
- description: Total number of ready machines targeted by this machineset.
jsonPath: .status.readyReplicas
name: Ready
type: integer
name: v1alpha3
schema:
openAPIV3Schema:
description: MachineSet is the Schema for the machinesets API
Expand Down

0 comments on commit b814473

Please sign in to comment.