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 <chengzhe@zju.edu.cn>
  • Loading branch information
lonelyCZ committed Dec 7, 2023
1 parent 58b1790 commit fd7139d
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/work.karmada.io_works.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.workload.manifests[*].kind
name: Workload-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 @@ -36,6 +36,7 @@ const (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={karmada-io},shortName=wk
// +kubebuilder:printcolumn:JSONPath=`.spec.workload.manifests[*].kind`,name="Workload-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 fd7139d

Please sign in to comment.