Skip to content

Commit

Permalink
Merge pull request #5138 from RainbowMango/pr_update_api_printcolumn
Browse files Browse the repository at this point in the history
Unify column names and add missing age column
  • Loading branch information
karmada-bot committed Jul 5, 2024
2 parents c4a81bf + f2b37a4 commit c8acebc
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ spec:
versions:
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
name: READY
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
name: AGE
type: date
name: v1alpha1
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ spec:
- additionalPrinterColumns:
- jsonPath: .spec.target.apiVersion
name: TARGET-API-VERSION
priority: 1
type: string
- jsonPath: .spec.target.kind
name: TARGET-KIND
priority: 1
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ spec:
- additionalPrinterColumns:
- jsonPath: .spec.conflictResolution
name: CONFLICT-RESOLUTION
priority: 1
type: string
- jsonPath: .spec.priority
name: PRIORITY
priority: 1
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ spec:
- additionalPrinterColumns:
- jsonPath: .spec.conflictResolution
name: CONFLICT-RESOLUTION
priority: 1
type: string
- jsonPath: .spec.priority
name: PRIORITY
priority: 1
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ spec:
status: {}
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=="Scheduled")].status
name: Scheduled
name: SCHEDULED
type: string
- jsonPath: .status.conditions[?(@.type=="FullyApplied")].status
name: FullyApplied
name: FULLYAPPLIED
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
name: AGE
type: date
name: v1alpha2
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ spec:
status: {}
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=="Scheduled")].status
name: Scheduled
name: SCHEDULED
type: string
- jsonPath: .status.conditions[?(@.type=="FullyApplied")].status
name: FullyApplied
name: FULLYAPPLIED
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
name: AGE
type: date
name: v1alpha2
schema:
Expand Down
6 changes: 3 additions & 3 deletions charts/karmada/_crds/bases/work/work.karmada.io_works.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ spec:
versions:
- additionalPrinterColumns:
- jsonPath: .spec.workload.manifests[*].kind
name: Workload-Kind
name: WORKLOAD-KIND
type: string
- jsonPath: .status.conditions[?(@.type=="Applied")].status
name: Applied
name: APPLIED
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
name: AGE
type: date
name: v1alpha1
schema:
Expand Down
4 changes: 2 additions & 2 deletions operator/config/crds/operator.karmada.io_karmadas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ spec:
versions:
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
name: READY
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
name: AGE
type: date
name: v1alpha1
schema:
Expand Down
4 changes: 2 additions & 2 deletions operator/pkg/apis/operator/v1alpha1/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=karmadas,scope=Namespaced,categories={karmada-io}
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Ready")].status`,name="Ready",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Ready")].status`,name="READY",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="AGE",type=date

// Karmada enables declarative installation of karmada.
type Karmada struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ const (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:path=resourceinterpretercustomizations,scope="Cluster",shortName=ric,categories={karmada-io}
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:JSONPath=`.spec.target.apiVersion`,name="TARGET-API-VERSION",type=string,priority=1
// +kubebuilder:printcolumn:JSONPath=`.spec.target.kind`,name="TARGET-KIND",type=string,priority=1
// +kubebuilder:printcolumn:JSONPath=`.spec.target.apiVersion`,name="TARGET-API-VERSION",type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.target.kind`,name="TARGET-KIND",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="AGE",type=date

// ResourceInterpreterCustomization describes the configuration of a specific
// resource for Karmada to get the structure.
Expand Down
10 changes: 6 additions & 4 deletions pkg/apis/policy/v1alpha1/propagation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:path=propagationpolicies,scope=Namespaced,shortName=pp,categories={karmada-io}
// +kubebuilder:printcolumn:JSONPath=`.spec.conflictResolution`,name="CONFLICT-RESOLUTION",type=string,priority=1
// +kubebuilder:printcolumn:JSONPath=`.spec.priority`,name="PRIORITY",type=string,priority=1
// +kubebuilder:printcolumn:JSONPath=`.spec.conflictResolution`,name="CONFLICT-RESOLUTION",type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.priority`,name="PRIORITY",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="AGE",type=date

// PropagationPolicy represents the policy that propagates a group of resources to one or more clusters.
type PropagationPolicy struct {
Expand Down Expand Up @@ -564,8 +565,9 @@ type PropagationPolicyList struct {
// +genclient:nonNamespaced
// +kubebuilder:resource:path=clusterpropagationpolicies,scope="Cluster",shortName=cpp,categories={karmada-io}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:JSONPath=`.spec.conflictResolution`,name="CONFLICT-RESOLUTION",type=string,priority=1
// +kubebuilder:printcolumn:JSONPath=`.spec.priority`,name="PRIORITY",type=string,priority=1
// +kubebuilder:printcolumn:JSONPath=`.spec.conflictResolution`,name="CONFLICT-RESOLUTION",type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.priority`,name="PRIORITY",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="AGE",type=date

// ClusterPropagationPolicy represents the cluster-wide policy that propagates a group of resources to one or more clusters.
// Different with PropagationPolicy that could only propagate resources in its own namespace, ClusterPropagationPolicy
Expand Down
6 changes: 3 additions & 3 deletions pkg/apis/work/v1alpha1/work_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=works,scope=Namespaced,shortName=wk,categories={karmada-io}
// +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
// +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

// Work defines a list of resources to be deployed on the member cluster.
type Work struct {
Expand Down
12 changes: 6 additions & 6 deletions pkg/apis/work/v1alpha2/binding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const (
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=resourcebindings,scope=Namespaced,shortName=rb,categories={karmada-io}
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Scheduled")].status`,name="Scheduled",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="FullyApplied")].status`,name="FullyApplied",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Scheduled")].status`,name="SCHEDULED",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="FullyApplied")].status`,name="FULLYAPPLIED",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="AGE",type=date

// ResourceBinding represents a binding of a kubernetes resource with a propagation policy.
type ResourceBinding struct {
Expand Down Expand Up @@ -409,9 +409,9 @@ const (
// +kubebuilder:resource:path=clusterresourcebindings,scope="Cluster",shortName=crb,categories={karmada-io}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Scheduled")].status`,name="Scheduled",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="FullyApplied")].status`,name="FullyApplied",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Scheduled")].status`,name="SCHEDULED",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="FullyApplied")].status`,name="FULLYAPPLIED",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="AGE",type=date

// ClusterResourceBinding represents a binding of a kubernetes resource with a ClusterPropagationPolicy.
type ClusterResourceBinding struct {
Expand Down

0 comments on commit c8acebc

Please sign in to comment.