Skip to content

Commit b168d9c

Browse files
authored
Merge pull request #2066 from lonelyCZ/pr-work-kind
Add additionalPrinterColumns `KIND` for Work CRD
2 parents cb1a066 + fd7139d commit b168d9c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

charts/karmada/_crds/bases/work/work.karmada.io_works.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ spec:
2020
scope: Namespaced
2121
versions:
2222
- additionalPrinterColumns:
23+
- jsonPath: .spec.workload.manifests[*].kind
24+
name: Workload-Kind
25+
type: string
2326
- jsonPath: .status.conditions[?(@.type=="Applied")].status
2427
name: Applied
2528
type: string

pkg/apis/work/v1alpha1/work_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const (
3636
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
3737
// +kubebuilder:subresource:status
3838
// +kubebuilder:resource:categories={karmada-io},shortName=wk
39+
// +kubebuilder:printcolumn:JSONPath=`.spec.workload.manifests[*].kind`,name="Workload-Kind",type=string
3940
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Applied")].status`,name="Applied",type=string
4041
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
4142

0 commit comments

Comments
 (0)