Skip to content

Commit

Permalink
Merge pull request #27 from digitalocean/kperath/additional-columns-f…
Browse files Browse the repository at this point in the history
…or-database-user-references

display additional columns for databaseuserreferences
  • Loading branch information
adamwg committed Oct 18, 2022
2 parents f522523 + 5a47863 commit 01d0018
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions api/v1alpha1/databaseuserreference_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ type DatabaseUserReferenceStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
//+kubebuilder:printcolumn:name="Cluster name",type=string,JSONPath=`.spec.databaseCluster.name`
//+kubebuilder:printcolumn:name="Username",type=string,JSONPath=`.spec.username`
//+kubebuilder:printcolumn:name="Role",type=string,JSONPath=`.status.role`

// DatabaseUserReference is the Schema for the databaseuserreferences API
type DatabaseUserReference struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@ spec:
singular: databaseuserreference
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.databaseCluster.name
name: Cluster name
type: string
- jsonPath: .spec.username
name: Username
type: string
- jsonPath: .status.role
name: Role
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: DatabaseUserReference is the Schema for the databaseuserreferences
Expand Down

0 comments on commit 01d0018

Please sign in to comment.