Skip to content

Commit

Permalink
Merge pull request #2066 from lonelyCZ/pr-work-kind
Browse files Browse the repository at this point in the history
Add additionalPrinterColumns `KIND` for Work CRD
  • Loading branch information
karmada-bot authored Dec 8, 2023
2 parents cb1a066 + fd7139d commit b168d9c
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 b168d9c

Please sign in to comment.