Skip to content

Commit

Permalink
Merge pull request rook#9910 from subhamkrai/all-crs-printColumn
Browse files Browse the repository at this point in the history
core: add `Phase` in `additionalPrinterColumns` for all CRs
  • Loading branch information
travisn committed Mar 21, 2022
2 parents 2b2469c + dc48859 commit 833c458
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 25 deletions.
63 changes: 51 additions & 12 deletions deploy/charts/rook-ceph/templates/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ spec:
singular: cephblockpool
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephBlockPool represents a Ceph Storage Pool
Expand Down Expand Up @@ -519,7 +523,11 @@ spec:
singular: cephbuckettopic
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephBucketTopic represents a Ceph Object Topic for Bucket Notifications
Expand Down Expand Up @@ -670,7 +678,11 @@ spec:
singular: cephclient
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephClient represents a Ceph Client
Expand Down Expand Up @@ -757,8 +769,7 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Phase
jsonPath: .status.phase
- jsonPath: .status.phase
name: Phase
type: string
- description: Message
Expand Down Expand Up @@ -4303,7 +4314,11 @@ spec:
singular: cephfilesystemmirror
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephFilesystemMirror is the Ceph Filesystem Mirror object definition
Expand Down Expand Up @@ -6362,7 +6377,11 @@ spec:
singular: cephfilesystemsubvolumegroup
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup
Expand Down Expand Up @@ -7169,7 +7188,11 @@ spec:
singular: cephobjectstore
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectStore represents a Ceph Object Store Gateway
Expand Down Expand Up @@ -8599,7 +8622,11 @@ spec:
singular: cephobjectstoreuser
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectStoreUser represents a Ceph Object Store Gateway User
Expand Down Expand Up @@ -8737,7 +8764,11 @@ spec:
singular: cephobjectzonegroup
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectZoneGroup represents a Ceph Object Store Gateway Zone Group
Expand Down Expand Up @@ -8802,7 +8833,11 @@ spec:
singular: cephobjectzone
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectZone represents a Ceph Object Store Gateway Zone
Expand Down Expand Up @@ -9195,7 +9230,11 @@ spec:
singular: cephrbdmirror
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephRBDMirror represents a Ceph RBD Mirror
Expand Down
63 changes: 51 additions & 12 deletions deploy/examples/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ spec:
singular: cephblockpool
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephBlockPool represents a Ceph Storage Pool
Expand Down Expand Up @@ -520,7 +524,11 @@ spec:
singular: cephbuckettopic
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephBucketTopic represents a Ceph Object Topic for Bucket Notifications
Expand Down Expand Up @@ -670,7 +678,11 @@ spec:
singular: cephclient
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephClient represents a Ceph Client
Expand Down Expand Up @@ -756,8 +768,7 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Phase
jsonPath: .status.phase
- jsonPath: .status.phase
name: Phase
type: string
- description: Message
Expand Down Expand Up @@ -4301,7 +4312,11 @@ spec:
singular: cephfilesystemmirror
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephFilesystemMirror is the Ceph Filesystem Mirror object definition
Expand Down Expand Up @@ -6358,7 +6373,11 @@ spec:
singular: cephfilesystemsubvolumegroup
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup
Expand Down Expand Up @@ -7162,7 +7181,11 @@ spec:
singular: cephobjectstore
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectStore represents a Ceph Object Store Gateway
Expand Down Expand Up @@ -8591,7 +8614,11 @@ spec:
singular: cephobjectstoreuser
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectStoreUser represents a Ceph Object Store Gateway User
Expand Down Expand Up @@ -8728,7 +8755,11 @@ spec:
singular: cephobjectzonegroup
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectZoneGroup represents a Ceph Object Store Gateway Zone Group
Expand Down Expand Up @@ -8792,7 +8823,11 @@ spec:
singular: cephobjectzone
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephObjectZone represents a Ceph Object Store Gateway Zone
Expand Down Expand Up @@ -9184,7 +9219,11 @@ spec:
singular: cephrbdmirror
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
name: v1
schema:
openAPIV3Schema:
description: CephRBDMirror represents a Ceph RBD Mirror
Expand Down
12 changes: 11 additions & 1 deletion pkg/apis/ceph.rook.io/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
// +kubebuilder:printcolumn:name="DataDirHostPath",type=string,JSONPath=`.spec.dataDirHostPath`,description="Directory used on the K8s nodes"
// +kubebuilder:printcolumn:name="MonCount",type=string,JSONPath=`.spec.mon.count`,description="Number of MONs"
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="Phase"
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="Message",type=string,JSONPath=`.status.message`,description="Message"
// +kubebuilder:printcolumn:name="Health",type=string,JSONPath=`.status.ceph.health`,description="Ceph Health"
// +kubebuilder:printcolumn:name="External",type=boolean,JSONPath=`.spec.external.enable`
Expand Down Expand Up @@ -570,6 +570,7 @@ type CrashCollectorSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CephBlockPool represents a Ceph Storage Pool
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephBlockPool struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -1270,6 +1271,7 @@ type PeerStatSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CephObjectStore represents a Ceph Object Store Gateway
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephObjectStore struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -1455,6 +1457,7 @@ type BucketStatus struct {
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:shortName=rcou;objectuser
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephObjectStoreUser struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -1582,6 +1585,7 @@ type PullSpec struct {
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephObjectZoneGroup struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -1610,6 +1614,7 @@ type ObjectZoneGroupSpec struct {
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephObjectZone struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -1646,6 +1651,7 @@ type ObjectZoneSpec struct {
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephBucketTopic struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -2021,6 +2027,7 @@ type DisruptionManagementSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CephClient represents a Ceph Client
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephClient struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -2107,6 +2114,7 @@ type SanitizeDisksSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CephRBDMirror represents a Ceph RBD Mirror
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephRBDMirror struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -2177,6 +2185,7 @@ type MirroringPeerSpec struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CephFilesystemMirror is the Ceph Filesystem Mirror object definition
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephFilesystemMirror struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -2387,6 +2396,7 @@ type StorageClassDeviceSet struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:subresource:status
type CephFilesystemSubVolumeGroup struct {
metav1.TypeMeta `json:",inline"`
Expand Down

0 comments on commit 833c458

Please sign in to comment.