Skip to content

Commit

Permalink
feat: add print of some columns (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrinux authored Dec 12, 2024
1 parent fb7040a commit 68b6107
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions api/v1alpha1/dragonfly_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ type DragonflyStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The current phase of the Dragonfly cluster"
//+kubebuilder:printcolumn:name="Rolling Update",type="boolean",JSONPath=".status.isRollingUpdate",description="Indicates if a rolling update is in progress"
//+kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".spec.replicas",description="Number of replicas"

// Dragonfly is the Schema for the dragonflies API
type Dragonfly struct {
Expand Down
15 changes: 14 additions & 1 deletion config/crd/bases/dragonflydb.io_dragonflies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ spec:
singular: dragonfly
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- description: The current phase of the Dragonfly cluster
jsonPath: .status.phase
name: Phase
type: string
- description: Indicates if a rolling update is in progress
jsonPath: .status.isRollingUpdate
name: Rolling Update
type: boolean
- description: Number of replicas
jsonPath: .spec.replicas
name: Replicas
type: integer
name: v1alpha1
schema:
openAPIV3Schema:
description: Dragonfly is the Schema for the dragonflies API
Expand Down

0 comments on commit 68b6107

Please sign in to comment.