Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(crd): add print of some columns #273

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/v1alpha1/dragonfly_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,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
Loading