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

Add server-side printers to our APIs #1730

Merged
merged 2 commits into from
Feb 19, 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
51 changes: 47 additions & 4 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,11 @@ spec:
singular: nodeconfig
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
properties:
Expand Down Expand Up @@ -1019,7 +1023,29 @@ spec:
singular: scyllacluster
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.readyMembers
name: READY
type: integer
- jsonPath: .status.members
name: MEMBERS
type: integer
- jsonPath: .status.rackCount
name: RACKS
type: integer
- jsonPath: .status.conditions[?(@.type=='Available')].status
name: AVAILABLE
type: string
- jsonPath: .status.conditions[?(@.type=='Progressing')].status
name: PROGRESSING
type: string
- jsonPath: .status.conditions[?(@.type=='Degraded')].status
name: DEGRADED
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1
schema:
openAPIV3Schema:
description: ScyllaCluster defines a Scylla cluster.
Expand Down Expand Up @@ -3353,7 +3379,20 @@ spec:
singular: scylladbmonitoring
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=='Available')].status
name: AVAILABLE
type: string
- jsonPath: .status.conditions[?(@.type=='Progressing')].status
name: PROGRESSING
type: string
- jsonPath: .status.conditions[?(@.type=='Degraded')].status
name: DEGRADED
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: ScyllaDBMonitoring defines a monitoring instance for ScyllaDB clusters.
Expand Down Expand Up @@ -4857,7 +4896,11 @@ spec:
singular: scyllaoperatorconfig
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: ScyllaOperatorConfig describes the Scylla Operator configuration.
Expand Down
24 changes: 23 additions & 1 deletion pkg/api/scylla/v1/scylla.scylladb.com_scyllaclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,29 @@ spec:
singular: scyllacluster
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.readyMembers
name: READY
type: integer
- jsonPath: .status.members
name: MEMBERS
type: integer
- jsonPath: .status.rackCount
name: RACKS
type: integer
- jsonPath: .status.conditions[?(@.type=='Available')].status
name: AVAILABLE
type: string
- jsonPath: .status.conditions[?(@.type=='Progressing')].status
name: PROGRESSING
type: string
- jsonPath: .status.conditions[?(@.type=='Degraded')].status
name: DEGRADED
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1
schema:
openAPIV3Schema:
description: ScyllaCluster defines a Scylla cluster.
Expand Down
7 changes: 7 additions & 0 deletions pkg/api/scylla/v1/types_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,13 @@ const (
// +kubebuilder:storageversion
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="READY",type=integer,JSONPath=".status.readyMembers"
// +kubebuilder:printcolumn:name="MEMBERS",type=integer,JSONPath=".status.members"
// +kubebuilder:printcolumn:name="RACKS",type=integer,JSONPath=".status.rackCount"
// +kubebuilder:printcolumn:name="AVAILABLE",type=string,JSONPath=".status.conditions[?(@.type=='Available')].status"
// +kubebuilder:printcolumn:name="PROGRESSING",type=string,JSONPath=".status.conditions[?(@.type=='Progressing')].status"
// +kubebuilder:printcolumn:name="DEGRADED",type=string,JSONPath=".status.conditions[?(@.type=='Degraded')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

// ScyllaCluster defines a Scylla cluster.
type ScyllaCluster struct {
Expand Down
6 changes: 5 additions & 1 deletion pkg/api/scylla/v1alpha1/scylla.scylladb.com_nodeconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ spec:
singular: nodeconfig
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@ spec:
singular: scylladbmonitoring
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=='Available')].status
name: AVAILABLE
type: string
- jsonPath: .status.conditions[?(@.type=='Progressing')].status
name: PROGRESSING
type: string
- jsonPath: .status.conditions[?(@.type=='Degraded')].status
name: DEGRADED
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: ScyllaDBMonitoring defines a monitoring instance for ScyllaDB clusters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ spec:
singular: scyllaoperatorconfig
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: ScyllaOperatorConfig describes the Scylla Operator configuration.
Expand Down
4 changes: 4 additions & 0 deletions pkg/api/scylla/v1alpha1/types_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ type ScyllaDBMonitoringStatus struct {
// +kubebuilder:storageversion
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="AVAILABLE",type=string,JSONPath=".status.conditions[?(@.type=='Available')].status"
// +kubebuilder:printcolumn:name="PROGRESSING",type=string,JSONPath=".status.conditions[?(@.type=='Progressing')].status"
// +kubebuilder:printcolumn:name="DEGRADED",type=string,JSONPath=".status.conditions[?(@.type=='Degraded')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

// ScyllaDBMonitoring defines a monitoring instance for ScyllaDB clusters.
type ScyllaDBMonitoring struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/api/scylla/v1alpha1/types_nodeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ type NodeConfigSpec struct {
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

type NodeConfig struct {
metav1.TypeMeta `json:",inline"`
Expand Down
1 change: 1 addition & 0 deletions pkg/api/scylla/v1alpha1/types_operatorconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type ScyllaOperatorConfigStatus struct {
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

// ScyllaOperatorConfig describes the Scylla Operator configuration.
type ScyllaOperatorConfig struct {
Expand Down