Skip to content

Commit

Permalink
add columns and shortname to spicedbcluster
Browse files Browse the repository at this point in the history
  • Loading branch information
ecordell committed Feb 8, 2023
1 parent d82ed23 commit 38b4d01
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
32 changes: 31 additions & 1 deletion config/crds/authzed.com_spicedbclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,40 @@ spec:
kind: SpiceDBCluster
listKind: SpiceDBClusterList
plural: spicedbclusters
shortNames:
- spicedbs
singular: spicedbcluster
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.channel
name: Channel
type: string
- jsonPath: .spec.version
name: Desired
type: string
- jsonPath: .status.version.name
name: Current
type: string
- jsonPath: .status.conditions[?(@.type=='ConfigurationWarning')].status
name: Warnings
type: string
- jsonPath: .status.conditions[?(@.type=='Migrating')].status
name: Migrating
type: string
- jsonPath: .status.conditions[?(@.type=='RollingDeployment')].status
name: Updating
type: string
- jsonPath: .status.conditions[?(@.type=='ConditionValidatingFailed')].status
name: Invalid
type: string
- jsonPath: .status.conditions[?(@.type=='Paused')].status
name: Paused
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: SpiceDBCluster defines all options for a full SpiceDB cluster
Expand Down
11 changes: 10 additions & 1 deletion pkg/apis/authzed/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories=authzed
// +kubebuilder:resource:categories=authzed,shortName=spicedbs
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:printcolumn:name="Channel",type=string,JSONPath=".spec.channel"
// +kubebuilder:printcolumn:name="Desired",type=string,JSONPath=".spec.version"
// +kubebuilder:printcolumn:name="Current",type=string,JSONPath=".status.version.name"
// +kubebuilder:printcolumn:name="Warnings",type=string,JSONPath=".status.conditions[?(@.type=='ConfigurationWarning')].status"
// +kubebuilder:printcolumn:name="Migrating",type=string,JSONPath=".status.conditions[?(@.type=='Migrating')].status"
// +kubebuilder:printcolumn:name="Updating",type=string,JSONPath=".status.conditions[?(@.type=='RollingDeployment')].status"
// +kubebuilder:printcolumn:name="Invalid",type=string,JSONPath=".status.conditions[?(@.type=='ConditionValidatingFailed')].status"
// +kubebuilder:printcolumn:name="Paused",type=string,JSONPath=".status.conditions[?(@.type=='Paused')].status"
type SpiceDBCluster struct {
metav1.TypeMeta `json:",inline"`
// +optional
Expand Down

0 comments on commit 38b4d01

Please sign in to comment.