Skip to content

Commit

Permalink
Add additionalPrinterColumns Kind for Work CRD
Browse files Browse the repository at this point in the history
Signed-off-by: lonelyCZ <531187475@qq.com>
  • Loading branch information
lonelyCZ committed Jun 27, 2022
1 parent a3e6a39 commit 29ce4b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/karmada/_crds/bases/work.karmada.io_works.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.workload.manifests[*].kind
name: Kind
type: string
- jsonPath: .status.conditions[?(@.type=="Applied")].status
name: Applied
type: string
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/work/v1alpha1/work_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:JSONPath=`.spec.workload.manifests[*].kind`,name="Kind",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Applied")].status`,name="Applied",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date

Expand Down

0 comments on commit 29ce4b7

Please sign in to comment.