diff --git a/api/v1alpha1/componentplan_types.go b/api/v1alpha1/componentplan_types.go index 2b57a462..47a1c812 100644 --- a/api/v1alpha1/componentplan_types.go +++ b/api/v1alpha1/componentplan_types.go @@ -85,6 +85,8 @@ type Resource struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Namespaced,shortName=cpl;cpls +//+kubebuilder:printcolumn:name="cpl-name",type=string,JSONPath=`.spec.name` +//+kubebuilder:printcolumn:name="cp-name",type=string,JSONPath=`.spec.component.name` // ComponentPlan is the Schema for the componentplans API type ComponentPlan struct { diff --git a/api/v1alpha1/subscription_types.go b/api/v1alpha1/subscription_types.go index ec6b04d0..d29cccc5 100644 --- a/api/v1alpha1/subscription_types.go +++ b/api/v1alpha1/subscription_types.go @@ -93,6 +93,8 @@ type RepositoryHealth struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Namespaced,shortName=sub;subs +//+kubebuilder:printcolumn:name="sub-name",type=string,JSONPath=`.spec.name` +//+kubebuilder:printcolumn:name="cp-name",type=string,JSONPath=`.spec.component.name` // Subscription is the Schema for the subscriptions API type Subscription struct { diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 1c954f5d..371ebee0 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -958,6 +958,7 @@ func (in *RatingStatus) DeepCopyInto(out *RatingStatus) { (*out)[key] = *val.DeepCopy() } } + in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RatingStatus. diff --git a/config/crd/bases/core.kubebb.k8s.com.cn_componentplans.yaml b/config/crd/bases/core.kubebb.k8s.com.cn_componentplans.yaml index d5816beb..3fb16daf 100644 --- a/config/crd/bases/core.kubebb.k8s.com.cn_componentplans.yaml +++ b/config/crd/bases/core.kubebb.k8s.com.cn_componentplans.yaml @@ -18,7 +18,14 @@ spec: singular: componentplan scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .spec.name + name: cpl-name + type: string + - jsonPath: .spec.component.name + name: cp-name + type: string + name: v1alpha1 schema: openAPIV3Schema: description: ComponentPlan is the Schema for the componentplans API diff --git a/config/crd/bases/core.kubebb.k8s.com.cn_subscriptions.yaml b/config/crd/bases/core.kubebb.k8s.com.cn_subscriptions.yaml index dae59a46..4c052d4e 100644 --- a/config/crd/bases/core.kubebb.k8s.com.cn_subscriptions.yaml +++ b/config/crd/bases/core.kubebb.k8s.com.cn_subscriptions.yaml @@ -18,7 +18,14 @@ spec: singular: subscription scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .spec.name + name: sub-name + type: string + - jsonPath: .spec.component.name + name: cp-name + type: string + name: v1alpha1 schema: openAPIV3Schema: description: Subscription is the Schema for the subscriptions API