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

Display additional fields when listing DatabaseClusters #24

Merged
merged 3 commits into from
Oct 14, 2022
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/databasecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ type DatabaseClusterStatus struct {
//+kubebuilder:subresource:status

// DatabaseCluster is the Schema for the databaseclusters API
// +kubebuilder:printcolumn:name="Engine",type=string,JSONPath=`.spec.engine`
// +kubebuilder:printcolumn:name="Cluster name",type=string,JSONPath=`.spec.name`
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`
type DatabaseCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ spec:
singular: databasecluster
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .spec.engine
name: Engine
type: string
- jsonPath: .spec.name
name: Cluster name
type: string
- jsonPath: .status.status
name: Status
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: DatabaseCluster is the Schema for the databaseclusters API
Expand Down